sys-d
// distributed systems lab
Fixed Window CounterSliding Window LogSliding Window CounterToken BucketLeaky Bucket
Circuit BreakerRetry with BackoffTimeout WrapperBulkheadHedged RequestsFallback Strategy
LRU CacheLFU CacheTTL CacheCache AsideWrite-Through/BackCache StampedeBloom Filter
Round RobinWeighted Round RobinLeast ConnectionsIP HashingConsistent Hashing
In-Memory QueuePub/Sub BrokerAt-Most-OnceAt-Least-OnceDead Letter QueueConsumer GroupsPartitioned Log
Distributed LockLeader ElectionHeartbeat MonitorService RegistryService Discovery
Primary-ReplicaRead/Write QuorumVector ClocksCRDT Counters
Two Phase CommitThree Phase CommitSimplified Raft
Key-Value StoreAppend-Only LogWrite Ahead LogSSTableLSM Tree
Metrics CollectorHistogramStructured LoggerTrace ID Propagation
JWT ValidationAPI Key ValidationIdempotency KeyHMAC Verification
v1.0 · MIT
load balancing

Load Balancing Algorithms

Distribute incoming traffic across multiple servers to maximize throughput and minimize response time.

// concept

Load balancers act as reverse proxies, distributing client requests across backend servers. The algorithm determines which server handles each request.

Round Robin

Distribute requests sequentially across servers in a circular order. Simple and fair for uniform workloads.

Weighted Round Robin

Assign weights to servers based on capacity. Higher-weight servers receive proportionally more traffic.

Least Connections

Route to the server with the fewest active connections. Adapts to varying request durations.

IP Hashing

Hash client IP to deterministically select a server. Ensures session affinity without shared state.

Consistent Hashing

Map keys to a ring of nodes. Adding/removing nodes only redistributes a fraction of keys.