Blog
Engineering notes from Azeem Subhani on SaaS, payments, booking, and AI application work: architecture, trade-offs, and what shipped.
26 posts

11 min read
Trace a surprise AWS bill from the daily total to service, usage type, and resource, and learn which charges never carry a resource ID.

12 min read
Why capped exponential backoff still causes retry storms, how retries multiply across layers, and how to fix it with full jitter, budgets, and one retry layer.

11 min read
A transaction held across a remote call ties up a connection and its locks. Find it, split the transaction, and recover safely with idempotency keys.

11 min read
The mean looks healthy while one in a hundred requests is slow enough to trigger retries. Read the histogram, find the tail's shape, and fix it.

10 min read
Why a waiting ALTER TABLE stalls every query on a Postgres table, and how lock_timeout, jittered retries, and CONCURRENTLY keep migrations safe.

11 min read
Why deep OFFSET pages get slow and why rows skip or repeat under writes, plus keyset pagination, cursors, indexes, and cheap totals in Postgres.

9 min read
Name the startup clock first: TTID or TTFD. Measure cold starts with Macrobenchmark, then decide whether profiles or deferred work will actually help.

10 min read
Your RAG answer is wrong because the right passage never reached the model. Label queries, measure recall, and fix chunking and filters.

13 min read
At-least-once delivery means duplicates. Dedupe with a stable key in the same transaction, ack after commit, and guard external side effects.

9 min read
OpenTelemetry cardinality overflow keeps totals right but undercounts breakdowns, so error alerts can go quiet. Learn to detect, prevent, and bound it.

10 min read
Tell a container limit kill, a node memory kill, and a runtime heap failure apart before you raise a Kubernetes memory limit.

10 min read
Pool wait, not query time, is often why APIs slow down under load. Measure wait and hold time, cap waiters, and size the pool for the database.

4 min read
Why booking flows fail when access tokens expire mid-checkout, and how typed API clients, token refresh, and route guards removed a class of those bugs.

9 min read
Lab scores look fine but taps feel late. Split INP into input delay, processing, and presentation delay, reproduce it, and verify the fix in field data.

9 min read
Return a webhook 200 before processing, but only after a durable insert. How to avoid lost events and double applies with Stripe-style retries.

11 min read
Logged-in users see another account's data, or stay stale after revalidation. Map the symptom to the Next.js 16 cache layer and invalidate the right one.

10 min read
Trace NAT gateway and cross-AZ charges back to the network path, then choose gateway endpoints, zone routing, or interface endpoints.

10 min read
Serverless instances times pool size can exceed Postgres max_connections. Size pools per platform, add a pooler, and know what transaction mode breaks.

12 min read
The token price did not change but your LLM bill did. Trace it by feature, call pattern, and token type, with retries and loops.

11 min read
Three ways an idempotency key still lets a charge run twice, and the claim, call, record design in Postgres that closes each race.

11 min read
Find N+1 queries in Postgres when EXPLAIN says every query is fast and the request is slow. Sort pg_stat_statements by calls, then join or batch.

10 min read
Yesterday's total changed because late events arrived. Choose a restate, reconcile, or ignore policy, then set watermarks and lookbacks.

11 min read
Logged in is not allowed. Find every object id in a request, scope queries by tenant, test with two users, and stop trusting UUIDs as access control.

5 min read
How a motorsports booking platform serves five white-label venues from one shared reservation and Stripe payments engine, and what that design costs.

11 min read
The user saved and saw old data. Prove replica lag with a WAL timeline, classify reads, and route read-your-writes without overloading the primary.

4 min read
A checklist for shipping Next.js marketing and product pages that crawlers can parse: server-rendered HTML, metadata, canonicals, sitemaps, and structured data.