One year ago, the author recognized that their Postgres database was struggling to handle the load of their SaaS application. They had been avoiding tackling the issue for a long time by simply scaling up the database server when it got too busy. However, they reached a point where scaling vertically was no longer possible. They considered options like shard writes and micro-services to address the issue, both of which offered exciting opportunities for increased capacity and fault tolerance. However, the author reminds us that increased complexity comes with a cost in terms of attention and decision-making. They believe in squeezing out as much performance as possible from the existing system before implementing more complex solutions. In their case, they were able to optimize the database performance and offload certain queries, resulting in a significant reduction in CPU usage. They emphasize that complexity is necessary at some point, but it should be delayed as much as possible to save on costs.
https://blog.danslimmon.com/2023/08/11/squeeze-the-hell-out-of-the-system-you-have/#like-2777