ARCHOS 525 BLUEPRINT · /d/dgm_int-memcached
Memcached Internals (Slab Allocator, Multi-Thread LRU & Consistent Hash)
6 COMPONENTS · 6 FLOWS · UPDATED 2026-11-24
GITHUB README / PR PREVIEW CARD
[](https://archos.sageideas.dev/d/dgm_int-memcached) *Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_int-memcached)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_int-memcached" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Memcached Internals (Slab Allocator, Multi-Thread LRU & Consistent Hash) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
client_0["Stateless App Fleet"]
n1_1["Client Hash Router"]
n2a_2["Multi-Thread Worker"]
n2b_3[("Slab Class Allocator")]
n3_4["Segmented LRU Evict"]
downstream_5["Downstream & OTel"]
client_0 -->|"1. Hash key · TCP"| n1_1
n1_1 -->|"2a. Get/Set · Memc"| n2a_2
n1_1 -.->|"2b. Alloc slab · RAM"| n2b_3
n2a_2 -->|"3a. Evict LRU · RAM"| n3_4
n2b_3 -->|"3b. Sync · Control"| n3_4
n3_4 -.->|"4. Emit / · OTLP/API"| downstream_5COMPONENT STACK (6)
- Stateless App FleetSTATELESSSub-ms ephemeral KV cache
- Client Hash RouterSTATELESSKetama/Maglev shard picker
- Multi-Thread WorkerSTATELESSLibevent epoll + item locks
- Slab Class AllocatorSTATEFULPre-sized 1MB pages
- Segmented LRU EvictSTATELESSHOT/WARM/COLD eviction tail
- Downstream & OTelSTATELESSConsumers, metrics & SLOs
REQUEST & DATA FLOW (6)
- Stateless App Fleet → Client Hash Router (Hash key)[TCP]
- Client Hash Router → Multi-Thread Worker (Get/Set)[Memc]
- Client Hash Router → Slab Class Allocator (Alloc slab)[RAM]
- Multi-Thread Worker → Segmented LRU Evict (Evict LRU)[RAM]
- Slab Class Allocator → Segmented LRU Evict (Sync)[Control]
- Segmented LRU Evict → Downstream & OTel (Emit /)[OTLP/API]