Draw the failure domains
Before optimizing queries, map what fails together. If your API, cache, and worker share one database credential pool, you do not have three systems. You have one.
Separate read paths from write paths when traffic or risk profiles diverge. Isolation is often cheaper than clever retries.
Queues as pressure valves
Synchronous work that can wait should often wait. Queues absorb spikes, protect databases, and make retries explicit.
Every queued job needs an idempotency key and a dead-letter strategy. Without those, queues become silent data loss.
Observe the path, not the box
Dashboards that show CPU on one machine rarely explain user pain. Trace the request path end to end and alert on customer-facing SLOs.



