What is the maximum number of simultaneous requests that Geoserver can handle?

I am load testing a Geoserver instance for a client, where their end users use a bunch of WMS and WFS services. The source of the data is a PostGIS database.

The Geoserver is installed using Kartoza’s GeoServer Docker container, on a system with 32 Core CPU and 16 GB system, and has a nginx in front of the geoserver, for HTTPS purposes.

To improve the User experience, we went from making WMS requests for the entire Viewport, to using tiles from GWC.

With this, we can now support upto about 8000 simultaneous requests. ( I tested this by running a jmeter script, and ran the tests for upto an hour without any errors).

But when I introduce even a few WFS GetFeature requests (less than 20 simultaneous requests) in the mix, the Geoserver starts erroring out, or timing out with even 6500 simultaneous WMS requests. (below 6000 WMS requests, the server can support upto about 100 simultaneous requests)

Just to be through, I have tested only WFS requests, and even reached to about 250 simultaneous requests without any issues.

I’m looking for advice on how I can support about 120 WFS and about 7800 WFS requests simultaneously.

Any advice would be useful.

Glad you are having fun and testing the boundaries. Your numbers were a bit confusing to me:

  • WFS GetFeature - less that 20 simultaneous requests
  • only WFS requests - 250 simultaneous requests

Can I ask what WFS requests resulted in 250 simultaneous requests?

For WFS GetFeature the performance depends a lot on what the request is:

  • work with controlflow and optimize how many WFS requests you allow at once before performance degrades
  • If you are requesting all content? There is not so much performance to be gained. Reduce the max features page size to force smaller answers. Client will need to make several requests to even out the load (subject to control flow above)
  • different formats perform differently. Formats that can steam can respond faster and use less resources then formats like GeoPackage (that need to write out an entire file locally before then sending that file back)
  • spatial queries? Use a spatial index, etc…
  • common attribute or temporal queries? add indexes as appropriate
  • using an GeoServer “SQL View?” to publish a query? Switch to a PostGIS Materialized View and benchmark
  • General: Configure PostGIS to use EWKB, adjust connection pool in keeping with controlflow settings etc…

Beyond that you can start looking at clustering, but that is another thread.