naggie / dsportal

Internal web portal with monitoring
Other
1 stars 1 forks source link

performance #34

Open naggie opened 7 years ago

naggie commented 7 years ago

For the sake of it, run apache benchmark or similar and try the following:

Measure -- and decide wether to keep or not.

replacement http parser https://magic.io/blog/uvloop-blazing-fast-python-networking/ httptools (probably not worth it -- very beta)

(Note conventional caching won't work -- periodically warmed caching is best as most requests will be the first for a given TTL)

naggie commented 7 years ago

image

naggie commented 7 years ago

https://asyncio.readthedocs.io/en/latest/threads.html -- run_in_executor for page generation periodic cache warming?

naggie commented 7 years ago

caching doesn't have to be performed by dsportal -- nginx can, of course, cache based on a header from dsportal. Issue is cache warming.

naggie commented 7 years ago

assuming template rendering is slow enough to have a significant speed increase.

naggie commented 7 years ago

https://www.nginx.com/blog/nginx-caching-guide/

naggie commented 7 years ago

https://www.nginx.com/blog/mitigating-thundering-herd-problem-pbs-nginx/

Stale cache 'updating' directive. Makes concurrency ==1

naggie commented 7 years ago

https://www.digitalocean.com/community/tutorials/how-to-optimize-nginx-configuration -- Static File Caching

naggie commented 7 years ago

Static File Caching, access_log off