Discussion:
[Geoserver-users] WMS GetCapabilities and time enabled layers
Jonathan Meyer
2017-07-11 22:45:00 UTC
Permalink
Our team deploys GeoServers fronting datasets regularly upwards of a
hundred million (occasionally billions) records. All our datasets are time
enabled which often causes issues for the responsiveness of our WMS
GetCapabilities. Everything goes fairly well as long as the aggregates
performed can take advantage of temporal indices (we use Postgres
primarily), but often new developers will create data missing indices or
with poorly performing joins. This affects all layer consumption, as we
heavily rely on GetCapabilities to self discover the available datasets in
our applications.

I saw a mailing list post from quite awhile back that also brought this
issue up:
http://osgeo-org.1560.x6.nabble.com/WMS-request-getcapabilities-takes-a-loooooooooooooong-time-to-return-td5003095.html

Has there been any thought for a GeoServer native solution for this?
Something as simple as a global setting that would allow caching
GetCapabilities with a configurable TTL would be tremendously helpful.

How are others solving this problem? Fronting GeoServer with a web cache
(Varnish or the like) to cache GetCapabilities requests that way? Never
enabling time dimension on layers when this is a problem?

Thanks,
Jonathan Meyer
Sr. Software Engineer
Applied Information Sciences
Richard Duivenvoorde
2017-07-12 14:20:09 UTC
Permalink
Post by Jonathan Meyer
Our team deploys GeoServers fronting datasets regularly upwards of a
hundred million (occasionally billions) records. All our datasets are
time enabled which often causes issues for the responsiveness of our WMS
GetCapabilities. Everything goes fairly well as long as the aggregates
performed can take advantage of temporal indices (we use Postgres
primarily), but often new developers will create data missing indices or
with poorly performing joins. This affects all layer consumption, as we
heavily rely on GetCapabilities to self discover the available datasets
in our applications.
I saw a mailing list post from quite awhile back that also brought this
issue
up: http://osgeo-org.1560.x6.nabble.com/WMS-request-getcapabilities-takes-a-loooooooooooooong-time-to-return-td5003095.html
Has there been any thought for a GeoServer native solution for this?
Something as simple as a global setting that would allow caching
GetCapabilities with a configurable TTL would be tremendously helpful.
How are others solving this problem? Fronting GeoServer with a web cache
(Varnish or the like) to cache GetCapabilities requests that way? Never
enabling time dimension on layers when this is a problem?
One Apache trick I once saw in a situation like this is to make use of
the the fact that you can set up a 'ErrorDocument' in case of a file not
found/404 [0]. Apache can handle this (that is when files are not
available), and can then redirect to an alternative url (being the
actual geoserver url)

So one scenario you could try to set up:
- create an alias/url for a file (a static capabilities.xml doc) on the
filesystem which is served IF available
- if not available let Apache forward to the actual geoserver
capabilities xml to let geoserver create a fresh one for you
- depending on the trust you have in your dev's you can either let a
cronjob remove the file for you every x hours (which will be a problem
if one of the newby's did not set the right indexes anyway...)
OR you create a cronjob who requests the capabilities, and only on a
valid 200 then updates/replaces the capabilities.xml file.

Regards,

Richard Duivenvoorde

[0] https://httpd.apache.org/docs/2.4/custom-error.html

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
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

Geoserver-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Loading...