Hassan Raza
Cloud infrastructure

A modern backend, end to end.

This is a reference topology for the kind of system I design. Click any node to see its role and the trade-offs that come with it.

Live topology · click a service to learn more
cloud.topology.v1
Client
Web / Mobile
Load Balancer
L7 entrypoint
API Gateway
Auth · Rate-limit
Microservices
NestJS services
Redis
Hot path cache
Message Queue
Kafka / SQS
PostgreSQL
System of record
Workers
Projections · Jobs
S3
Blobs · Snapshots
A modern backend topology, end to end.

Click any node to see its role and the trade-offs that come with it. The dashed paths show event and request flow.

Request flow walkthrough

  1. 1Client sends request
  2. 2Traffic enters load balancer
  3. 3API Gateway routes request
  4. 4Microservices read/write cache and database
  5. 5Async work is pushed to message queue
  6. 6Workers consume and process jobs
  7. 7Response returns to client

Designing for failure

Every box on this diagram can fail. Circuit breakers at the gateway, idempotent consumers on Kafka, read replicas on Postgres, and replayable events mean no single failure cascades.

Separating writes from reads

Commands go through the API and commit to Postgres. Read models are projected asynchronously by workers into Postgres, Elasticsearch, and caches. Each store is tuned for its query shape.

Cost-aware scaling

Horizontal on stateless layers (API, workers), vertical and replicated on stateful ones (Postgres). Caches soak up the hot path. Object storage holds the long tail at tiny per-GB cost.

Book a Call