Skip to content
Katabench
Try free

Topic

Architecture & Design

Patterns and design choices for .NET systems that need clear boundaries, reliable messaging, and room to change.

7 min read

Aspire Service Discovery: Names, Ports, Replicas

Learn how Aspire service discovery turns logical names into endpoints with WithReference, HttpClient resolution, health checks, and replica load balancing.

Read article →
9 min read

Circuit Breaker Pattern in .NET with Polly

Build a circuit breaker in modern .NET with Polly and HttpClient resilience. Tune the failure window, compose retries safely, and prove recovery.

Read article →
8 min read

Message Queue vs Event Bus: Choose the Topology

Compare message queues, event buses, and pub/sub by delivery topology. Choose competing workers or fan-out, then design retries and ordering honestly.

Read article →
7 min read

Structured Logging in .NET: Write Logs You Can Query

Learn structured logging in .NET with ILogger message templates, named fields, scopes, correlation IDs, safe data handling, and query-first design.

Read article →
7 min read

Transactional outbox pattern in .NET: publish without losing messages

Saving data and publishing an event are two writes that can disagree. Build a transactional outbox with EF Core, a retrying publisher, and idempotent consumers so crashes do not lose business events.

Read article →
8 min read

AddSingleton vs AddScoped vs AddTransient: what each promises

AddSingleton vs AddScoped vs AddTransient in plain terms: what each lifetime promises, sensible defaults, and the captive dependency bug that ships.

Read article →
8 min read

Caching strategies: cache-aside, invalidation, and stampedes

Caching strategies from the cache-aside flow to the hard parts: invalidation owned by a human and stampedes tamed by single-flight and jitter.

Read article →
6 min read

Architecture fitness functions: tests that fail the build when your layers rot

Architecture decays because nothing fails the build when the domain references the DbContext. Fitness functions with ArchUnitNET assert layering and dependency rules in CI like any test.

Read article →
6 min read

Hexagonal architecture in .NET without the dogma

Ports and adapters explained in plain C#: domain in the center, ports as interfaces, adapters as infrastructure. Why it beats layered spaghetti, and when it is overkill for a CRUD app.

Read article →
6 min read

Dependency inversion in C# is not about your DI container

The D in SOLID is the most quoted and least applied principle. Dependency inversion means depending on abstractions you own and pointing dependencies inward, not registering services.

Read article →

Get new puzzles and .NET tips in your inbox

A short note when fresh kata land, plus the C# and performance tricks behind the grading. No spam, unsubscribe anytime.