← Back to the journal
Backend3 min read

Building scalable backends for growing products

A practical guide to backend decisions that help products stay reliable as users, features, and integrations increase.

BitAmour EditorialUpdated
The short version

Find the constraint before changing the architecture. Clear data ownership and visible operations are useful at every stage.

Describe the pressure you expect

“It needs to scale” is not yet a requirement. A reporting platform may be limited by expensive queries, while a document service spends most of its time waiting for external processing. Estimate the important workload: concurrent activity, record sizes, request patterns, and acceptable delays for specific tasks.

Use those estimates to choose what to measure first. Keep the initial architecture understandable. Splitting an application into services introduces network failures, deployment coordination, and data consistency questions; it does not automatically remove the original bottleneck.

Follow one request through the system

For a document export, trace authorization, query execution, file generation, and delivery separately. If file generation is slow but can happen later, a background job may be appropriate. The user needs a visible job state and a reliable way to retrieve the result, not a request that hangs indefinitely.

A queue separates the interactive request from longer work, but it adds responsibility. Workers need bounded retries, failure handling, and a way to recognize repeated work. The diagram below is an example architecture, not a requirement for every backend.

  1. Authorize request
  2. Record export job
  3. Worker generates file
  4. User retrieves result
Example: an export that continues in the background

Investigate before adding capacity

Collect evidence at the point where time is being spent. A larger server will not resolve every slow query or repeated external call.

Fiber-optic connections in network equipment
The infrastructure behind a service is only one layer: data access and request behavior also determine how it scales.Photo: Brett Sayles / Pexels

Swipe the table to compare all columns →

From symptom to investigation
SymptomCheck firstPossible response
Slow list pagesQuery plan, row counts, paginationFix access patterns and assess indexes
Request timeoutsExternal calls and long-running workUse explicit timeouts or background processing
Duplicate actionsRetry behavior and request identityDesign idempotent operations
Unpredictable failuresResource limits and dependency errorsAdd bounded concurrency and useful telemetry

Treat data changes as releases

Changing a data model affects old records, running application versions, and integrations. Plan compatibility before deploying. A staged change can add a new field, migrate existing records, and remove the old dependency only after readers and writers have moved.

In PostgreSQL, EXPLAIN shows the query plan and can help investigate access patterns. Use representative data and understand the difference between inspecting a plan and actually running a statement with EXPLAIN ANALYZE. Production investigation deserves the same care as a release.

Know whether the change helped

Compare latency, errors, and resource use under a representative workload before and after the change. Tail latency matters: a reasonable average can hide a painful experience for some users. Include recovery behavior in the review, not just throughput.

Keep a short record of the constraint, the evidence, and the result. Scaling becomes easier when architectural decisions are tied to observed product needs. The aim is dependable service as demand changes, with enough visibility to know what to improve next.

Further reading

What are you working on?

Bring the idea, the bottleneck, or the product that needs its next chapter. Let’s work out the right next step.

Discuss your project