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
messaging

Messaging Patterns

Asynchronous communication primitives for decoupling services and ensuring reliable message delivery.

// concept

Messaging enables services to communicate without tight coupling. Producers emit messages; consumers process them. The challenge: choosing the right delivery guarantees, ordering, and failure handling.

In-Memory Queue

FIFO queue for decoupling producers and consumers. Simple async communication within a single process.

Pub/Sub Broker

Publishers emit events to topics, subscribers receive matching messages. Decouples producers from consumers.

At-Most-Once

Fire and forget delivery. Messages may be lost but are never duplicated. Lowest latency guarantee.

At-Least-Once

Retry until acknowledged. Messages are never lost but may be delivered multiple times.

Dead Letter Queue

Route failed messages to a separate queue for inspection. Prevents poison messages from blocking processing.

Consumer Groups

Distribute partitions across consumers in a group. Enables parallel processing with load balancing.

Partitioned Log

Kafka-style append-only log split into partitions. Ordered within partition, parallel across partitions.