SOHIL LADHANI
  • Menu ▾
    • About
  • About

Cache Stampede: When Expiry Causes Chaos

2026-01-29sohilladhani
#caching  #thundering-herd  #cache-stampede  #performance  #system-design 

What happens when a popular cache key expires and thousands of requests hit your database at once. Three patterns to prevent the thundering herd.

[Read more]

Cache Invalidation: The Hard Problem

2026-01-28sohilladhani
#caching  #invalidation  #consistency  #system-design  #architecture 

There are only two hard things in computer science: cache invalidation and naming things. Here’s why invalidation is so tricky, and what actually works.

[Read more]

Caching Patterns: Cache-Aside, Write-Through, and Friends

2026-01-27sohilladhani
#caching  #performance  #system-design  #redis  #architecture 

The four fundamental caching patterns every engineer should know. When to use cache-aside vs write-through vs write-behind vs read-through.

[Read more]

CRDTs: Data Structures That Never Conflict

2026-01-26sohilladhani
#distributed-systems  #crdt  #eventual-consistency  #conflict-resolution  #system-design 

How CRDTs let distributed systems merge updates without coordination. The math that makes ‘conflict-free’ possible.

[Read more]

Gossip Protocols: How Rumors Keep Systems Alive

2026-01-25sohilladhani
#distributed-systems  #gossip-protocol  #failure-detection  #system-design  #architecture 

How distributed systems spread information without a central coordinator. The surprisingly effective technique of random peer-to-peer chatter.

[Read more]

Vector Clocks and Lamport Timestamps

2026-01-24sohilladhani
#distributed-systems  #vector-clocks  #lamport-timestamps  #consistency  #system-design 

How distributed systems track ‘what happened before what’ without trusting wall clocks. Lamport timestamps for ordering, vector clocks for detecting conflicts.

[Read more]

The In-Memory Trap: Why Objects Are Slow

2026-01-23sohilladhani
#performance  #system-design  #java  #redis  #apache-arrow 

In-memory doesn’t always mean fast. How shifting from object-based to vector-based storage (Apache Arrow) delivered a 13x performance boost.

[Read more]

Raft: The Understandable Consensus Algorithm

2026-01-22sohilladhani
#distributed-systems  #raft  #consensus  #system-design  #architecture  #fault-tolerance 

How distributed systems agree on state. A practical look at Raft’s Leader Election and Log Replication, finally making sense of consensus.

[Read more]

The CAP Theorem: The Cliché I Tried to Avoid

2026-01-21sohilladhani
#distributed-systems  #cap-theorem  #database  #system-design  #architecture 

Why the CAP Theorem is the most misunderstood rule in system design. Addressing the ‘Pick 2’ lie and how it sets the stage for consensus algorithms.

[Read more]

Distributed Tracing: Finding the Needle in the Haystack

2026-01-20sohilladhani
#architecture  #microservices  #observability  #distributed-systems  #system-design 

When a request vanishes into a maze of 10 microservices. How Distributed Tracing and OpenTelemetry keep you from going insane during an outage.

[Read more]

Transactional Outbox: Solving the Dual Write Problem

2026-01-19sohilladhani
#architecture  #microservices  #event-driven  #system-design  #patterns 

Why your event-driven system is lying to you. Solving the ‘Dual Write’ problem using the Transactional Outbox pattern.

[Read more]

Materialized Views: The Read Optimization Pattern

2026-01-18sohilladhani
#distributed-systems  #database  #performance  #cqrs  #system-design 

Why standard views are just aliases and how materialized views act as an ‘in-database cache’ to solve the cross-shard query problem.

[Read more]

Saga Pattern: Managing Distributed Transactions

2026-01-17sohilladhani
#architecture  #distributed-transactions  #microservices  #system-design  #patterns  #saga 

Why distributed ACID is a trap. Understanding choreography and orchestration sagas for long-running business processes.

[Read more]

Event Sourcing: Events as Source of Truth

2026-01-16sohilladhani
#architecture  #event-sourcing  #event-driven  #system-design  #patterns 

Storing events instead of current state. How event sourcing works, rebuilding state from events, and when the complexity is worth it.

[Read more]

CQRS: Separating Reads from Writes

2026-01-15sohilladhani
#architecture  #cqrs  #event-driven  #system-design  #patterns 

Command Query Responsibility Segregation - why you might want separate models for reading and writing data. When it helps, when it’s overkill, and implementation patterns.

[Read more]

Change Data Capture: Streaming Database Changes

