Reading tracker active
0 / 8 read
0%
← Home
Architecture Notes

Technical Writing

Notes on distributed systems, AI infrastructure, databases, and observability. Written for engineers who want depth, not surface-level takes.

AI AGENT OBSERVABILITY · SIX SOURCES, ONE SPAN SHAPEBORROWClaudeTRUSTCursorINVENTCopilotINVENTCodexINVENTGeminiINVENTLangChainNORMALIZEDone span shapeQUEUEKafkapartitioned by tenantASYNC WRITERSconsumersflush · 5s or 100 eventsRECONSTRUCTED CONVERSATION · QUERY TIMEmsg_01H8…promptborrowed idappend-onlymsg_01H8…tool_callsame sessionappend-onlymsg_01H9…responseordered by seqappend-onlyaryan.devai-infrastructure · observability
ai-infrastructureobservability

Six AI Agents, Three Ways to Find a Message ID

Claude, Cursor, Copilot, Codex, Gemini and LangChain do not agree on what a message is. Normalizing them collapsed into three strategies: trust the agent's id, borrow one from a file it wasn't meant to share, or invent your own and persist a counter.

Jul 12, 2026·5 min read
PARALLEL CONSUMER · ONE PARTITION, MANY IN-FLIGHTTEST BACKLOG70,000 testsWORK UNITW0per-key queueWORK UNITW1per-key queueWORK UNITW2per-key queueWORK UNITW3per-key queueWORK UNITW4per-key queueWORK UNITW5per-key queueTHREADT0offset trackedTHREADT1offset trackedTHREADT2offset trackedTHREADT3offset trackedTHREADT4offset trackedTHREADT5offset trackedCOMMIT BOUNDARYmaxConcurrency(100)ONE CONSUMER GROUP · 100 IN FLIGHT · OFFSETS SAFE ACROSS A HARD KILLaryan.devdistributed-systems · observability
distributed-systemsobservability

Kafka, Parallel Consumers, and the 6-Hour Testing Bottleneck

We were running 70,000 security tests in about 6 hours on a shared queue, and I was explicitly not allowed to solve it by adding machines. What that constraint forced was per-message offset tracking, a hard 4-minute timeout, and a state file on disk.

May 25, 2026·6 min read