4 ms·
> Make sure your web server and database are set up and tuned right - that they have enough memory, threads, etc. Anyone have a link to good write-up on tuning
by fareesh 6y ago
> Make sure your web server and database are set up and tuned right - that they have enough memory, threads, etc.
Anyone have a link to good write-up on tuning Apache/nginx and Postgres/MySQL for a web app running on a $10-20 typical VM?
- davidkell 6y agoFor Postgres https://pgtune.leopard.in.ua/#/ https://pgtune.leopard.in.ua/#/
- jeffbee 6y agoDon't. Just use your cloud's hosted database instead.
- ZephyrBlu 6y agoI don't really understand why people _want_ to deal with all the nitty gritty stuff when it's so cheap and easy to have everything work perfectly and be maintained out of the box.
- charrondev 6y agoStep one if you haven’t already would be adding caching. Something like varnish in front for, if nothing else guest traffic, and memcached or redis for commonly fetched data. For a lot of cases varnish (or a different reverse-proxy cache) will shave off 50% of your traffic from ever hitting the servers. It depends on your percentage of guests/sessioned users and and read/writes though. After that using a cache like redis or memcached for things like user sessions/permissions and commonly fetched data significantly reduce the load on your database.
- dig1 6y agoUnless you are expecting >1k req/sec with similar amount of writes, default nginx/postgres/mysql settings should be fine. Focus on your app instead :)