May 29, 2026·10 min read·Architecture

Rewrites are usually a symptom of a product growing past its original assumptions. Dokterku did not need one because its early decisions were made to survive growth, not just to ship.

Booking availability was the query running constantly under load. We separated reads from writes with a read replica and cached availability aggressively. The write path stayed simple and correct.

Notifications, emails, and webhooks moved to a queue-backed worker. The API stopped doing work outside the request's core responsibility, removing most latency spikes.

Scaling is a series of small, boring refactors applied before they hurt, not one dramatic event. Plan the seams, replicas, caches, and queues during discovery, and growth becomes an operational task instead of an emergency.

Is the stack slowing the product down?