2026-01-14sohilladhani
#database  #cdc  #streaming  #event-driven  #system-design 

How to capture and stream database changes in real-time. CDC patterns, implementation approaches, and when to use it instead of application-level events.

[Read more]

Two Generals Problem: Why Consensus is Impossible

2026-01-13sohilladhani
#distributed-systems  #consensus  #theory  #system-design 

The thought experiment that proves distributed consensus can’t be guaranteed over unreliable networks. Why acknowledgments create infinite regress and what it means for real systems.

[Read more]

Database Sharding: Splitting Data Across Machines

2026-01-12sohilladhani
#distributed-systems  #database  #sharding  #partitioning  #system-design 

How to partition database across multiple servers. Hash-based vs range-based sharding, rebalancing strategies, and the complexity that comes with it.

[Read more]

Rate Limiting: Token Bucket vs Leaky Bucket

2026-01-11sohilladhani
#distributed-systems  #rate-limiting  #algorithms  #java  #system-design 

Protecting services from overload with rate limiting. Token bucket and leaky bucket algorithms explained with Java implementations and real-world trade-offs.

[Read more]

Backpressure: When Consumers Can’t Keep Up

2026-01-10sohilladhani
#distributed-systems  #backpressure  #performance  #java  #system-design 

Handling slow consumers in distributed systems. Queue growth, memory exhaustion, and strategies for applying backpressure - rejection, rate limiting, and flow control.

[Read more]

Retry Strategies: Exponential Backoff and Jitter

2026-01-09sohilladhani
#distributed-systems  #reliability  #retry  #java  #system-design  #algorithms 

How to retry failed requests without overwhelming servers. Exponential backoff, jitter, and when to give up. Java implementations and real-world patterns.

[Read more]

Idempotency: Why Retries Need It

2026-01-08sohilladhani
#distributed-systems  #idempotency  #reliability  #java  #system-design 

How to make operations safe to retry. Idempotency keys, database patterns, and why retrying non-idempotent operations causes data corruption.

[Read more]

Session Guarantees: The Promises Your Database Makes to You

2026-01-07sohilladhani
#distributed-systems  #consistency  #databases  #session-guarantees  #system-design 

Read-your-writes and monotonic reads aren’t just buzzwords. They’re the difference between a database that feels broken and one that makes sense to users.

[Read more]

Horizontal vs Vertical Scaling: Bigger Machine or More Machines

2026-01-06sohilladhani
#distributed-systems  #scaling  #system-design  #architecture 

Comparing vertical scaling (scale up) and horizontal scaling (scale out). When to use each, trade-offs, and the complexity that comes with horizontal scaling.

[Read more]

Circuit Breakers: Failing Fast to Stay Alive

2026-01-05sohilladhani
#distributed-systems  #microservices  #circuit-breaker  #java  #resilience 

How circuit breakers prevent cascading failures in microservices. State transitions, Java implementation with Resilience4j, and real-world thresholds.

[Read more]

Load Balancing Strategies: Picking the Right Server

2026-01-04sohilladhani
#distributed-systems  #load-balancing  #system-design  #java  #algorithms 

Comparing load balancing algorithms - Round Robin, Least Connections, Weighted Round Robin, and IP Hash. Java implementations and real-world trade-offs.

[Read more]

Bloom Filters: Definitely Not Here

2026-01-03sohilladhani
#database  #bloom-filters  #data-structures  #system-design 

Bloom filters skip unnecessary disk reads in LSM trees by saying ‘definitely not here’ with zero false negatives. Learn how Cassandra and RocksDB use them.

[Read more]

Compaction Strategies: Cleaning Up After LSM Trees

2026-01-02sohilladhani
#database  #lsm-trees  #compaction  #system-design 

LSM trees create SSTables fast but need compaction. Learn size-tiered vs leveled compaction strategies and the write vs read amplification tradeoff.

[Read more]

LSM Trees vs B-Trees: Write Fast or Read Fast

2026-01-01sohilladhani
#database  #data-structures  #storage  #system-design 

LSM Trees vs B-Trees: the write-fast or read-fast tradeoff. Learn when to use B-trees (MySQL) vs LSM trees (Cassandra) based on your database workload.

[Read more]

Write-Ahead Logging: How Databases Survive Crashes

2025-12-31sohilladhani
#database  #durability  #wal  #system-design 

How do databases survive crashes and ensure durability? Learn how Write-Ahead Logging (WAL) uses sequential writes to guarantee data persistence without killing performance.

[Read more]
< [Newer posts] :: [Older posts] >
© 2026 by SOHIL LADHANI