Ian Turton, Astun Technology Ltd.
@ijturton
GeoServer is fundamentally limited by how fast it can move data from disk to the map image.
So if the data is:
then no amount of magic will speed things up much.
There are a number of configuration changes you can make to speed up how GeoServer works.
At minimum check out the documentation on running in production
Make sure you are using a cache (GeoWebCache, MapProxy, etc.)
This way you only need to draw each piece of map once.
If possible pre-seed your cache down to a reasonable level.
For this you need to benchmark your existing server using JMeter (or other test suite).
If you are truly paranoid do this at every step with the JVM settings, data reformats etc.
At least before you start clustering for speed.
Things we'll need:
When ever some one asks for a map from your server a note is made of this in the access log file.
For tomcat this is in /var/log/tomcat8/localhost_access_log.<date>.txt
127.0.0.1 - - [07/Mar/2018:09:06:37 +0000] "GET /geoserver/ HTTP/1.1" 302 - 127.0.0.1 - - [07/Mar/2018:09:06:37 +0000] "GET /geoserver/web/ HTTP/1.1" 302 - 127.0.0.1 - - [07/Mar/2018:09:06:37 +0000] "GET /geoserver/web/?0 HTTP/1.1" 200 4738 127.0.0.1 - - [07/Mar/2018:09:20:24 +0000] "GET /geoserver/web/?0 HTTP/1.1" 200 4715 127.0.0.1 - - [07/Mar/2018:09:20:24 +0000] "GET /geoserver/web/wicket/resource/org.geoserv... 127.0.0.1 - - [07/Mar/2018:09:20:24 +0000] "GET /geoserver/web/wicket/resource/org.geoserv... 127.0.0.1 - - [07/Mar/2018:09:20:24 +0000] "GET /geoserver/web/wicket/resource/org.geoserv... 127.0.0.1 - - [07/Mar/2018:09:25:01 +0000] "GET /geoserver/wms?layers=ras250&styles=&SERVICE...
Could use awk or grep & sed, but this is hard work if you need to do it often, so automate.
LogfileUtils is a Java program to extract the interesting bits from a standard or Microsoft access log.
java logfileUtils -f /var/log/tomcat8/localhost_access_log.2018-03-06.txt \ -t wms|wmts -c request bbox layers width height layer \ tilematrixset tilematrix tilecol tilerow \ -o /home/ian/code/astun/logfileUtils/log.csv
jmeter -n -t [jmx file] -l [results file] -e -o [Path to web report folder]
Goto
https://build.geoserver.org/geoserver/2.12.x/community-latest/
and download
geoserver-2.12-SNAPSHOT-jms-cluster-plugin.zip
geoserver-2.12-SNAPSHOT-activeMQ-broker-plugin.zip
Provides a distributed GeoServer control system.
See the GeoSolutions training course for a good introduction and the manual for more details.
Add to conf file.
<Proxy balancer://cluster> BalancerMember ajp://localhost:8009 route=route1 BalancerMember ajp://localhost:8010 route=route2 ProxySet lbmethod=bybusyness </Proxy> <Location /geoserver> Order allow,deny Allow from all ProxyPass balancer://cluster/geoserver stickysession=JSESSIONID </Location>
Space | Forward |
---|---|
Right, Down, Page Down | Next slide |
Left, Up, Page Up | Previous slide |
P | Open presenter console |
H | Toggle this help |