Welcome

Systems Architecture

Design write-ups for five backend systems I built end-to-end. Each page covers the problem, the architecture, the decisions I would defend in a review, the failure modes, and where the design stops working.

That last section is the point. A design document that lists only strengths is marketing. The interesting part of any of these systems is the trade I accepted and what it will cost later.

The systems

Write-upThe design question it answersStack
Enterprise Auth GatewayHow do you onboard a new enterprise IdP without a deploy, and survive certificate rotation?SAML 2.0, SCIM 2.0, JWT, AWS Secrets Manager
Distributed Queue EngineHow do you get 2s of third-party I/O off the request path and still not lose a job?Redis, BullMQ, Node workers
Multi-Region ShardingHow do you keep EU data in the EU with one connection string?MongoDB Atlas zone sharding
LLM OrchestrationHow do you keep almost-valid model output out of your database?LangChain, Zod, GPT-4o-mini, Gemini
Distributed ObservabilityHow do you tie a log line to the trace it happened in, across five services?OpenTelemetry, OTLP/gRPC, Pino

Each one has a matching public repository with tests that run without network access, credentials or a live cluster. Where a system needs infrastructure I don’t run, like an Atlas cluster with configured zones or a real IdP, the write-up says so rather than implying otherwise.

How to read these

They are written for someone deciding whether I know what I am doing, so they lead with the constraint rather than the technology. If you only read one, read the Enterprise Auth Gateway: the per-request strategy construction is the decision in this collection that looks most obviously wrong and has the clearest reasoning behind it.

Source for everything is at github.com/sudhanshu1402.