/ Case Study / E-Commerce

A catalog platform built for transaction volume

Schema-first design, a Redis caching layer, and blue-green deploys — documented in full, not summarized in a screenshot.

— The Hard Problem

The client ran a mid-market retail catalog — 80,000 SKUs, peak flash-sale traffic, and three payment processors. Their prior platform serialized inventory writes and collapsed under concurrent checkout. The engineering task was not a redesign; it was a correctness problem.

Concurrent writes, real inventory, live payments

We scoped the failure mode before writing a line of code: row-level locking contention in a single Postgres table, no read replica offloading, and a deploy process that required a maintenance window. Each constraint shaped the architecture that followed.

Tight overhead crop of a large printed infrastructure diagram spread across a desk — boxes and arrows showing Postgres primary with two read replicas, a Redis cache tier, and a blue-green deployment switch, handwritten annotation circles in pencil, natural window light casting soft shadows across the paper, no people
Tight overhead crop of a large printed infrastructure diagram spread across a desk — boxes and arrows showing Postgres primary with two read replicas, a Redis cache tier, and a blue-green deployment switch, handwritten annotation circles in pencil, natural window light casting soft shadows across the paper, no people
+ Architecture Decisions

Schema, cache, and deploy — each a deliberate trade-off

Postgres with composite indexes on (sku_id, warehouse_id) and advisory locks for checkout writes. Read replicas absorb catalog browse traffic. We chose Postgres over a document store because the relational constraints are not optional when money moves.

Redis sits in front of product detail and pricing queries. TTL set at 90 seconds with cache-aside invalidation on inventory mutation events — not on a timer. The caching layer is documented in the API contract, not assumed.

Blue-green deployment via two identical production environments behind a load-balancer switch. Cutover takes 4 seconds. The old environment stays warm for 10 minutes before decommission — long enough to roll back without a war room.

▸ Measured Outcomes

Numbers from production, not projections

Under 40ms

Zero downtime

3 incidents, 0 pages

Median catalog query time at peak flash-sale load, measured at the database layer after index optimization. Baseline was 310ms on the prior schema.

Every production deploy since launch via blue-green switch. Eighteen releases across eight months — none required a maintenance window or user-facing interruption.

Three infrastructure incidents since launch — upstream DNS failure, a cloud provider storage fault, and a Redis node eviction. The system recovered without manual intervention each time.

The full architecture document — schema diagrams, API contracts, caching strategy, and deployment runbook — is available on request to qualified prospects.