Expertise

System Design

System design is where product requirements meet physics: replication lag, partial failures, idempotency keys, and tenant boundaries that must hold even when a deploy goes wrong. I write about the trade-offs that show up after launch, when traffic is uneven and every shortcut in v1 becomes an incident ticket.

These articles cover multi-tenant SaaS isolation, stale reads from replica lag, webhook idempotency, and choosing between Redis Streams and SQS for event backbones. Each piece includes the failure mode I am optimizing for, not just the happy path.

If you are designing APIs, data planes, or event-driven workflows for a growing SaaS product, start with the pillar posts below. They pair architecture reasoning with production examples you can adapt rather than copy blindly.

Related writing

Benchmarking

API Load Benchmarking for Platform Teams

Load tests that only report RPS miss the point. Platform teams need benchmarks that answer capacity questions, find breaking points before users do, and produce numbers engineering leadership can act on.

  • Benchmarking
  • APIs
  • Performance

Databases

Database Replica Lag and Stale Reads

Async MySQL replicas lag behind the primary. Without explicit read routing, your API will silently serve stale data after writes-here is how to detect, prevent, and design around it.

  • MySQL
  • Distributed Systems
  • Databases

Benchmarking

Designing Benchmark Suites for Platform Changes

Green application CI does not catch an 18% P99 regression from a node image swap. How to build layered platform benchmark suites, statistical regression gates, and dedicated environments that validate substrate changes.

  • Benchmarking
  • Performance
  • Platform Engineering

System Design

Designing a Highly Available API Platform

High availability is explicit failure modes with mitigations-multi-AZ compute, RDS failover, graceful degradation, and a failure matrix you actually game-day.

  • AWS
  • System Design
  • APIs

AI Infrastructure

Designing Reliable AI API Infrastructure

AI APIs fail differently from CRUD APIs - provider rate limits, token budgets, and unpredictable latency need a dedicated reliability layer. Here is how I design inference infrastructure on AWS that survives real traffic.

  • AI
  • APIs
  • AWS

Observability

How to Debug a Slow API in Production

When P99 spikes but errors stay flat, binary-search the request path with metrics and traces-starting at the edge, through the app, and into MySQL, Redis, and downstream dependencies.

  • Observability
  • SRE
  • APIs

AI Infrastructure

LLM Gateway Architecture

An LLM gateway is the control plane between your applications and model providers. Here is the architecture I use to centralize routing, rate limiting, cost accounting, and observability for every inference call.

  • AI
  • Architecture
  • APIs

Event Systems

Redis Streams vs SQS for Event Backbones

Choosing between Redis Streams and SQS is not a benchmark comparison - it is a question about operational model, consumer patterns, and how much Redis you already run. I built a production worker framework on Redis Streams at Edmingle; here is what I learned.

  • Redis
  • AWS
  • Distributed Systems

Reliability

Webhook Idempotency in Production

Payment providers like Razorpay, Stripe, and PayU will deliver the same webhook more than once. If your handler is not idempotent, you will double-charge, double-enroll, or double-ship. Here is the pattern I use in production.

  • APIs
  • Reliability
  • Payments