Saturday 21 December 2019

[Update] A client project is getting a massive momentum, I need to prepare the nodejs infrastructure for this weekend

Okay guys,Time for an update on this postNow the infrastructure is as fast as it could be (100 ms average/req), while we are receiving on average 300k unique/day peaking around the end of the afternoon, and with peak days with half a million unique visitorsThings that helped a lotI learned how to use, configure and optimise postgres connection pool, this was BY FAR the best optimisation (Check this: https://node-postgres.com/features/pooling)I ran a ton of stress tests to find the app bottlenecks, loader.io and artillery are very nice tools for thisFor the heavier SQL requests, I transformed them into static values and cached them, values are updated every 5 minutes by a cron job. It doesn't change anything for the end user as for the data displayed, but change everything for our response time and infrastructure loadThere are a few other minors changes, but those are the 3 main things that helped a lot

Submitted December 21, 2019 at 02:06PM by OogieFrenchieBoogie

No comments:

Post a Comment