Tag: design-concurrency
All the articles with the tag "design-concurrency".
-
System Design - How Database Connection Pooling Works
How database connection pooling works: the cost of raw connections, pool lifecycle, idle/active management, connection multiplexing modes, HikariCP internals, and PgBouncer architecture with source code walkthrough.
-
System Design - How Paxos Consensus Works
How Paxos distributed consensus works: the protocol phases, roles (proposer, acceptor, learner), Multi-Paxos optimization, comparison with Raft, and real-world implementations in Google Chubby, Apache ZooKeeper, and Spanner.
-
System Design - How Coroutines and Async/Await Work Under the Hood
How coroutines power async/await: the difference between stackful and stackless coroutines, how Python transforms async functions into state machines, how Go's goroutines use stack-copying, and how the event loop ties it all together.
-
System Design - How Database Deadlock Detection Works
How databases detect deadlocks: the wait-for graph algorithm, cycle detection via DFS, InnoDB's implementation, victim selection strategies, and how distributed databases like TiDB handle cross-node deadlocks.
-
System Design - How Raft Consensus Works
How the Raft consensus algorithm works: leader election, log replication, safety guarantees, membership changes, and a source code walkthrough from etcd's raft library.
-
System Design - How Lock-Free Data Structures Work
How lock-free data structures work: CAS operations, memory ordering, the ABA problem, lock-free stacks and queues, and source code walkthrough from the Linux kernel and Java's java.util.concurrent.