// Field notes

Notes from production.
Ten years of building, written down.

How I design, migrate and debug distributed systems — with interactive diagrams you can poke at, and a meme at the end of most posts, drawn in code.

20 posts4 tracks11 interactive diagrams17 code-drawn memesRSS ↗
Start here

Ten years of building: the patterns that keep repeating

SMB commerce, an e-commerce marketplace, a travel platform, an AI startup, cloud infrastructure — different domains, the same lessons. A map of everything I've written, and what I'd tell my 2015 self.

Worked on 2015–now2 min read
0d2d4d6d8d10d0.5d2dfix a typo1d4dadd one field1d6dbump a library0.5d14d ↑"should be quick"Estimate vs actual, daysestimateactualEvery sprint, plotted honestly.ayushwing.com
01

Built in the open

Projects I built, and what they taught me. Write-ups of my open-source projects: the design, the trade-offs, the code.

5 posts
PMcamera offEMcamera offQAcamera off@McpTool attend_meetingSounds good,let's take thisoffline.me, actuallywriting code(headphones on)Leave meetingFinally, an MCP tool that attends meetings for me.ayushwing.com2026

Building an annotation-driven MCP server in Java

Exposing a Java method to an AI agent should take one annotation, not a protocol implementation. How I built java-mcp-server on Spring Boot 3, and what I'd change next.

5 min◇ interactive diagram☻ meme
Diagram from “GraphQL Federation with Java subgraphs, without the N+1”Diagram from “GraphQL Federation with Java subgraphs, without the N+1”2026

GraphQL Federation with Java subgraphs, without the N+1

Three Spring Boot services, one graph, one query. How entity resolution, DataLoaders and resolver timing work in a federated Java setup — and the N+1 I left in on purpose to find.

5 min◇ interactive diagram
Diagram from “One dependency for logs, traces and metrics: writing a Spring Boot starter”Diagram from “One dependency for logs, traces and metrics: writing a Spring Boot starter”2026

One dependency for logs, traces and metrics: writing a Spring Boot starter

Every service wires observability slightly differently, and the differences show up during incidents. How I packaged logging, tracing and metrics into one Spring Boot starter — and three gaps a code review of my own starter found.

4 min◇ interactive diagram
Illustration for “YT Studio AI: wiring Vision, NLP and LLMs into a creator tool”2026

YT Studio AI: wiring Vision, NLP and LLMs into a creator tool

Score a thumbnail and title before you upload. How I combined deterministic Google Cloud APIs with Gemini and Claude in a Spring Boot + React app, why facts go in before opinions, and what I'd change.

4 min
R.I.P.my demo linkfree dynoNov 28, 2022"it's free, what could change?"Anything you don't pay for can disappear.ayushwing.com2020–2026

Three small tools, three lessons

A vaccine-slot checker from 2021, a WebSocket chat on a free tier that no longer exists, and a Docker setup that streams five videos to YouTube at once. Small projects, each with one lesson that applies to big systems.

4 min☻ meme
02

Reliability

When the network lies, retries pile up, and queues back up. Making distributed systems behave when networks, retries and queues misbehave.

4 posts
REFUND SERVICERequest timed out.RETRY ↻₹1,499refund #1₹1,499refund #2(already paid)(paid again)The response was lost. The refund wasn't.ayushwing.com2018–2019

Idempotency keys: making retries safe for money

A request that times out may still have succeeded. If the client retries a refund, you pay twice. How idempotency keys work, the edge cases that bite, and a Spring + Postgres implementation.

4 min◇ interactive diagram☻ meme
retry()retryGET /stockretry()retryGET /stockretry()retryGET /stockretry()retryGET /stockretry()retryGET /stockretry()retryGET /stockretry()retryGET /stockretry()z z zrecovering…database(needed 1 minute)3 services × 3 retries each= 27 calls per user requestA database that needed one minute,meeting three layers of retries.ayushwing.com2019–now

Retries without a retry storm: timeouts, backoff, jitter and circuit breakers

Retries turn short failures into successes — and, done carelessly, turn a one-minute blip into a long outage. The four tools that keep retries helpful, with Resilience4j code.

5 min◇ interactive diagram☻ meme
database✓ order committedkafka✗ never publishedOrderCreated(gone)kill -9(deploy, mid-request)Commit, then publish.What could possibly go wrong?ayushwing.com2019–2022

The transactional outbox: stop losing events between your database and Kafka

"Save to the database, then publish to Kafka" loses events whenever the process dies in between. The outbox pattern fixes it with one extra table — here's how to build it, relay it and live with its trade-offs.

4 min◇ interactive diagram☻ meme
partition 0partition 1partition 2partition 3partition 4partition 5user-7user-19user-3user-88user-51cust-42cust-42cust-42cust-42cust-42cust-42cust-42consumer lagKafka keeps order per partition.So does the traffic jam.ayushwing.com2019–2022

Kafka consumers in production: ordering, poison messages and lag

Most Kafka incidents are consumer incidents. Partition keys and ordering, at-least-once processing, poison messages and dead-letter topics, rebalances, and the one metric to alert on.

4 min◇ interactive diagram☻ meme
03

Change at scale

