Tile caches

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Tile caches

Barry Carter
Hey you guys,

I used a large gray image as a store, and then used tile caching to make
it display faster. Do the tile caches apply only to the gray image? I'm
guessing yes since the cached tiles are stored as PNG/GIF/JPG and not
GeoTiffs themselves, but wasn't sure. For example, it's theoretically
possible that GeoServer reads the gray tile and changes the colormap
before sending it to the client.

Are cached tiles only used if the client requests tiled mode? I'm again
guessing yes, but it's possible that tile caches make it easier to
assemble images at lower zoom levels. However, it's possible GeoServer
uses the data directly when tiled mode is not requested.

Suppose I create a tile cache using the PNG8 format. Can GeoServer tell or
force the client to only requests maps in this format? I assume that, if
the client requests JPG format, the tiles are of no use to me (unless
GeoServer does PNG8 to JPG conversion on the fly), so I'd like the client
to use the most efficient method.



_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Tile caches

Kevin Smith-3
GeoWebCache is really a separate server that is embedded within
GeoServer and it offers a different set of services from those offered
directly by GeoServer from a separate endpoint.

GeoServer doesn't really know anything about how GWC handles a request. 
It just delegates certain requests to GeoWebCache, which then checks its
cache and responds with that, or requests the image from GeoServer's WMS
service. 

/geoserver/wms is the regular GeoServer WMS endpoint
/geoserver/gwc/service/wms is the GeoWebCache WMS-C endpoint that serves
tiles from the cache.

There is a "Direct Integration Mode" setting which will cause requests
to GeoServer's regular WMS endpoint that have "tiled=true" set to check
if GWC can handle them, and if not they are handled normally.  I don't
recommend relying on this as it is far to easy to end up bypassing the
cache without realizing it.  I don't recommend turning this on as it
just leads to silent changes in behaviour.

GWC stores the exact rendered tiles it will respond with.  If you tell
it to cache PNG, it will store PNG images in the cache, and when you
request a tile, it will just stream the tile straight from storage into
the network connection.  If you tell it to cache JPEG as well, it will
store those as a separate set of files.  If you tell it to use a
different gridset to arrange the tiles, that's stored separately. If you
want to cache multiple styles, those are cached separately.

Tile protocols like WMTS, WMS-C, or TMS include information in their
capabilities documents to tell clients how to make requests that align
to the grid or you can just configure the client to align to the grid if
it doesn't support configuration from a capabilities document.  If they
receive requests that don't match, they will generally respond with an
error.  There is an option called "full WMS" available for WMS-C which
will cause it to fuse, crop, and rescale tiles from the cache to handle
arbitrary WMS requests, but this is slower and doesn't look as good so
it's usually not worth turning on.

On 2019-05-22 1:06 p.m., Barry Carter wrote:

> Hey you guys,
>
> I used a large gray image as a store, and then used tile caching to
> make it display faster. Do the tile caches apply only to the gray
> image? I'm guessing yes since the cached tiles are stored as
> PNG/GIF/JPG and not GeoTiffs themselves, but wasn't sure. For example,
> it's theoretically possible that GeoServer reads the gray tile and
> changes the colormap before sending it to the client.
>
> Are cached tiles only used if the client requests tiled mode? I'm
> again guessing yes, but it's possible that tile caches make it easier
> to assemble images at lower zoom levels. However, it's possible
> GeoServer uses the data directly when tiled mode is not requested.
>
> Suppose I create a tile cache using the PNG8 format. Can GeoServer
> tell or force the client to only requests maps in this format? I
> assume that, if the client requests JPG format, the tiles are of no
> use to me (unless GeoServer does PNG8 to JPG conversion on the fly),
> so I'd like the client to use the most efficient method.
>
>
>
> _______________________________________________
> Geoserver-users mailing list
>
> Please make sure you read the following two resources before posting
> to this list:
> - Earning your support instead of buying it, but Ian Turton:
> http://www.ianturton.com/talks/foss4g.html#/
> - The GeoServer user list posting guidelines:
> http://geoserver.org/comm/userlist-guidelines.html
>
> If you want to request a feature or an improvement, also see this:
> https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
>
>
>
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Kevin Michael Smith
<[hidden email]>




_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Tile caches

geowolf
On Sun, May 26, 2019 at 8:01 PM Kevin Smith <[hidden email]> wrote:
There is a "Direct Integration Mode" setting which will cause requests
to GeoServer's regular WMS endpoint that have "tiled=true" set to check
if GWC can handle them, and if not they are handled normally.  I don't
recommend relying on this as it is far to easy to end up bypassing the
cache without realizing it.  I don't recommend turning this on as it
just leads to silent changes in behaviour.

Eh, certain functionality is liked by some and hated by others.

At GeoSolutions we use direct integration a lot, enable it basically always,
and check the response HTTP headers to verify if a request got tile-cached
or not (you get a hit/miss information, and in case of miss, a miss reason).

This allows to use just one protocol for most requests, the base request
is cached, but when an advanced user comes in and adds filtering options,
view params, or other elements that make the tile contents different, and
depending on the configuration, non cacheable, then you still get a tile,
but a non cached one (with a reason for it not being cached in the HTTP headers, as well).
One gets a nice mix of tiles cached for the common user, and on the fly tile
production for the minority of advanced users.

It's certainly a mode that requires extra discipline to be used properly, the onus
is on the client developer to be a bit more careful.
The monitoring subsystem also reports if a certain request was cached or not,
allowing for monitoring of cache % in direct mode requests (a useful second level
check, sometimes a change in configuration makes tiles that were cacheable, no longer so).

Cheers
Andrea

==

GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.



_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users