| 1 | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 440 322" role="img" aria-labelledby="kvFlowTitle kvFlowDesc"> |
| 2 | <title id="kvFlowTitle">Each namespace resolves to one cell with one owner node and one writer</title> |
| 3 | <desc id="kvFlowDesc">Workers on nodes A, B, and C call two namespaces. The calls cross an empty |
| 4 | dashed layer, marked as the place where celld holds no cache, and reach two |
| 5 | namespace cells. The VALUES cell has owner node B and one writer, and the |
| 6 | SESSIONS cell has owner node C and one writer, so a second namespace adds a |
| 7 | second writer. Under the VALUES cell, a value of 1 MiB or less goes to an inline |
| 8 | row and a larger value goes to the fleet bucket. Every namespace splits the same |
| 9 | way.</desc> |
| 10 | <style> |
| 11 | .d-ink { color: #121212 } |
| 12 | .d-soft { color: #3d3b37 } |
| 13 | .d-faint { color: #6e6a62 } |
| 14 | .d-acc { color: #10803f } |
| 15 | .d-panel { color: #ffffff } |
| 16 | .d-sunk { color: #f0eee8 } |
| 17 | .d-tint { color: #d6efdf } |
| 18 | text { |
| 19 | font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; |
| 20 | font-size: 13px; |
| 21 | fill: currentColor; |
| 22 | } |
| 23 | @media (prefers-color-scheme: dark) { |
| 24 | .d-ink { color: #efede7 } |
| 25 | .d-soft { color: #c9c6be } |
| 26 | .d-faint { color: #928e85 } |
| 27 | .d-acc { color: #3fc472 } |
| 28 | .d-panel { color: #1a1a19 } |
| 29 | .d-sunk { color: #232321 } |
| 30 | .d-tint { color: #10301d } |
| 31 | } |
| 32 | </style> |
| 33 | <defs> |
| 34 | <marker id="kv-arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" |
| 35 | markerHeight="6" orient="auto-start-reverse"> |
| 36 | <path class="d-soft" fill="currentColor" d="M0 0 L10 5 L0 10 z" /> |
| 37 | </marker> |
| 38 | </defs> |
| 39 | |
| 40 | <!-- Callers: three nodes, two namespaces, reads and writes together. --> |
| 41 | <rect class="d-panel" fill="currentColor" x="6" y="8" width="136" height="48" rx="6" /> |
| 42 | <rect class="d-soft" fill="none" stroke="currentColor" x="6" y="8" width="136" height="48" rx="6" /> |
| 43 | <text class="d-ink" fill="currentColor" x="74" y="29" text-anchor="middle">Worker · node A</text> |
| 44 | <text class="d-soft" fill="currentColor" x="74" y="46" text-anchor="middle">VALUES.get()</text> |
| 45 | |
| 46 | <rect class="d-panel" fill="currentColor" x="152" y="8" width="136" height="48" rx="6" /> |
| 47 | <rect class="d-soft" fill="none" stroke="currentColor" x="152" y="8" width="136" height="48" rx="6" /> |
| 48 | <text class="d-ink" fill="currentColor" x="220" y="29" text-anchor="middle">Worker · node B</text> |
| 49 | <text class="d-soft" fill="currentColor" x="220" y="46" text-anchor="middle">VALUES.put()</text> |
| 50 | |
| 51 | <rect class="d-panel" fill="currentColor" x="298" y="8" width="136" height="48" rx="6" /> |
| 52 | <rect class="d-soft" fill="none" stroke="currentColor" x="298" y="8" width="136" height="48" rx="6" /> |
| 53 | <text class="d-ink" fill="currentColor" x="366" y="29" text-anchor="middle">Worker · node C</text> |
| 54 | <text class="d-soft" fill="currentColor" x="366" y="46" text-anchor="middle">SESSIONS.put()</text> |
| 55 | |
| 56 | <!-- The layer Cloudflare fills with a cache, and celld leaves empty. --> |
| 57 | <rect class="d-faint" fill="none" stroke="currentColor" stroke-dasharray="5 4" |
| 58 | x="6" y="76" width="428" height="48" rx="6" /> |
| 59 | <text class="d-faint" fill="currentColor" x="220" y="96" text-anchor="middle">no cache layer</text> |
| 60 | <text class="d-faint" fill="currentColor" x="220" y="114" text-anchor="middle">every call reaches the owner cell</text> |
| 61 | |
| 62 | <!-- The two callers of one namespace join; the third goes elsewhere. --> |
| 63 | <g class="d-soft" fill="none" stroke="currentColor" stroke-width="1.5"> |
| 64 | <path d="M74 56 V70" /> |
| 65 | <path d="M220 56 V70" /> |
| 66 | <path d="M60 70 H220" /> |
| 67 | <path d="M60 70 V142" marker-end="url(#kv-arrow)" /> |
| 68 | <path d="M366 56 V70 H380 V142" marker-end="url(#kv-arrow)" /> |
| 69 | </g> |
| 70 | |
| 71 | <!-- One namespace, one cell, one writer. A second namespace, a second writer. --> |
| 72 | <rect class="d-tint" fill="currentColor" x="16" y="146" width="200" height="72" rx="6" /> |
| 73 | <rect class="d-acc" fill="none" stroke="currentColor" stroke-width="2" x="16" y="146" width="200" height="72" rx="6" /> |
| 74 | <text class="d-ink" fill="currentColor" x="116" y="169" text-anchor="middle">VALUES cell</text> |
| 75 | <text class="d-soft" fill="currentColor" x="116" y="188" text-anchor="middle">owner: node B</text> |
| 76 | <text class="d-soft" fill="currentColor" x="116" y="207" text-anchor="middle">one writer</text> |
| 77 | |
| 78 | <rect class="d-tint" fill="currentColor" x="224" y="146" width="200" height="72" rx="6" /> |
| 79 | <rect class="d-acc" fill="none" stroke="currentColor" stroke-width="2" x="224" y="146" width="200" height="72" rx="6" /> |
| 80 | <text class="d-ink" fill="currentColor" x="324" y="169" text-anchor="middle">SESSIONS cell</text> |
| 81 | <text class="d-soft" fill="currentColor" x="324" y="188" text-anchor="middle">owner: node C</text> |
| 82 | <text class="d-soft" fill="currentColor" x="324" y="207" text-anchor="middle">one writer</text> |
| 83 | |
| 84 | <!-- Inside a cell, the value size selects the store. --> |
| 85 | <g class="d-soft" fill="none" stroke="currentColor" stroke-width="1.5"> |
| 86 | <path d="M70 218 V240 H65 V262" marker-end="url(#kv-arrow)" /> |
| 87 | <path d="M162 218 V240 H167 V262" marker-end="url(#kv-arrow)" /> |
| 88 | </g> |
| 89 | |
| 90 | <rect class="d-sunk" fill="currentColor" x="16" y="266" width="98" height="46" rx="6" /> |
| 91 | <rect class="d-soft" fill="none" stroke="currentColor" x="16" y="266" width="98" height="46" rx="6" /> |
| 92 | <text class="d-ink" fill="currentColor" x="65" y="287" text-anchor="middle">inline row</text> |
| 93 | <text class="d-soft" fill="currentColor" x="65" y="304" text-anchor="middle">1 MiB or less</text> |
| 94 | |
| 95 | <rect class="d-sunk" fill="currentColor" x="118" y="266" width="98" height="46" rx="6" /> |
| 96 | <rect class="d-soft" fill="none" stroke="currentColor" x="118" y="266" width="98" height="46" rx="6" /> |
| 97 | <text class="d-ink" fill="currentColor" x="167" y="287" text-anchor="middle">fleet bucket</text> |
| 98 | <text class="d-soft" fill="currentColor" x="167" y="304" text-anchor="middle">above 1 MiB</text> |
| 99 | |
| 100 | <text class="d-faint" fill="currentColor" x="324" y="287" text-anchor="middle">every namespace splits</text> |
| 101 | <text class="d-faint" fill="currentColor" x="324" y="304" text-anchor="middle">the same way</text> |
| 102 | </svg> |