Celmir

Insights · 6 min read

Planning for load: what to decide before you write the code

Most performance problems are decided in the first weeks of a project. A few early questions save months of rework later.

Teams often treat performance as something to fix after launch. By then, the expensive decisions are already made: how data is stored, which work happens during a request, and what happens when a dependency slows down.

Questions to answer early

  • What does peak look like? Not the average day, but the busiest minute: a sale, a live event, the end of the month.
  • Which operations must be instant? Separate what the user waits for from what can happen a few seconds later.
  • Where is the state? Know which data must be strictly consistent and which can be cached or slightly stale.
  • What fails first? Every system has a bottleneck. Decide in advance how it degrades instead of letting it decide for you.

Patterns that hold up

  1. Keep requests short. Move slow or non-critical work to queues.
  2. Make every write safe to retry, so recovery after a failure is routine.
  3. Set timeouts and limits on every call to another service.
  4. Measure from day one: latency, error rate and the business metric that matters most to you.
  5. Load-test realistic scenarios before launch, including the failure of a dependency.

Building something that has to stay fast under pressure? Tell us about it.