Service Bus vs Event Grid vs Kafka: We Use All Three — Here's Exactly When to Pick Each (2026)
Mattrx runs Azure Service Bus, Event Grid, and Kafka side by side. The decision framework, real code, and exactly when to pick each.
Long-form tutorials and engineering notes on .NET, React, AI/ML, and SaaS architecture.
Mattrx runs Azure Service Bus, Event Grid, and Kafka side by side. The decision framework, real code, and exactly when to pick each.
Our dashboards aggregated a 1.2-billion-row table at 2,100ms. Here's the partitioning, columnstore, and read-model design that got us to 48ms, with code.
Delivering 15M webhooks a day to endpoints you don't control is deceptively hard. Here's the outbox + queue + retry design that never drops an event.
How Mattrx swapped synchronous REST calls for Kafka — decoupling the ingestion pipeline, killing cascading failures, and cutting failures by 90%.
Clean Architecture in .NET — the Dependency Rule, four layers, full ASP.NET Core + EF Core + MediatR code, trade-offs, and the version that ships.
CQRS in .NET — the problem it solves, MediatR + EF Core implementation, separate read/write models, and when CQRS pays off vs over-engineering.
Azure Functions in .NET — when to pick them over Web API, hosting plans, HTTP/Queue/Timer/Durable code, cold starts, and the real cost model.
SAGA pattern in microservices — Choreography vs Orchestration, an order-processing walkthrough with .NET code, compensating transactions, and pitfalls.
Outbox pattern in .NET — the dual-write problem, EF Core implementation, relay/dispatcher code, CDC vs polling, and the pitfalls that break production.
Microservices from basic to advanced — when to pick them, real .NET code, communication patterns, observability, trade-offs, and where they fail.
Three Azure compute options that overlap heavily. The decision tree, cost model, and the specific signals that tell you when to graduate from one to the next.
SOLID is a heuristic, not a checklist. Real-world examples of when each principle helps — and the specific cases where applying it hurts.