{"type":"excalidraw","version":2,"source":"https://AwesomeSystemDesign.dev","elements":[{"angle":0,"strokeColor":"#6577aa","backgroundColor":"#eef1fc","fillStyle":"solid","strokeWidth":1.5,"strokeStyle":"solid","roughness":0.7,"opacity":100,"version":1,"versionNonce":1,"isDeleted":false,"groupIds":["step-1"],"frameId":null,"roundness":null,"boundElements":[{"type":"text","id":"shape-1"}],"updated":0,"link":null,"locked":false,"id":"shape-0","type":"rectangle","seed":41,"x":16,"y":16,"width":288,"height":608,"customData":{"revealStep":1}},{"angle":0,"strokeColor":"#394557","backgroundColor":"transparent","fillStyle":"solid","strokeWidth":1.5,"strokeStyle":"solid","roughness":0.7,"opacity":100,"version":1,"versionNonce":1,"isDeleted":false,"groupIds":["step-1"],"frameId":null,"roundness":null,"boundElements":null,"updated":0,"link":null,"locked":false,"id":"shape-1","type":"text","seed":114,"x":36,"y":34,"width":248,"height":572,"fontSize":22,"fontFamily":1,"text":"CLIENT LAYER\n\n• Connection Pool\n(reuse TCP conns,\nmultiplexing)\n\n• Consistent Hash\nRouter (key → shard\nmapping)\n\n• Circuit Breaker\n(fail fast if shard is\ndown)\n\n• Read-Through /\nWrite-Through Logic\n\n• Local L1 Cache\n(in-process cache for\nhottest keys)","originalText":"CLIENT LAYER\n\n• Connection Pool\n(reuse TCP conns,\nmultiplexing)\n\n• Consistent Hash\nRouter (key → shard\nmapping)\n\n• Circuit Breaker\n(fail fast if shard is\ndown)\n\n• Read-Through /\nWrite-Through Logic\n\n• Local L1 Cache\n(in-process cache for\nhottest keys)","textAlign":"left","verticalAlign":"middle","containerId":"shape-0","lineHeight":1.3,"autoResize":false,"customData":{"revealStep":1}},{"angle":0,"strokeColor":"#6577aa","backgroundColor":"#eef1fc","fillStyle":"solid","strokeWidth":1.5,"strokeStyle":"solid","roughness":0.7,"opacity":100,"version":1,"versionNonce":1,"isDeleted":false,"groupIds":["step-2"],"frameId":null,"roundness":null,"boundElements":[{"type":"text","id":"shape-3"}],"updated":0,"link":null,"locked":false,"id":"shape-2","type":"rectangle","seed":187,"x":16,"y":668,"width":288,"height":1037,"customData":{"revealStep":2}},{"angle":0,"strokeColor":"#394557","backgroundColor":"transparent","fillStyle":"solid","strokeWidth":1.5,"strokeStyle":"solid","roughness":0.7,"opacity":100,"version":1,"versionNonce":1,"isDeleted":false,"groupIds":["step-2"],"frameId":null,"roundness":null,"boundElements":null,"updated":0,"link":null,"locked":false,"id":"shape-3","type":"text","seed":260,"x":36,"y":686,"width":248,"height":1001,"fontSize":22,"fontFamily":1,"text":"CACHE NODE (per\nshard)\n\n• Event Loop\n(single-threaded)\nCommand Parser →\nExecute → Response\n• I/O Threads (6)\nread/write socket\nbuffers\n\n• Hash Table (main\ndict)\nkey → value pointer\nOpen addressing /\nchained hashing\nIncremental rehashing\n\n• Expiry Hash Table\n(keys with TTL →\nlazy + active expiry)\n\n• Eviction Engine\n(LRU / LFU / random\n/ volatile-lru /\nallkeys-lru)\n\n• Persistence Engine\n(RDB fork +\nsnapshot / AOF\nappend + rewrite)\n\n• Replication Engine\n(async replication to\nreplicas, repl backlog)","originalText":"CACHE NODE (per\nshard)\n\n• Event Loop\n(single-threaded)\nCommand Parser →\nExecute → Response\n• I/O Threads (6)\nread/write socket\nbuffers\n\n• Hash Table (main\ndict)\nkey → value pointer\nOpen addressing /\nchained hashing\nIncremental rehashing\n\n• Expiry Hash Table\n(keys with TTL →\nlazy + active expiry)\n\n• Eviction Engine\n(LRU / LFU / random\n/ volatile-lru /\nallkeys-lru)\n\n• Persistence Engine\n(RDB fork +\nsnapshot / AOF\nappend + rewrite)\n\n• Replication Engine\n(async replication to\nreplicas, repl backlog)","textAlign":"left","verticalAlign":"middle","containerId":"shape-2","lineHeight":1.3,"autoResize":false,"customData":{"revealStep":2}},{"angle":0,"strokeColor":"#6577aa","backgroundColor":"#eef1fc","fillStyle":"solid","strokeWidth":1.5,"strokeStyle":"solid","roughness":0.7,"opacity":100,"version":1,"versionNonce":1,"isDeleted":false,"groupIds":["step-3"],"frameId":null,"roundness":null,"boundElements":[{"type":"text","id":"shape-5"}],"updated":0,"link":null,"locked":false,"id":"shape-4","type":"rectangle","seed":333,"x":16,"y":1749,"width":288,"height":493.6,"customData":{"revealStep":3}},{"angle":0,"strokeColor":"#394557","backgroundColor":"transparent","fillStyle":"solid","strokeWidth":1.5,"strokeStyle":"solid","roughness":0.7,"opacity":100,"version":1,"versionNonce":1,"isDeleted":false,"groupIds":["step-3"],"frameId":null,"roundness":null,"boundElements":null,"updated":0,"link":null,"locked":false,"id":"shape-5","type":"text","seed":406,"x":36,"y":1767,"width":248,"height":457.6,"fontSize":22,"fontFamily":1,"text":"CLUSTER\nMANAGEMENT\n\n• Cluster Bus (gossip\nprotocol, node\ndiscovery, failure\ndetection)\n\n• Sentinel / Raft\n(failure detection,\nautomatic leader\nelection)\n\n• Slot Migration\n(rebalance when\nadd/remove nodes)","originalText":"CLUSTER\nMANAGEMENT\n\n• Cluster Bus (gossip\nprotocol, node\ndiscovery, failure\ndetection)\n\n• Sentinel / Raft\n(failure detection,\nautomatic leader\nelection)\n\n• Slot Migration\n(rebalance when\nadd/remove nodes)","textAlign":"left","verticalAlign":"middle","containerId":"shape-4","lineHeight":1.3,"autoResize":false,"customData":{"revealStep":3}}],"appState":{"viewBackgroundColor":"#fbfbf8","gridSize":null},"files":{}}