The fallacies of distributed computing, network failure, latency and partial failure, CAP and PACELC, consistency models and eventual consistency, idempotency, distributed locks and clock skew.
-
A call to another service timed out. Did the other service do the work? What does that mean for how you write the calling code?
Beginner
Theory
Distributed Systems Core Concepts
-
Why is idempotency called the core tool of distributed systems? Explain naturally idempotent operations versus deduplication, how idempotency keys and dedup storage work in a .NET service, and what goes wrong when two copies of the same request arrive at the same time.
Idempotency as the answer to retries, duplicates and at-least-once delivery: naturally idempotent operations, idempotency keys, dedup tables with unique constraints in the same transaction as the effect, concurrent duplicates, retention and side effects outside the database.
Mid-Level
Theory
Distributed Systems Core Concepts
Β· π 3 follow-ups Β· π 1 real-world
-
How would you test time-dependent code in .NET, such as token expiry, retries with backoff or a scheduled job, without making tests slow or flaky?
Senior
Theory
Distributed Systems Core Concepts
-
What makes a system distributed? Explain the fallacies of distributed computing, and give a .NET example of code that breaks because it believes one of them.
What a distributed system is, the eight fallacies of distributed computing, and how each shows up as a concrete bug in .NET services that call each other over the network.
Beginner
Theory
Distributed Systems Core Concepts
Β· π 3 follow-ups
-
What is partial failure in a distributed system? Your service calls another service and the call times out: did the other service do the work? Explain why you can't know, and what that means for how you write the calling code.
Partial failure and the unknown outcome of a timed-out remote call: why the caller can't tell what happened, and how timeouts, idempotency, status checks and reconciliation make calling code safe.
Junior
Theory
Distributed Systems Core Concepts
Β· π 3 follow-ups
-
What do the CAP theorem and PACELC actually say? Explain what they don't say, why "pick two of three" is misleading, and how real databases such as SQL Server, Cosmos DB and Redis make the trade-off.
CAP and PACELC explained precisely: consistency (linearisability) vs availability during a network partition, the latency vs consistency trade-off when there is no partition, common misreadings, and how SQL Server, Cosmos DB and Redis position themselves.
Intermediate
Theory
Distributed Systems Core Concepts
Β· π 2 follow-ups
-
Explain the main consistency models in distributed data stores: strong (linearisable), read-your-writes, monotonic reads, consistent prefix and eventual. Use Cosmos DB's five consistency levels as an example, and tell me how you would choose one for a feature.
Consistency models from linearisable to eventual, the session guarantees (read-your-writes, monotonic reads, consistent prefix), how Cosmos DB's Strong, Bounded Staleness, Session, Consistent Prefix and Eventual levels map to them, and how to choose per feature.
Mid-Level
Theory
Distributed Systems Core Concepts
Β· π 3 follow-ups Β· π 1 real-world
-
How do distributed locks work, and why are they so easy to get wrong? Compare Redis (including Redlock), SQL Server application locks and Azure Blob leases, explain fencing tokens, and tell me when you would avoid a distributed lock altogether.
Distributed locks and leases in .NET: Redis SET NX and Redlock, SQL Server sp_getapplock, Azure Blob leases, why locks fail (GC pauses, expiry, clock jumps, failover), fencing tokens, and designs that avoid locks.
Senior
Theory
Distributed Systems Core Concepts
Β· π 3 follow-ups Β· π 1 real-world
-
Why can't you order events across machines by their wall-clock timestamps? Explain clock skew and clock jumps, how NTP and the cloud keep time, logical clocks (Lamport, vector, hybrid), and how .NET's TimeProvider and Stopwatch help you write time-safe code.
Time in distributed systems: clock skew, drift and jumps, NTP and cloud time sync, why timestamps can't order events across machines, Lamport, vector and hybrid logical clocks, and safe time handling in .NET with Stopwatch, DateTimeOffset and TimeProvider.
Senior
Theory
Distributed Systems Core Concepts
Β· π 2 follow-ups Β· π 1 real-world
-
Your nightly billing job runs inside an ASP.NET Core service as a BackgroundService. After the service was scaled from one instance to three, some customers were charged twice overnight. Walk me through how you would contain the incident, prove the cause, and fix it so the job is safe however many instances run, using leases and idempotency.
A real-world incident where a scheduled job in a scaled-out service double-charges customers: containment, proving the cause with logs and traces, leader election with a lease, idempotent charges with a per-period key, moving scheduling out of the web tier, and reconciliation.
Senior
RealWorldScenario
Distributed Systems Core Concepts
Β· π 3 follow-ups Β· π 1 real-world