go-spatial / tegola

Tegola is a Mapbox Vector Tile server written in Go
http://tegola.io/
MIT License
1.28k stars 194 forks source link

Optimization & Performance Evaluation? #747

Open istancescu opened 3 years ago

istancescu commented 3 years ago

Hi,

I was wondering if there is any guide that I could follow in order to optimise the loading time (performance) of map resources and if there is any way I could evaluate/estimate the system resources that the system should have in order for multiple concurrent users that are accessing the endpoints(lets say ~around 500 users).

Currently if I am using the bonn example and I am trying to get the "roads" section of the map, its a bit slow, even in localhost.

Thanks, Ionut

ARolek commented 3 years ago

@istancescu good question. We're actually working on some observability metrics via #714 which will help with run-time evaluation. You could use these along with some load testing tools to estimate the resource allocation at runtime.

How often is your data updating? If the data is not constantly changing (i.e. every second) then the best way to handle scaling is to implement various layers of caching using an object store (i.e. S3) and a CDN. With these layers in place, you can then have tegola handle cutting new tiles on cache misses. I can provide an example architecture if this would work for your situation.

istancescu commented 3 years ago

@ARolek the plan is to serve multiple vectors via endpoints. These endpoints might be world-wide and can be used in multiple applications and be consumed with Mapbox GL. The data will be imported manually into the database so I think it will remain the same but distributed multiple times to multiple consumers. The whole point would be to overlay the distributed vectors onto some maps by the consumers.

Yes please, an example architecture would be helpful.