Blog

Engineering notes

Practical writing on architecture, .NET, React, and keeping systems fast in production.

Behzad Fattahi
Behzad FattahiLead Full Stack Engineer · 13 articles
Follow

A Cache Miss Now Costs Fifty Hits

Claude Fable 5.1 cut prompt-cache reads by 75%. In an agent loop that makes reads nearly free and turns every miss into the bill. How I read the price sheet.

  • AI
  • Performance
  • Architecture
  • MCP
Read article

The Agent Development Lifecycle at n=1

Cloudflare says agents write code faster than teams can review, deploy, and maintain it. I run that lifecycle on a one-person site, and the bottleneck is real.

  • AI
  • Process
  • MCP
Read article

The ORDER BY That Hid Our SQL Server Indexes

A null-placement wrapper in generated SQL made every sorted query a full scan. Why medium data still timed out, and the fix that shipped in Hasura v2.50.0.

  • SQL Server
  • Performance
  • Architecture
Read article

AI Writes the Code. Reading It Is the Job.

Sonar says 42% of committed code is AI-generated or assisted, 96% of developers do not fully trust it, and only 48% always verify. Triage is the new skill.

  • AI
  • Process
  • Architecture
Read article

Queues for Kafka: The Consumer Scaling Math Changed

Kafka finally has real queue semantics: share groups decouple consumers from partitions. What that changes about scaling consumers, and what it costs you.

  • Apache Kafka
  • Architecture
  • Scalability
Read article

Agents on the Broker: ACL Lessons from a Fleet

AI agents are joining device fleets as MQTT clients. What fleet ACLs already solve, what genuinely changes, and how I would wire agent permissions today.

  • MQTT
  • IoT
  • Security
  • MCP
Read article

Stateless by Default: Reading the MCP C# SDK v2.0

MCP servers just went stateless by default. Why that mirrors the journey every scaling backend takes, what MRTR really is, and where a session is still right.

  • .NET
  • Architecture
  • MCP
  • Scalability
Read article

Version Upgrades Are a Performance Feature

A runtime release is the cheapest performance work you can buy: how I read one with a production lens, verify wins on my hot paths, and decide when to jump.

  • .NET
  • Performance
  • Architecture
  • Process
Read article

Before the First Commit: Stakeholders and Scale

Most engineering failures are understanding failures. The stakeholder questions I ask before implementing any feature, and why designing on the growth curve keeps scaling from becoming a rewrite.

  • Architecture
  • Process
  • Scalability
  • Cloud-Native
Read article

MQTT in Production: Topic Patterns and ACLs

The topic tree is an API and the ACL is its type system. Designing MQTT topic hierarchies and wildcard subscriptions, locking devices down with placeholder ACL rules, and why EMQX is a strong default for high-throughput fleets.

  • MQTT
  • IoT
  • EMQX
  • Security
Read article

Vertical vs. Horizontal Scaling: Choosing the Axis

Scaling up and scaling out solve different problems. How to choose between them for stateless servers, databases, Apache Kafka, and Kubernetes — with the failure modes each choice buys you.

  • Architecture
  • Apache Kafka
  • Kubernetes
  • Scalability
Read article

Real-Time .NET: SignalR, WebSockets, Backpressure

Push-based APIs fail differently than request/response ones. Choosing between SignalR, raw WebSockets, SSE, and polling — and designing for slow consumers before they take the server down.

  • .NET
  • SignalR
  • Real-time
  • WebSockets
Read article

Offline-First React: Render First, Fetch Second

This site paints instantly from bundled data and treats the API as an upgrade, not a dependency. The pattern, the trade-offs, and where it stops being worth it.

  • React
  • Performance
  • Resilience
Read article