Changing systems while they keep running. Changing running systems without downtime: migrations, monolith breakups, workflows.

5 posts
customersphone(2014, "temporary")phone_e164(2023, the real one)✓ expand✓ dual-write✓ switch reads☐ contractExpand ✓ Migrate ✓ Contract: next sprint.(since 2023)ayushwing.com2018–now

Zero-downtime schema and data migrations with expand–contract

Renaming one column without downtime takes five deploys, and that's fine. The expand–contract pattern step by step: dual writes, batched backfills, verification, switching reads, and rolling back at every stage.

4 min◇ interactive diagram☻ meme
MONOLITHrefundsemailsearchwalletBIG-BANGREWRITE, 2019Don't rewrite the monolith. Grow around it.ayushwing.com2018–2021

The strangler fig in practice: carving a service out of a monolith

Big-bang rewrites stall; carving out one capability at a time works. How to pick the first slice, route traffic at the edge, prove the new path with shadow traffic, move data ownership — and know when to stop.

4 min◇ interactive diagram☻ meme
our job system, two years later⏰ cron*/5 * * * *jobs tablestatus VARCHARworkerThread.sleep()status = STUCK?nobody knowsunstick.shrun by hand#ops-help"is job 4512 done?"retry_count++until 5, then?DONE ✓(sometimes)Every queue + cron + status column becomesa workflow engine. A bad one.ayushwing.com2022–now

Durable workflows vs. a queue and a cron job

If your job has more than three steps and must survive restarts, you're writing a workflow engine by hand. What queue + cron + status table turns into, what a durable workflow engine like Temporal gives you, and when it's overkill.

4 min◇ interactive diagram☻ meme
order #1042status: PAID(for now)cancel()ship()t = 0 mst = 50 mssaw PAID ✓saw PAID ✓Both checked the status. Both were right.Use a conditional write.ayushwing.com2015–now

Model business workflows as state machines

Many 'weird bugs' in order, refund and tenant systems are illegal state transitions. Make states and transitions explicit, enforce them in the database with a conditional write, and keep an audit trail.

4 min◇ interactive diagram☻ meme
PostgresMongoDBRedisElasticNeo4jKafkatodo-appmonthly users: 1A to-do app, built for scale.ayushwing.com2015–now

Choose a database by access pattern, not by hype

List your queries first; the database choice mostly falls out. A practical guide to relational, key-value, document, search, graph and warehouse stores — with one real query for each — and when to use two.

4 min☻ meme
04

Staff-level judgment

The half of the job that isn’t code. The non-code half of senior engineering: debugging, design docs, debt, platforms.

5 posts
09:00deployDB CPU40%cloud statusall greennoisyneighbour?certexpiry?rolled backstill brokenon-callDNSEvery incident review, eventually.ayushwing.com2015–now

Debugging production: a method, not a hunch

The fastest production debuggers aren't the ones who know the most. They stop the bleeding first, build a timeline, ask what changed, and narrow the search by halves. A repeatable method for incidents.

4 min☻ meme
Team A: v2 API (REST)Team B: v2 API (gRPC)↕ 70 pxIntegration: approvedin standup ✓Two teams, one integration, zero design docs.ayushwing.com2021–now

Design docs that get approved

A design doc is a decision record, not an essay. A one-page structure that gets to a decision quickly: context, goals and non-goals, options with trade-offs, the decision, risks and rollout — plus how to run the review.

3 min☻ meme
✓ the feature we demoed// TODO: remove after migration (2018)3 feature flags stuck at 100% since 2019the cron job that quietly fixes prod dataone engineer who understands billinga table two services both write tonobody knows what this does. don't touch it.Tech debt: you only ever see the tip.ayushwing.com2015–now

Tech debt as a portfolio: how to get it paid down

"We need a refactor sprint" rarely gets approved; "this costs us two days every release" does. How to classify debt, measure its interest, pick what to pay first, and bundle paydown with work the business already wants.

4 min☻ meme
SELF-SERVE PLATFORMnew envdatabaseaccessdeployDNSbucketsecretqueueNOWSERVING#4512est. wait2 sprintsJIRAfill in 14fieldsthere is aperson inside→Self-serve, as experienced by every other team.ayushwing.com2022–now

Self-serve platforms: turn your team from a queue into a product

If every request to your team becomes a ticket, your team is the bottleneck. How to find the requests worth automating, build guardrails so non-experts can run them safely, and measure whether self-serve actually worked.

3 min☻ meme
CI · refund-serviceall checks passedrefundsTwiceIsFine()refundWorks()refundWorksAgain()refundWorksV2_final()edgeCaseMaybe()testTest()100%coverageRefundServiceTest.java@Testvoid refundWorks() {var r = service.refund(o);assertNotNull(r);assertTrue(true);}asserts: nothinggenerated in 4 secondsAI wrote the tests. All green.Read every assertion anyway.ayushwing.com2024–now

AI-assisted engineering: what actually stuck

Claude Code, Cursor and MCP servers changed how I write tests, review code and explore unfamiliar systems — and changed nothing about who makes design decisions. Where AI tools help, where they don't, and the guardrails that make them safe on a team.

3 min☻ meme