From 9168dbdd8fe9b735a53b9519942439a5d2c27cd3 Mon Sep 17 00:00:00 2001 From: Araon Date: Sun, 6 Sep 2026 02:23:55 +0530 Subject: [PATCH] docs: add hand-drawn architecture diagram to README --- README.md | 15 +- docs/architecture.excalidraw | 2886 ++++++++++++++++++++++++++++++++++ docs/architecture.svg | 2 + 3 files changed, 2891 insertions(+), 12 deletions(-) create mode 100644 docs/architecture.excalidraw create mode 100644 docs/architecture.svg diff --git a/README.md b/README.md index f449a2e..cfcfec3 100644 --- a/README.md +++ b/README.md @@ -6,18 +6,9 @@ A warm auction does not call Redis or a DSP. The server ranks bids by priority, ## Design -```mermaid -flowchart LR - Admin["Admin client"] -->|"versioned bid change"| Redis[(Redis)] - Redis -->|"invalidation"| Cache["Local bid snapshot"] - Redis -.->|"reconciliation"| Cache - - Client["Auction client"] -->|"POST /v1/auction"| Server["Go server"] - Cache -->|"local read"| Server - DSP["DSP endpoints"] -.->|"background refresh"| Dynamic["Local DSP cache"] - Dynamic -->|"fresh bids"| Server - Server --> Decision["winner or no_bid"] -``` +![Adserver architecture showing the local auction path, Redis bid distribution, background DSP refreshes, and monitoring](docs/architecture.svg) + +[Editable Excalidraw diagram](docs/architecture.excalidraw) Redis is the source of truth for active bids. Pub/Sub invalidations tell each server to refresh a placement. diff --git a/docs/architecture.excalidraw b/docs/architecture.excalidraw new file mode 100644 index 0000000..522a3ba --- /dev/null +++ b/docs/architecture.excalidraw @@ -0,0 +1,2886 @@ +{ + "type": "excalidraw", + "version": 2, + "source": "mcp-excalidraw-server", + "elements": [ + { + "id": "process", + "type": "rectangle", + "x": 380, + "y": 160, + "width": 1000, + "height": 1140, + "angle": 0, + "backgroundColor": "#f3f0ff", + "boundElements": null, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "index": "a0", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 2, + "roundness": { + "type": 3 + }, + "seed": 693805472, + "strokeColor": "#9c36b5", + "strokeStyle": "solid", + "strokeWidth": 2, + "updated": 1788641558574, + "version": 1, + "versionNonce": 452863072 + }, + { + "id": "title", + "type": "text", + "x": 40, + "y": 20, + "width": 441.3333435058594, + "height": 41.4, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": null, + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 36, + "frameId": null, + "groupIds": [], + "index": "a1", + "isDeleted": false, + "lineHeight": 1.15, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "Adserver • system architecture", + "roughness": 0, + "roundness": null, + "seed": 1890462112, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "Adserver • system architecture", + "textAlign": "left", + "updated": 1788641558574, + "version": 1, + "versionNonce": 1733283232, + "verticalAlign": "top" + }, + { + "id": "subtitle", + "type": "text", + "x": 40, + "y": 75, + "width": 642.2000122070312, + "height": 23, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": null, + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 20, + "frameId": null, + "groupIds": [], + "index": "a2", + "isDeleted": false, + "lineHeight": 1.15, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "Current repository design | Warm auctions have no Redis or DSP network calls", + "roughness": 0, + "roundness": null, + "seed": 1473953888, + "strokeColor": "#495057", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "Current repository design | Warm auctions have no Redis or DSP network calls", + "textAlign": "left", + "updated": 1788641558574, + "version": 1, + "versionNonce": 1351965792, + "verticalAlign": "top" + }, + { + "id": "process-label", + "type": "text", + "x": 410, + "y": 180, + "width": 310.76666259765625, + "height": 27.599999999999998, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": null, + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 24, + "frameId": null, + "groupIds": [], + "index": "a3", + "isDeleted": false, + "lineHeight": 1.15, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "GO ADSERVER · per instance", + "roughness": 0, + "roundness": null, + "seed": 947385760, + "strokeColor": "#9c36b5", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "GO ADSERVER · per instance", + "textAlign": "left", + "updated": 1788641558574, + "version": 1, + "versionNonce": 860166560, + "verticalAlign": "top" + }, + { + "id": "client", + "type": "rectangle", + "x": 40, + "y": 300, + "width": 230, + "height": 110, + "angle": 0, + "backgroundColor": "#a5d8ff", + "boundElements": [ + { + "id": "zTCDt0Ho5CMd77fbLDtcY", + "type": "text" + }, + { + "id": "request", + "type": "arrow" + } + ], + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "index": "a4", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 2, + "roundness": { + "type": 3 + }, + "seed": 593736800, + "strokeColor": "#1971c2", + "strokeStyle": "solid", + "strokeWidth": 2, + "updated": 1788641558574, + "version": 1, + "versionNonce": 1182052768 + }, + { + "id": "auction", + "type": "rectangle", + "x": 440, + "y": 280, + "width": 360, + "height": 150, + "angle": 0, + "backgroundColor": "#eebefa", + "boundElements": [ + { + "id": "h0XuaJW4ajZqoxHdONdoD", + "type": "text" + }, + { + "id": "request", + "type": "arrow" + }, + { + "id": "response", + "type": "arrow" + }, + { + "id": "read-snapshot", + "type": "arrow" + }, + { + "id": "read-dsp", + "type": "arrow" + }, + { + "id": "logs", + "type": "arrow" + } + ], + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "index": "a5", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 2, + "roundness": { + "type": 3 + }, + "seed": 2099790240, + "strokeColor": "#9c36b5", + "strokeStyle": "solid", + "strokeWidth": 2, + "updated": 1788641558574, + "version": 1, + "versionNonce": 978040224 + }, + { + "id": "snapshot", + "type": "rectangle", + "x": 440, + "y": 550, + "width": 360, + "height": 130, + "angle": 0, + "backgroundColor": "#99e9f2", + "boundElements": [ + { + "id": "P17GHAQ_16UkG0R1YBHlt", + "type": "text" + }, + { + "id": "read-snapshot", + "type": "arrow" + }, + { + "id": "replace", + "type": "arrow" + } + ], + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "index": "a6", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 2, + "roundness": { + "type": 3 + }, + "seed": 2041456736, + "strokeColor": "#0c8599", + "strokeStyle": "dashed", + "strokeWidth": 2, + "updated": 1788641558574, + "version": 1, + "versionNonce": 1173600672 + }, + { + "id": "dspcache", + "type": "rectangle", + "x": 910, + "y": 550, + "width": 390, + "height": 130, + "angle": 0, + "backgroundColor": "#99e9f2", + "boundElements": [ + { + "id": "CdM3RU_4G0JG3Y-zgJ-P0", + "type": "text" + }, + { + "id": "read-dsp", + "type": "arrow" + }, + { + "id": "dsp-refresh", + "type": "arrow" + } + ], + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "index": "a7", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 2, + "roundness": { + "type": 3 + }, + "seed": 1575947680, + "strokeColor": "#0c8599", + "strokeStyle": "dashed", + "strokeWidth": 2, + "updated": 1788641558574, + "version": 1, + "versionNonce": 1246351776 + }, + { + "id": "result", + "type": "rectangle", + "x": 940, + "y": 300, + "width": 310, + "height": 110, + "angle": 0, + "backgroundColor": "#a5d8ff", + "boundElements": [ + { + "id": "HfjV3O53SF5b4mn0PzSLL", + "type": "text" + }, + { + "id": "response", + "type": "arrow" + } + ], + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "index": "a8", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 2, + "roundness": { + "type": 3 + }, + "seed": 109714528, + "strokeColor": "#1971c2", + "strokeStyle": "solid", + "strokeWidth": 2, + "updated": 1788641558574, + "version": 1, + "versionNonce": 775872928 + }, + { + "id": "admin", + "type": "rectangle", + "x": 40, + "y": 800, + "width": 230, + "height": 110, + "angle": 0, + "backgroundColor": "#a5d8ff", + "boundElements": [ + { + "id": "2bw8zvN5KEkAETsZqCkd_", + "type": "text" + }, + { + "id": "mutate", + "type": "arrow" + } + ], + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "index": "a9", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 2, + "roundness": { + "type": 3 + }, + "seed": 335305120, + "strokeColor": "#1971c2", + "strokeStyle": "solid", + "strokeWidth": 2, + "updated": 1788641558574, + "version": 1, + "versionNonce": 1577796000 + }, + { + "id": "adminapi", + "type": "rectangle", + "x": 440, + "y": 800, + "width": 360, + "height": 130, + "angle": 0, + "backgroundColor": "#eebefa", + "boundElements": [ + { + "id": "do--wYvo5OjlMZ3pxMDCE", + "type": "text" + }, + { + "id": "mutate", + "type": "arrow" + }, + { + "id": "lua", + "type": "arrow" + } + ], + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "index": "aA", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 2, + "roundness": { + "type": 3 + }, + "seed": 2076676192, + "strokeColor": "#9c36b5", + "strokeStyle": "solid", + "strokeWidth": 2, + "updated": 1788641558574, + "version": 1, + "versionNonce": 2051220896 + }, + { + "id": "redis-cylinder-bottom", + "type": "ellipse", + "x": 1480, + "y": 918, + "width": 360, + "height": 44, + "angle": 0, + "backgroundColor": "#99e9f2", + "boundElements": null, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "index": "aAV", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 2, + "roundness": { + "type": 3 + }, + "seed": 871244, + "strokeColor": "#0c8599", + "strokeStyle": "solid", + "strokeWidth": 2, + "updated": 1788641558575, + "version": 1, + "versionNonce": 159532448 + }, + { + "id": "redis", + "type": "rectangle", + "x": 1480, + "y": 790, + "width": 360, + "height": 150, + "angle": 0, + "backgroundColor": "#99e9f2", + "boundElements": [ + { + "id": "cYlcmF5py2A-mzFdQk-18", + "type": "text" + }, + { + "id": "lua", + "type": "arrow" + }, + { + "id": "invalidate", + "type": "arrow" + } + ], + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "index": "aB", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 2, + "roundness": { + "type": 3 + }, + "seed": 847259040, + "strokeColor": "#0c8599", + "strokeStyle": "solid", + "strokeWidth": 2, + "updated": 1788641558574, + "version": 1, + "versionNonce": 1632995744 + }, + { + "id": "redis-cylinder-top", + "type": "ellipse", + "x": 1480, + "y": 768, + "width": 360, + "height": 44, + "angle": 0, + "backgroundColor": "#99e9f2", + "boundElements": null, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "index": "aBV", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 2, + "roundness": { + "type": 3 + }, + "seed": 521123, + "strokeColor": "#0c8599", + "strokeStyle": "solid", + "strokeWidth": 2, + "updated": 1788641558575, + "version": 1, + "versionNonce": 2061919328 + }, + { + "id": "refresh", + "type": "rectangle", + "x": 910, + "y": 800, + "width": 390, + "height": 130, + "angle": 0, + "backgroundColor": "#eebefa", + "boundElements": [ + { + "id": "aHBFXmjOoPlJVHt4Uvexd", + "type": "text" + }, + { + "id": "invalidate", + "type": "arrow" + }, + { + "id": "replace", + "type": "arrow" + } + ], + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "index": "aC", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 2, + "roundness": { + "type": 3 + }, + "seed": 1362527328, + "strokeColor": "#9c36b5", + "strokeStyle": "solid", + "strokeWidth": 2, + "updated": 1788641558574, + "version": 1, + "versionNonce": 1397910944 + }, + { + "id": "dsp", + "type": "rectangle", + "x": 1480, + "y": 540, + "width": 360, + "height": 150, + "angle": 0, + "backgroundColor": "#e9ecef", + "boundElements": [ + { + "id": "-e6FsKkYrbyeDV12iV_5D", + "type": "text" + }, + { + "id": "dsp-refresh", + "type": "arrow" + } + ], + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "index": "aD", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 2, + "roundness": { + "type": 3 + }, + "seed": 1722446240, + "strokeColor": "#868e96", + "strokeStyle": "solid", + "strokeWidth": 2, + "updated": 1788641558574, + "version": 1, + "versionNonce": 811507104 + }, + { + "id": "log", + "type": "rectangle", + "x": 440, + "y": 1110, + "width": 360, + "height": 120, + "angle": 0, + "backgroundColor": "#e9ecef", + "boundElements": [ + { + "id": "PiEDOChl6w9y7WHJH3KGm", + "type": "text" + }, + { + "id": "logs", + "type": "arrow" + } + ], + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "index": "aE", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 2, + "roundness": { + "type": 3 + }, + "seed": 78051424, + "strokeColor": "#868e96", + "strokeStyle": "solid", + "strokeWidth": 2, + "updated": 1788641558574, + "version": 1, + "versionNonce": 243532192 + }, + { + "id": "metrics", + "type": "rectangle", + "x": 910, + "y": 1110, + "width": 390, + "height": 120, + "angle": 0, + "backgroundColor": "#e9ecef", + "boundElements": [ + { + "id": "WpMgRFk7_k6HgBMBRGP-v", + "type": "text" + }, + { + "id": "scrape", + "type": "arrow" + } + ], + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "index": "aF", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 2, + "roundness": { + "type": 3 + }, + "seed": 933969312, + "strokeColor": "#868e96", + "strokeStyle": "solid", + "strokeWidth": 2, + "updated": 1788641558574, + "version": 1, + "versionNonce": 1282663840 + }, + { + "id": "prom", + "type": "rectangle", + "x": 1480, + "y": 1110, + "width": 360, + "height": 120, + "angle": 0, + "backgroundColor": "#e9ecef", + "boundElements": [ + { + "id": "-hfzjaFH0zeb5PqZUpyr1", + "type": "text" + }, + { + "id": "scrape", + "type": "arrow" + }, + { + "id": "query", + "type": "arrow" + }, + { + "id": "alerts", + "type": "arrow" + } + ], + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "index": "aG", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 2, + "roundness": { + "type": 3 + }, + "seed": 1508437088, + "strokeColor": "#868e96", + "strokeStyle": "solid", + "strokeWidth": 2, + "updated": 1788641558574, + "version": 1, + "versionNonce": 1328570784 + }, + { + "id": "graf", + "type": "rectangle", + "x": 1480, + "y": 1350, + "width": 170, + "height": 90, + "angle": 0, + "backgroundColor": "#e9ecef", + "boundElements": [ + { + "id": "be9cMuY3aHxBtXgqkIQIe", + "type": "text" + }, + { + "id": "query", + "type": "arrow" + } + ], + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "index": "aH", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 2, + "roundness": { + "type": 3 + }, + "seed": 1186105760, + "strokeColor": "#868e96", + "strokeStyle": "solid", + "strokeWidth": 2, + "updated": 1788641558574, + "version": 1, + "versionNonce": 934215072 + }, + { + "id": "alert", + "type": "rectangle", + "x": 1710, + "y": 1350, + "width": 220, + "height": 90, + "angle": 0, + "backgroundColor": "#e9ecef", + "boundElements": [ + { + "id": "zcJHNyOvrycetd_dUrNSk", + "type": "text" + }, + { + "id": "alerts", + "type": "arrow" + } + ], + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "index": "aI", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 2, + "roundness": { + "type": 3 + }, + "seed": 449601632, + "strokeColor": "#868e96", + "strokeStyle": "solid", + "strokeWidth": 2, + "updated": 1788641558574, + "version": 1, + "versionNonce": 2045980064 + }, + { + "id": "request", + "type": "arrow", + "x": 278, + "y": 355, + "width": 152.5, + "height": 0, + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "Mz3qTzgPoITbm6zq_qquc", + "type": "text" + } + ], + "elbowed": false, + "endArrowhead": "arrow", + "endBinding": { + "elementId": "auction", + "fixedPoint": null, + "focus": 0, + "gap": 8 + }, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "index": "aJ", + "isDeleted": false, + "lastCommittedPoint": null, + "link": null, + "locked": false, + "opacity": 100, + "points": [ + [ + 0.5, + 0 + ], + [ + 152.5, + 0 + ] + ], + "roughness": 2, + "roundness": null, + "seed": 250631584, + "startArrowhead": null, + "startBinding": { + "elementId": "client", + "fixedPoint": null, + "focus": 0, + "gap": 8 + }, + "strokeColor": "#1971c2", + "strokeStyle": "solid", + "strokeWidth": 2, + "updated": 1788641558574, + "version": 1, + "versionNonce": 228636768 + }, + { + "id": "response", + "type": "arrow", + "x": 808, + "y": 355, + "width": 122.5, + "height": 0, + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "r4Mk4IeeVyrkrUULj0GSB", + "type": "text" + } + ], + "elbowed": false, + "endArrowhead": "arrow", + "endBinding": { + "elementId": "result", + "fixedPoint": null, + "focus": 0, + "gap": 8 + }, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "index": "aK", + "isDeleted": false, + "lastCommittedPoint": null, + "link": null, + "locked": false, + "opacity": 100, + "points": [ + [ + 0.5, + 0 + ], + [ + 122.5, + 0 + ] + ], + "roughness": 2, + "roundness": null, + "seed": 1461802080, + "startArrowhead": null, + "startBinding": { + "elementId": "auction", + "fixedPoint": null, + "focus": 0, + "gap": 8 + }, + "strokeColor": "#1971c2", + "strokeStyle": "solid", + "strokeWidth": 2, + "updated": 1788641558574, + "version": 1, + "versionNonce": 1702040672 + }, + { + "id": "read-snapshot", + "type": "arrow", + "x": 620, + "y": 542, + "width": 0, + "height": 102.5, + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "vcj35AGH_Gr3Q7A1Tr8Ns", + "type": "text" + } + ], + "elbowed": false, + "endArrowhead": "arrow", + "endBinding": { + "elementId": "auction", + "fixedPoint": null, + "focus": 0, + "gap": 8 + }, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "index": "aL", + "isDeleted": false, + "lastCommittedPoint": null, + "link": null, + "locked": false, + "opacity": 100, + "points": [ + [ + 0, + -0.5 + ], + [ + 0, + -102.5 + ] + ], + "roughness": 2, + "roundness": null, + "seed": 630497696, + "startArrowhead": null, + "startBinding": { + "elementId": "snapshot", + "fixedPoint": null, + "focus": 0, + "gap": 8 + }, + "strokeColor": "#1971c2", + "strokeStyle": "solid", + "strokeWidth": 2, + "updated": 1788641558574, + "version": 1, + "versionNonce": 1536356448 + }, + { + "id": "read-dsp", + "type": "arrow", + "x": 976.6992411264127, + "y": 546.2202117378707, + "width": 208.2446360989793, + "height": 110.94042347574145, + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "AobOUtir18oVt3o6WWo0P", + "type": "text" + } + ], + "elbowed": false, + "endArrowhead": "arrow", + "endBinding": { + "elementId": "auction", + "fixedPoint": null, + "focus": 6.518243520321045e-16, + "gap": 3.779788262129273 + }, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "index": "aM", + "isDeleted": false, + "lastCommittedPoint": null, + "link": null, + "locked": false, + "opacity": 100, + "points": [ + [ + -0.5, + -0.5 + ], + [ + -208.2446360989793, + -110.94042347574145 + ] + ], + "roughness": 2, + "roundness": null, + "seed": 616024160, + "startArrowhead": null, + "startBinding": { + "elementId": "dspcache", + "fixedPoint": null, + "focus": 1.1061826067146283e-15, + "gap": 3.779788262129273 + }, + "strokeColor": "#1971c2", + "strokeStyle": "solid", + "strokeWidth": 2, + "updated": 1788641558574, + "version": 1, + "versionNonce": 1626360928 + }, + { + "id": "mutate", + "type": "arrow", + "x": 277.99815071657264, + "y": 857.6451215207866, + "width": 152.50369856685472, + "height": 1.8119074960612807, + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "rxeL5pDQLOmEuqYknmqqg", + "type": "text" + } + ], + "elbowed": false, + "endArrowhead": "arrow", + "endBinding": { + "elementId": "adminapi", + "fixedPoint": null, + "focus": 1.328331195138585e-15, + "gap": 7.998150716572638 + }, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "index": "aN", + "isDeleted": false, + "lastCommittedPoint": null, + "link": null, + "locked": false, + "opacity": 100, + "points": [ + [ + 0.5, + 0.5 + ], + [ + 152.50369856685472, + 1.8119074960612807 + ] + ], + "roughness": 2, + "roundness": null, + "seed": 2043637152, + "startArrowhead": null, + "startBinding": { + "elementId": "admin", + "fixedPoint": null, + "focus": 3.097434754220774e-15, + "gap": 7.998150716572638 + }, + "strokeColor": "#1971c2", + "strokeStyle": "solid", + "strokeWidth": 2, + "updated": 1788641558574, + "version": 1, + "versionNonce": 1283139680 + }, + { + "id": "lua", + "type": "arrow", + "x": 700, + "y": 938, + "width": 960, + "height": 52.5, + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "pjR-talcnzreLa09_y0OO", + "type": "text" + } + ], + "elbowed": false, + "endArrowhead": "arrow", + "endBinding": { + "elementId": "redis", + "fixedPoint": null, + "focus": 0, + "gap": 8 + }, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "index": "aO", + "isDeleted": false, + "lastCommittedPoint": null, + "link": null, + "locked": false, + "opacity": 100, + "points": [ + [ + 0, + -0.5 + ], + [ + 0, + 52 + ], + [ + 960, + 52 + ], + [ + 960, + 11 + ] + ], + "roughness": 2, + "roundness": null, + "seed": 1600109664, + "startArrowhead": null, + "startBinding": { + "elementId": "adminapi", + "fixedPoint": null, + "focus": 0, + "gap": 8 + }, + "strokeColor": "#0c8599", + "strokeStyle": "solid", + "strokeWidth": 2, + "updated": 1788641558574, + "version": 1, + "versionNonce": 455312480 + }, + { + "id": "invalidate", + "type": "arrow", + "x": 1472, + "y": 865, + "width": 162.5, + "height": 0, + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "8zKH6RNqHa23MZI7FWIfd", + "type": "text" + } + ], + "elbowed": false, + "endArrowhead": "arrow", + "endBinding": { + "elementId": "refresh", + "fixedPoint": null, + "focus": 0, + "gap": 8 + }, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "index": "aP", + "isDeleted": false, + "lastCommittedPoint": null, + "link": null, + "locked": false, + "opacity": 100, + "points": [ + [ + -0.5, + 0 + ], + [ + -162.5, + 0 + ] + ], + "roughness": 2, + "roundness": null, + "seed": 349223328, + "startArrowhead": null, + "startBinding": { + "elementId": "redis", + "fixedPoint": null, + "focus": 0, + "gap": 8 + }, + "strokeColor": "#0c8599", + "strokeStyle": "dashed", + "strokeWidth": 2, + "updated": 1788641558574, + "version": 1, + "versionNonce": 802775136 + }, + { + "id": "replace", + "type": "arrow", + "x": 971.7891081475475, + "y": 796.3345918286328, + "width": 217.078216295095, + "height": 111.16918365726565, + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "b0btx38Q9oL1De3ffsAwy", + "type": "text" + } + ], + "elbowed": false, + "endArrowhead": "arrow", + "endBinding": { + "elementId": "snapshot", + "fixedPoint": null, + "focus": -5.940477697926828e-16, + "gap": 3.665408171367176 + }, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "index": "aQ", + "isDeleted": false, + "lastCommittedPoint": null, + "link": null, + "locked": false, + "opacity": 100, + "points": [ + [ + -0.5, + -0.5 + ], + [ + -217.078216295095, + -111.16918365726565 + ] + ], + "roughness": 2, + "roundness": null, + "seed": 1760112736, + "startArrowhead": null, + "startBinding": { + "elementId": "refresh", + "fixedPoint": null, + "focus": -1.236749752070912e-15, + "gap": 3.665408171367176 + }, + "strokeColor": "#0c8599", + "strokeStyle": "dashed", + "strokeWidth": 2, + "updated": 1788641558574, + "version": 1, + "versionNonce": 327990368 + }, + { + "id": "dsp-refresh", + "type": "arrow", + "x": 1308, + "y": 615, + "width": 162.5, + "height": 0, + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "ZJs-AZsGTr5wqjKCX3nMZ", + "type": "text" + } + ], + "elbowed": false, + "endArrowhead": "arrow", + "endBinding": { + "elementId": "dsp", + "fixedPoint": null, + "focus": 0, + "gap": 8 + }, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "index": "aR", + "isDeleted": false, + "lastCommittedPoint": null, + "link": null, + "locked": false, + "opacity": 100, + "points": [ + [ + 0.5, + 0 + ], + [ + 162.5, + 0 + ] + ], + "roughness": 2, + "roundness": null, + "seed": 1506313632, + "startArrowhead": null, + "startBinding": { + "elementId": "dspcache", + "fixedPoint": null, + "focus": 0, + "gap": 8 + }, + "strokeColor": "#1971c2", + "strokeStyle": "dashed", + "strokeWidth": 2, + "updated": 1788641558574, + "version": 1, + "versionNonce": 892180576 + }, + { + "id": "logs", + "type": "arrow", + "x": 432, + "y": 400, + "width": 220, + "height": 701.5, + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "cEzNumuoWmLXlNmEWauol", + "type": "text" + } + ], + "elbowed": false, + "endArrowhead": "arrow", + "endBinding": { + "elementId": "log", + "fixedPoint": null, + "focus": 0, + "gap": 8 + }, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "index": "aS", + "isDeleted": false, + "lastCommittedPoint": null, + "link": null, + "locked": false, + "opacity": 100, + "points": [ + [ + 0, + 0.5 + ], + [ + -32, + 0 + ], + [ + -32, + 630 + ], + [ + 188, + 630 + ], + [ + 188, + 701 + ] + ], + "roughness": 2, + "roundness": null, + "seed": 1763976288, + "startArrowhead": null, + "startBinding": { + "elementId": "auction", + "fixedPoint": null, + "focus": 0, + "gap": 8 + }, + "strokeColor": "#868e96", + "strokeStyle": "dashed", + "strokeWidth": 2, + "updated": 1788641558574, + "version": 1, + "versionNonce": 699135072 + }, + { + "id": "scrape", + "type": "arrow", + "x": 1472, + "y": 1170, + "width": 162.5, + "height": 0, + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "Zp_OWRvpN-lxySPD0bsif", + "type": "text" + } + ], + "elbowed": false, + "endArrowhead": "arrow", + "endBinding": { + "elementId": "metrics", + "fixedPoint": null, + "focus": 0, + "gap": 8 + }, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "index": "aT", + "isDeleted": false, + "lastCommittedPoint": null, + "link": null, + "locked": false, + "opacity": 100, + "points": [ + [ + -0.5, + 0 + ], + [ + -162.5, + 0 + ] + ], + "roughness": 2, + "roundness": null, + "seed": 1172754848, + "startArrowhead": null, + "startBinding": { + "elementId": "prom", + "fixedPoint": null, + "focus": 0, + "gap": 8 + }, + "strokeColor": "#868e96", + "strokeStyle": "dashed", + "strokeWidth": 2, + "updated": 1788641558574, + "version": 1, + "versionNonce": 1811402848 + }, + { + "id": "query", + "type": "arrow", + "x": 1587.111776296323, + "y": 1342.630003508709, + "width": 42.94311407402097, + "height": 103.76000701741805, + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "KgS24NVyDHxwioB1Vgfl6", + "type": "text" + } + ], + "elbowed": false, + "endArrowhead": "arrow", + "endBinding": { + "elementId": "prom", + "fixedPoint": null, + "focus": -1.198364490607514e-15, + "gap": 7.369996491290976 + }, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "index": "aU", + "isDeleted": false, + "lastCommittedPoint": null, + "link": null, + "locked": false, + "opacity": 100, + "points": [ + [ + 0.5, + -0.5 + ], + [ + 42.94311407402097, + -103.76000701741805 + ] + ], + "roughness": 2, + "roundness": null, + "seed": 232822880, + "startArrowhead": null, + "startBinding": { + "elementId": "graf", + "fixedPoint": null, + "focus": 0, + "gap": 7.369996491290976 + }, + "strokeColor": "#868e96", + "strokeStyle": "solid", + "strokeWidth": 2, + "updated": 1788641558574, + "version": 1, + "versionNonce": 486616160 + }, + { + "id": "alerts", + "type": "arrow", + "x": 1707.3028569575467, + "y": 1236.51964259655, + "width": 74.56095275157327, + "height": 105.46071480689989, + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "WSU4p4xRjBMXu2mgwfOiq", + "type": "text" + } + ], + "elbowed": false, + "endArrowhead": "arrow", + "endBinding": { + "elementId": "alert", + "fixedPoint": null, + "focus": 1.913136483888917e-15, + "gap": 6.519642596550057 + }, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "index": "aV", + "isDeleted": false, + "lastCommittedPoint": null, + "link": null, + "locked": false, + "opacity": 100, + "points": [ + [ + 0.5, + 0.5 + ], + [ + 74.56095275157327, + 105.46071480689989 + ] + ], + "roughness": 2, + "roundness": null, + "seed": 811310496, + "startArrowhead": null, + "startBinding": { + "elementId": "prom", + "fixedPoint": null, + "focus": 0, + "gap": 6.519642596550057 + }, + "strokeColor": "#868e96", + "strokeStyle": "dashed", + "strokeWidth": 2, + "updated": 1788641558574, + "version": 1, + "versionNonce": 1136134240 + }, + { + "id": "adminroute", + "type": "text", + "x": 40, + "y": 940, + "width": 94.26667022705078, + "height": 20.7, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": null, + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 18, + "frameId": null, + "groupIds": [], + "index": "aW", + "isDeleted": false, + "lineHeight": 1.15, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "/v1/bids/{id}", + "roughness": 0, + "roundness": null, + "seed": 1257147488, + "strokeColor": "#495057", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "/v1/bids/{id}", + "textAlign": "left", + "updated": 1788641558574, + "version": 1, + "versionNonce": 1353824, + "verticalAlign": "top" + }, + { + "id": "instance-note", + "type": "text", + "x": 410, + "y": 1260, + "width": 519, + "height": 20.7, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": null, + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 18, + "frameId": null, + "groupIds": [], + "index": "aX", + "isDeleted": false, + "lineHeight": 1.15, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "Each replica owns its caches. Redis distributes changes to every replica.", + "roughness": 0, + "roundness": null, + "seed": 173468064, + "strokeColor": "#495057", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "Each replica owns its caches. Redis distributes changes to every replica.", + "textAlign": "left", + "updated": 1788641558574, + "version": 1, + "versionNonce": 925928864, + "verticalAlign": "top" + }, + { + "id": "ops-label", + "type": "text", + "x": 410, + "y": 1050, + "width": 134.5, + "height": 25.299999999999997, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": null, + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 22, + "frameId": null, + "groupIds": [], + "index": "aY", + "isDeleted": false, + "lineHeight": 1.15, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "OPERATIONS", + "roughness": 0, + "roundness": null, + "seed": 438173792, + "strokeColor": "#495057", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "OPERATIONS", + "textAlign": "left", + "updated": 1788641558574, + "version": 1, + "versionNonce": 2082511968, + "verticalAlign": "top" + }, + { + "id": "legend", + "type": "text", + "x": 40, + "y": 1340, + "width": 325.5, + "height": 41.4, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": null, + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 18, + "frameId": null, + "groupIds": [], + "index": "aZ", + "isDeleted": false, + "lineHeight": 1.15, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "Solid arrows: request / local data flow\nDashed arrows: background work / telemetry", + "roughness": 0, + "roundness": null, + "seed": 520664480, + "strokeColor": "#495057", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "Solid arrows: request / local data flow\nDashed arrows: background work / telemetry", + "textAlign": "left", + "updated": 1788641558574, + "version": 1, + "versionNonce": 1225644448, + "verticalAlign": "top" + }, + { + "id": "scope", + "type": "text", + "x": 40, + "y": 1465, + "width": 978, + "height": 20.7, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": null, + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 18, + "frameId": null, + "groupIds": [], + "index": "aa", + "isDeleted": false, + "lineHeight": 1.15, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "Deployment: local Compose runs Redis; monitoring has a separate Compose file. A load balancer can front multiple adserver instances.", + "roughness": 0, + "roundness": null, + "seed": 993981536, + "strokeColor": "#495057", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "Deployment: local Compose runs Redis; monitoring has a separate Compose file. A load balancer can front multiple adserver instances.", + "textAlign": "left", + "updated": 1788641558574, + "version": 1, + "versionNonce": 2056130656, + "verticalAlign": "top" + }, + { + "id": "outscope", + "type": "text", + "x": 40, + "y": 1500, + "width": 771.2999877929688, + "height": 20.7, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": null, + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 18, + "frameId": null, + "groupIds": [], + "index": "ab", + "isDeleted": false, + "lineHeight": 1.15, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "Outside this service: budgets, pacing, frequency caps, attribution, billing, fraud checks and creative review.", + "roughness": 0, + "roundness": null, + "seed": 1403060640, + "strokeColor": "#495057", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "Outside this service: budgets, pacing, frequency caps, attribution, billing, fraud checks and creative review.", + "textAlign": "left", + "updated": 1788641558574, + "version": 1, + "versionNonce": 1231136160, + "verticalAlign": "top" + }, + { + "id": "zTCDt0Ho5CMd77fbLDtcY", + "type": "text", + "x": 98.06666564941406, + "y": 342.5, + "width": 113.86666870117188, + "height": 25, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": "client", + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 20, + "frameId": null, + "groupIds": [], + "index": "ac", + "isDeleted": false, + "lineHeight": 1.25, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "Auction client", + "roughness": 0, + "roundness": null, + "seed": 858588256, + "strokeColor": "#1971c2", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "Auction client", + "textAlign": "center", + "updated": 1788641558574, + "version": 1, + "versionNonce": 878181472, + "verticalAlign": "middle" + }, + { + "id": "h0XuaJW4ajZqoxHdONdoD", + "type": "text", + "x": 500.8499984741211, + "y": 317.5, + "width": 238.3000030517578, + "height": 75, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": "auction", + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 20, + "frameId": null, + "groupIds": [], + "index": "ad", + "isDeleted": false, + "lineHeight": 1.25, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "Auction handler + ranker\nTargeting → priority → CPM\nFirst / second price clearing", + "roughness": 0, + "roundness": null, + "seed": 1674410080, + "strokeColor": "#9c36b5", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "Auction handler + ranker\nTargeting → priority → CPM\nFirst / second price clearing", + "textAlign": "center", + "updated": 1788641558574, + "version": 1, + "versionNonce": 1518107040, + "verticalAlign": "middle" + }, + { + "id": "P17GHAQ_16UkG0R1YBHlt", + "type": "text", + "x": 505.0500030517578, + "y": 590, + "width": 229.89999389648438, + "height": 50, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": "snapshot", + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 20, + "frameId": null, + "groupIds": [], + "index": "ae", + "isDeleted": false, + "lineHeight": 1.25, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "BidCache\nAtomic placement snapshots", + "roughness": 0, + "roundness": null, + "seed": 272591968, + "strokeColor": "#0c8599", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "BidCache\nAtomic placement snapshots", + "textAlign": "center", + "updated": 1788641558574, + "version": 1, + "versionNonce": 1960407136, + "verticalAlign": "middle" + }, + { + "id": "CdM3RU_4G0JG3Y-zgJ-P0", + "type": "text", + "x": 993.3333358764648, + "y": 590, + "width": 223.3333282470703, + "height": 50, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": "dspcache", + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 20, + "frameId": null, + "groupIds": [], + "index": "af", + "isDeleted": false, + "lineHeight": 1.25, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "Bidder engine + local cache\nTTL • background refresh", + "roughness": 0, + "roundness": null, + "seed": 1112727648, + "strokeColor": "#0c8599", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "Bidder engine + local cache\nTTL • background refresh", + "textAlign": "center", + "updated": 1788641558574, + "version": 1, + "versionNonce": 1945912736, + "verticalAlign": "middle" + }, + { + "id": "HfjV3O53SF5b4mn0PzSLL", + "type": "text", + "x": 1026.1166687011719, + "y": 330, + "width": 137.76666259765625, + "height": 50, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": "result", + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 20, + "frameId": null, + "groupIds": [], + "index": "ag", + "isDeleted": false, + "lineHeight": 1.25, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "JSON response\nwinner or no_bid", + "roughness": 0, + "roundness": null, + "seed": 1238881376, + "strokeColor": "#1971c2", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "JSON response\nwinner or no_bid", + "textAlign": "center", + "updated": 1788641558574, + "version": 1, + "versionNonce": 218915936, + "verticalAlign": "middle" + }, + { + "id": "2bw8zvN5KEkAETsZqCkd_", + "type": "text", + "x": 102.5, + "y": 842.5, + "width": 105, + "height": 25, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": "admin", + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 20, + "frameId": null, + "groupIds": [], + "index": "ah", + "isDeleted": false, + "lineHeight": 1.25, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "Admin client", + "roughness": 0, + "roundness": null, + "seed": 2090748000, + "strokeColor": "#1971c2", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "Admin client", + "textAlign": "center", + "updated": 1788641558574, + "version": 1, + "versionNonce": 1671598496, + "verticalAlign": "middle" + }, + { + "id": "do--wYvo5OjlMZ3pxMDCE", + "type": "text", + "x": 521.9499969482422, + "y": 827.5, + "width": 196.10000610351562, + "height": 75, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": "adminapi", + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 20, + "frameId": null, + "groupIds": [], + "index": "ai", + "isDeleted": false, + "lineHeight": 1.25, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "Bid mutation API\nValidate • admin token\nRevision conflict → 409", + "roughness": 0, + "roundness": null, + "seed": 1987460192, + "strokeColor": "#9c36b5", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "Bid mutation API\nValidate • admin token\nRevision conflict → 409", + "textAlign": "center", + "updated": 1788641558574, + "version": 1, + "versionNonce": 180410464, + "verticalAlign": "middle" + }, + { + "id": "cYlcmF5py2A-mzFdQk-18", + "type": "text", + "x": 1535.3833312988281, + "y": 827.5, + "width": 249.23333740234375, + "height": 75, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": "redis", + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 20, + "frameId": null, + "groupIds": [], + "index": "aj", + "isDeleted": false, + "lineHeight": 1.25, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "Redis • shared bid state\nActive bids + revisions\nTombstones + placement index", + "roughness": 0, + "roundness": null, + "seed": 1496297568, + "strokeColor": "#0c8599", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "Redis • shared bid state\nActive bids + revisions\nTombstones + placement index", + "textAlign": "center", + "updated": 1788641558574, + "version": 1, + "versionNonce": 547315104, + "verticalAlign": "middle" + }, + { + "id": "aHBFXmjOoPlJVHt4Uvexd", + "type": "text", + "x": 978.1166687011719, + "y": 827.5, + "width": 253.76666259765625, + "height": 75, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": "refresh", + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 20, + "frameId": null, + "groupIds": [], + "index": "ak", + "isDeleted": false, + "lineHeight": 1.25, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "Snapshot refresh workers\nWarmup • Pub/Sub invalidation\nPeriodic reconciliation", + "roughness": 0, + "roundness": null, + "seed": 211461216, + "strokeColor": "#9c36b5", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "Snapshot refresh workers\nWarmup • Pub/Sub invalidation\nPeriodic reconciliation", + "textAlign": "center", + "updated": 1788641558574, + "version": 1, + "versionNonce": 1103547488, + "verticalAlign": "middle" + }, + { + "id": "-e6FsKkYrbyeDV12iV_5D", + "type": "text", + "x": 1528.2166595458984, + "y": 577.5, + "width": 263.5666809082031, + "height": 75, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": "dsp", + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 20, + "frameId": null, + "groupIds": [], + "index": "al", + "isDeleted": false, + "lineHeight": 1.25, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "External DSP endpoints\nHTTP deadlines • circuit breaker\nBounded concurrency", + "roughness": 0, + "roundness": null, + "seed": 2122782816, + "strokeColor": "#868e96", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "External DSP endpoints\nHTTP deadlines • circuit breaker\nBounded concurrency", + "textAlign": "center", + "updated": 1788641558574, + "version": 1, + "versionNonce": 1008904608, + "verticalAlign": "middle" + }, + { + "id": "PiEDOChl6w9y7WHJH3KGm", + "type": "text", + "x": 491.6999969482422, + "y": 1132.5, + "width": 256.6000061035156, + "height": 75, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": "log", + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 20, + "frameId": null, + "groupIds": [], + "index": "am", + "isDeleted": false, + "lineHeight": 1.25, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "Decision logger (optional)\nBounded queue → JSON stdout\nOverflow drops + metric", + "roughness": 0, + "roundness": null, + "seed": 1657080928, + "strokeColor": "#868e96", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "Decision logger (optional)\nBounded queue → JSON stdout\nOverflow drops + metric", + "textAlign": "center", + "updated": 1788641558574, + "version": 1, + "versionNonce": 200163424, + "verticalAlign": "middle" + }, + { + "id": "WpMgRFk7_k6HgBMBRGP-v", + "type": "text", + "x": 994.716667175293, + "y": 1132.5, + "width": 220.56666564941406, + "height": 75, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": "metrics", + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 20, + "frameId": null, + "groupIds": [], + "index": "an", + "isDeleted": false, + "lineHeight": 1.25, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "Runtime endpoints\n/metrics • /healthz • /readyz\nOptional private pprof", + "roughness": 0, + "roundness": null, + "seed": 1931772000, + "strokeColor": "#868e96", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "Runtime endpoints\n/metrics • /healthz • /readyz\nOptional private pprof", + "textAlign": "center", + "updated": 1788641558574, + "version": 1, + "versionNonce": 559707552, + "verticalAlign": "middle" + }, + { + "id": "-hfzjaFH0zeb5PqZUpyr1", + "type": "text", + "x": 1553.1166687011719, + "y": 1145, + "width": 213.76666259765625, + "height": 50, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": "prom", + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 20, + "frameId": null, + "groupIds": [], + "index": "ao", + "isDeleted": false, + "lineHeight": 1.25, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "Prometheus (optional)\nScrapes /metrics every 15s", + "roughness": 0, + "roundness": null, + "seed": 796226656, + "strokeColor": "#868e96", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "Prometheus (optional)\nScrapes /metrics every 15s", + "textAlign": "center", + "updated": 1788641558574, + "version": 1, + "versionNonce": 151467104, + "verticalAlign": "middle" + }, + { + "id": "be9cMuY3aHxBtXgqkIQIe", + "type": "text", + "x": 1532.816665649414, + "y": 1382.5, + "width": 64.36666870117188, + "height": 25, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": "graf", + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 20, + "frameId": null, + "groupIds": [], + "index": "ap", + "isDeleted": false, + "lineHeight": 1.25, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "Grafana", + "roughness": 0, + "roundness": null, + "seed": 495446112, + "strokeColor": "#868e96", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "Grafana", + "textAlign": "center", + "updated": 1788641558574, + "version": 1, + "versionNonce": 1434239392, + "verticalAlign": "middle" + }, + { + "id": "zcJHNyOvrycetd_dUrNSk", + "type": "text", + "x": 1765.033332824707, + "y": 1382.5, + "width": 109.93333435058594, + "height": 25, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": "alert", + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 20, + "frameId": null, + "groupIds": [], + "index": "aq", + "isDeleted": false, + "lineHeight": 1.25, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "Alertmanager", + "roughness": 0, + "roundness": null, + "seed": 153869408, + "strokeColor": "#868e96", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "Alertmanager", + "textAlign": "center", + "updated": 1788641558574, + "version": 1, + "versionNonce": 1591847008, + "verticalAlign": "middle" + }, + { + "id": "Mz3qTzgPoITbm6zq_qquc", + "type": "text", + "x": 156.91666793823242, + "y": 324.375, + "width": 107.93333435058594, + "height": 18.75, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": "request", + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 15, + "frameId": null, + "groupIds": [], + "index": "ar", + "isDeleted": false, + "lineHeight": 1.25, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "POST /v1/auction", + "roughness": 0, + "roundness": null, + "seed": 1144082528, + "strokeColor": "#1971c2", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "POST /v1/auction", + "textAlign": "center", + "updated": 1788641558574, + "version": 1, + "versionNonce": 934514080, + "verticalAlign": "middle" + }, + { + "id": "r4Mk4IeeVyrkrUULj0GSB", + "type": "text", + "x": 777.6166667938232, + "y": 323.125, + "width": 50, + "height": 18.75, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": "response", + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 15, + "frameId": null, + "groupIds": [], + "index": "as", + "isDeleted": false, + "lineHeight": 1.25, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "decision", + "roughness": 0, + "roundness": null, + "seed": 497724512, + "strokeColor": "#1971c2", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "decision", + "textAlign": "center", + "updated": 1788641558574, + "version": 1, + "versionNonce": 2035129440, + "verticalAlign": "middle" + }, + { + "id": "vcj35AGH_Gr3Q7A1Tr8Ns", + "type": "text", + "x": 512.9000015258789, + "y": 458.125, + "width": 57.93333435058594, + "height": 18.75, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": "read-snapshot", + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 15, + "frameId": null, + "groupIds": [], + "index": "at", + "isDeleted": false, + "lineHeight": 1.25, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "local bids", + "roughness": 0, + "roundness": null, + "seed": 47286368, + "strokeColor": "#1971c2", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "local bids", + "textAlign": "center", + "updated": 1788641558574, + "version": 1, + "versionNonce": 1093720480, + "verticalAlign": "middle" + }, + { + "id": "AobOUtir18oVt3o6WWo0P", + "type": "text", + "x": 671.2935940669133, + "y": 458.125, + "width": 104.19999694824219, + "height": 18.75, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": "read-dsp", + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 15, + "frameId": null, + "groupIds": [], + "index": "au", + "isDeleted": false, + "lineHeight": 1.25, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "fresh cached bids", + "roughness": 0, + "roundness": null, + "seed": 1620436064, + "strokeColor": "#1971c2", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "fresh cached bids", + "textAlign": "center", + "updated": 1788641558574, + "version": 1, + "versionNonce": 1243287648, + "verticalAlign": "middle" + }, + { + "id": "rxeL5pDQLOmEuqYknmqqg", + "type": "text", + "x": 173.41666793823242, + "y": 827.4260752688172, + "width": 96.69999694824219, + "height": 18.75, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": "mutate", + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 15, + "frameId": null, + "groupIds": [], + "index": "av", + "isDeleted": false, + "lineHeight": 1.25, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "PUT / DELETE", + "roughness": 0, + "roundness": null, + "seed": 166183008, + "strokeColor": "#1971c2", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "PUT / DELETE", + "textAlign": "center", + "updated": 1788641558574, + "version": 1, + "versionNonce": 1160029600, + "verticalAlign": "middle" + }, + { + "id": "pjR-talcnzreLa09_y0OO", + "type": "text", + "x": 734.8333282470703, + "y": 950.625, + "width": 209.8000030517578, + "height": 18.75, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": "lua", + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 15, + "frameId": null, + "groupIds": [], + "index": "aw", + "isDeleted": false, + "lineHeight": 1.25, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "Lua: atomic revision check + write", + "roughness": 0, + "roundness": null, + "seed": 2008489056, + "strokeColor": "#0c8599", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "Lua: atomic revision check + write", + "textAlign": "center", + "updated": 1788641558574, + "version": 1, + "versionNonce": 152700000, + "verticalAlign": "middle" + }, + { + "id": "8zKH6RNqHa23MZI7FWIfd", + "type": "text", + "x": 1200.150001525879, + "y": 833.125, + "width": 101, + "height": 18.75, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": "invalidate", + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 15, + "frameId": null, + "groupIds": [], + "index": "ax", + "isDeleted": false, + "lineHeight": 1.25, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "invalidate + read", + "roughness": 0, + "roundness": null, + "seed": 150206560, + "strokeColor": "#0c8599", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "invalidate + read", + "textAlign": "center", + "updated": 1788641558574, + "version": 1, + "versionNonce": 817820064, + "verticalAlign": "middle" + }, + { + "id": "b0btx38Q9oL1De3ffsAwy", + "type": "text", + "x": 670.2333335876465, + "y": 708.125, + "width": 99.5999984741211, + "height": 18.75, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": "replace", + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 15, + "frameId": null, + "groupIds": [], + "index": "ay", + "isDeleted": false, + "lineHeight": 1.25, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "replace snapshot", + "roughness": 0, + "roundness": null, + "seed": 1116623968, + "strokeColor": "#0c8599", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "replace snapshot", + "textAlign": "center", + "updated": 1788641558574, + "version": 1, + "versionNonce": 1947891808, + "verticalAlign": "middle" + }, + { + "id": "ZJs-AZsGTr5wqjKCX3nMZ", + "type": "text", + "x": 1209, + "y": 583.125, + "width": 75.43333435058594, + "height": 18.75, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": "dsp-refresh", + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 15, + "frameId": null, + "groupIds": [], + "index": "az", + "isDeleted": false, + "lineHeight": 1.25, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "async HTTP", + "roughness": 0, + "roundness": null, + "seed": 259403872, + "strokeColor": "#1971c2", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "async HTTP", + "textAlign": "center", + "updated": 1788641558574, + "version": 1, + "versionNonce": 1261419936, + "verticalAlign": "middle" + }, + { + "id": "cEzNumuoWmLXlNmEWauol", + "type": "text", + "x": 333.8500003814697, + "y": 705.625, + "width": 50, + "height": 18.75, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": "logs", + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 15, + "frameId": null, + "groupIds": [], + "index": "b00", + "isDeleted": false, + "lineHeight": 1.25, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "enqueue", + "roughness": 0, + "roundness": null, + "seed": 10194016, + "strokeColor": "#868e96", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "enqueue", + "textAlign": "center", + "updated": 1788641558574, + "version": 1, + "versionNonce": 250375264, + "verticalAlign": "middle" + }, + { + "id": "Zp_OWRvpN-lxySPD0bsif", + "type": "text", + "x": 1234.916660308838, + "y": 1138.125, + "width": 81.26667022705078, + "height": 18.75, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": "scrape", + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 15, + "frameId": null, + "groupIds": [], + "index": "b01", + "isDeleted": false, + "lineHeight": 1.25, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "GET /metrics", + "roughness": 0, + "roundness": null, + "seed": 216950880, + "strokeColor": "#868e96", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "GET /metrics", + "textAlign": "center", + "updated": 1788641558574, + "version": 1, + "versionNonce": 1973881248, + "verticalAlign": "middle" + }, + { + "id": "KgS24NVyDHxwioB1Vgfl6", + "type": "text", + "x": 1546.5833333333335, + "y": 1258.125, + "width": 34.16666793823242, + "height": 18.75, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": "query", + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 15, + "frameId": null, + "groupIds": [], + "index": "b02", + "isDeleted": false, + "lineHeight": 1.25, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "query", + "roughness": 0, + "roundness": null, + "seed": 1365165152, + "strokeColor": "#868e96", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "query", + "textAlign": "center", + "updated": 1788641558574, + "version": 1, + "versionNonce": 1667227744, + "verticalAlign": "middle" + }, + { + "id": "WSU4p4xRjBMXu2mgwfOiq", + "type": "text", + "x": 1680.7499993642173, + "y": 1258.125, + "width": 32.5, + "height": 18.75, + "angle": 0, + "autoResize": true, + "backgroundColor": "transparent", + "boundElements": null, + "containerId": "alerts", + "fillStyle": "solid", + "fontFamily": 1, + "fontSize": 15, + "frameId": null, + "groupIds": [], + "index": "b03", + "isDeleted": false, + "lineHeight": 1.25, + "link": null, + "locked": false, + "opacity": 100, + "originalText": "alerts", + "roughness": 0, + "roundness": null, + "seed": 1356636256, + "strokeColor": "#868e96", + "strokeStyle": "solid", + "strokeWidth": 2, + "text": "alerts", + "textAlign": "center", + "updated": 1788641558574, + "version": 1, + "versionNonce": 1800721824, + "verticalAlign": "middle" + } + ], + "appState": { + "viewBackgroundColor": "#ffffff", + "gridSize": null + } +} diff --git a/docs/architecture.svg b/docs/architecture.svg new file mode 100644 index 0000000..721ca6f --- /dev/null +++ b/docs/architecture.svg @@ -0,0 +1,2 @@ +Adserver • system architectureCurrent repository design | Warm auctions have no Redis or DSP network callsGO ADSERVER · per instanceAuction clientAuction handler + rankerTargeting → priority → CPMFirst / second price clearingBidCacheAtomic placement snapshotsBidder engine + local cacheTTL • background refreshJSON responsewinner or no_bidAdmin clientBid mutation APIValidate • admin tokenRevision conflict → 409Redis • shared bid stateActive bids + revisionsTombstones + placement indexSnapshot refresh workersWarmup • Pub/Sub invalidationPeriodic reconciliationExternal DSP endpointsHTTP deadlines • circuit breakerBounded concurrencyDecision logger (optional)Bounded queue → JSON stdoutOverflow drops + metricRuntime endpoints/metrics • /healthz • /readyzOptional private pprofPrometheus (optional)Scrapes /metrics every 15sGrafanaAlertmanagerPOST /v1/auctiondecisionlocal bidsfresh cached bidsPUT / DELETELua: atomic revision check + writeinvalidate + readreplace snapshotasync HTTPenqueueGET /metricsqueryalerts/v1/bids/{id}Each replica owns its caches. Redis distributes changes to every replica.OPERATIONSSolid arrows: request / local data flowDashed arrows: background work / telemetryDeployment: local Compose runs Redis; monitoring has a separate Compose file. A load balancer can front multiple adserver instances.Outside this service: budgets, pacing, frequency caps, attribution, billing, fraud checks and creative review. \ No newline at end of file