Diffinery

homeflare/celldpublic

celld/docs/services/r2-flow.svg
64 lines · 4.3 KBRaw History
1<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 440 416" role="img" aria-labelledby="r2FlowTitle r2FlowDesc">
2 <title id="r2FlowTitle">Two R2 bindings share one fleet object store under reserved prefixes</title>
3 <desc id="r2FlowDesc">Two Workers each hold an R2 binding. The binding FILES has the bucket name example-files, and the binding CACHE has the bucket name renders. Both Workers write the same key, photo.png. Both bindings use one fleet object-store bucket, which is an s3, gs, or az bucket, so that store gives the binding its durability. celld turns each key into r2 slash bucket name slash key, so the two writes become the separate objects r2/example-files/photo.png and r2/renders/photo.png. The fleet's own keys, under deploy, cells, nodes, and wake, live in the same bucket outside every r2 prefix, and no binding can reach them.</desc>
4 <style>
5 svg { font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; }
6 text { font-size: 13px; fill: currentColor; }
7 .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
8 .lead { font-weight: 600; }
9 .d-ink { color: #121212; }
10 .d-soft { color: #3d3b37; }
11 .d-faint { color: #6e6a62; }
12 .d-acc { color: #10803f; }
13 .d-panel { color: #ffffff; }
14 .d-sunk { color: #f0eee8; }
15 .d-tint { color: #d6efdf; }
16 @media (prefers-color-scheme: dark) {
17 .d-ink { color: #efede7; }
18 .d-soft { color: #c9c6be; }
19 .d-faint { color: #928e85; }
20 .d-acc { color: #3fc472; }
21 .d-panel { color: #1a1a19; }
22 .d-sunk { color: #232321; }
23 .d-tint { color: #10301d; }
24 }
25 </style>
26
27 <!-- Two Workers, two bindings, the same key -->
28 <rect class="d-panel" x="8" y="10" width="200" height="86" rx="10" fill="currentColor" />
29 <rect class="d-faint" x="8" y="10" width="200" height="86" rx="10" fill="none" stroke="currentColor" />
30 <text class="d-faint" x="20" y="34">Worker A, binding FILES</text>
31 <text class="d-ink mono" x="20" y="58">put("photo.png")</text>
32 <text class="d-acc" x="20" y="80">bucket_name: example-files</text>
33
34 <rect class="d-panel" x="232" y="10" width="200" height="86" rx="10" fill="currentColor" />
35 <rect class="d-faint" x="232" y="10" width="200" height="86" rx="10" fill="none" stroke="currentColor" />
36 <text class="d-faint" x="244" y="34">Worker B, binding CACHE</text>
37 <text class="d-ink mono" x="244" y="58">put("photo.png")</text>
38 <text class="d-acc" x="244" y="80">bucket_name: renders</text>
39
40 <!-- Both bindings fan in to one store -->
41 <path class="d-faint" d="M108 96 C108 134 220 130 220 156" fill="none" stroke="currentColor" stroke-width="1.5" />
42 <path class="d-faint" d="M332 96 C332 134 220 130 220 156" fill="none" stroke="currentColor" stroke-width="1.5" />
43 <path class="d-faint" d="M220 168 L214 154 L226 154 Z" fill="currentColor" />
44 <text class="d-faint" x="220" y="130" text-anchor="middle">one store</text>
45
46 <!-- The fleet object store -->
47 <rect class="d-sunk" x="8" y="172" width="424" height="234" rx="12" fill="currentColor" />
48 <rect class="d-faint" x="8" y="172" width="424" height="234" rx="12" fill="none" stroke="currentColor" />
49 <text class="d-ink lead" x="24" y="198">Fleet object-store bucket</text>
50 <text class="d-faint" x="24" y="218">s3:// gs:// az:// — durability comes from here</text>
51
52 <rect class="d-tint" x="22" y="228" width="396" height="108" rx="8" fill="currentColor" />
53 <rect class="d-acc" x="22" y="228" width="396" height="108" rx="8" fill="none" stroke="currentColor" stroke-dasharray="5 4" />
54 <text class="d-acc" x="36" y="252">reserved r2/ prefixes, one per bucket_name</text>
55 <text class="d-ink mono" x="36" y="280"><tspan class="d-acc" fill="currentColor">r2/example-files/</tspan>photo.png</text>
56 <text class="d-faint" x="404" y="280" text-anchor="end">FILES</text>
57 <text class="d-ink mono" x="36" y="304"><tspan class="d-acc" fill="currentColor">r2/renders/</tspan>photo.png</text>
58 <text class="d-faint" x="404" y="304" text-anchor="end">CACHE</text>
59 <text class="d-ink mono" x="36" y="328"><tspan class="d-acc" fill="currentColor">r2/renders/</tspan>tile-04.png</text>
60 <text class="d-faint" x="404" y="328" text-anchor="end">CACHE</text>
61
62 <text class="d-soft mono" x="24" y="366">deploy/ cells/ nodes/ wake/</text>
63 <text class="d-faint" x="24" y="388">fleet keys, outside every binding's reach</text>
64</svg>