Sitemap
Backend Engineers Club

Real-world backend engineering scalability, systems design, and the production failures nobody warns you about.

Member-only story

Adding a Database Server Doubled Capacity. One Index Multiplied It by 2,600.

18 min read1 day ago

--

Press enter or click to view image in full size
Fix Queries Before Scaling

The API is slow.

The dashboard takes two seconds to load. Someone opens the database graph and sees CPU at 100%.

Then the meeting starts.

“We need a read replica.”

“Should we add Redis?”

“Maybe it’s time to shard.”

All three sound like serious engineering. All three cost money, add moving parts, and stay with you for years.

You can read this article for free via this link ( my newsletter ): Click Here 👈

But nobody in that meeting has asked the first question: what is the database actually doing?

Nikki Siapno’s recent Level Up Coding piece on scaling databases lays out a sensible order: measure the bottleneck, reduce the work, optimize queries, then add replicas, and shard last.

So this article puts that order to the test. One table, one slow query, one load test, and real measurements at each step.

The Test

The setup is a small PostgreSQL lab that you can run yourself. The full script is at the end of this article.

--

--

Anas Issath
Anas Issath

Written by Anas Issath

From Backend Developer to System Thinker

Backend Engineers Club
Backend Engineers Club

Published in Backend Engineers Club

Real-world backend engineering scalability, systems design, and the production failures nobody warns you about.