{
  "docVersion": 1,
  "id": "blog-bp-4",
  "name": "One question decides which you need",
  "purpose": "Demand exceeds capacity. Can you make the source slow down? If yes, backpressure. If no, load shed. At the very edge, backpressure has nowhere to push — so it becomes shedding.",
  "nodes": {
    "q": {
      "type": "gateway",
      "label": "demand > capacity",
      "x": 380,
      "y": 40,
      "w": 190,
      "h": 86,
      "color": "amber"
    },
    "yes": {
      "type": "worker",
      "label": "you control the source",
      "x": 100,
      "y": 240,
      "w": 180,
      "h": 86,
      "color": "green",
      "runtime": "internal pipeline, stream, queue"
    },
    "no": {
      "type": "users",
      "label": "you don't (open internet)",
      "x": 660,
      "y": 240,
      "w": 190,
      "h": 86,
      "color": "red",
      "runtime": "thousands of clients"
    },
    "bp": {
      "type": "queue",
      "label": "BACKPRESSURE",
      "x": 100,
      "y": 420,
      "w": 180,
      "h": 86,
      "color": "green",
      "runtime": "coordinate: 'slow down'"
    },
    "ls": {
      "type": "gateway",
      "label": "LOAD SHEDDING",
      "x": 660,
      "y": 420,
      "w": 190,
      "h": 86,
      "color": "blue",
      "runtime": "unilateral: 'go away'"
    }
  },
  "edges": {
    "e1": {
      "from": "q",
      "to": "yes",
      "fromSide": "left",
      "toSide": "top",
      "label": "yes",
      "color": "green"
    },
    "e2": {
      "from": "q",
      "to": "no",
      "fromSide": "right",
      "toSide": "top",
      "label": "no",
      "color": "red"
    },
    "e3": {
      "from": "yes",
      "to": "bp",
      "fromSide": "bottom",
      "toSide": "top"
    },
    "e4": {
      "from": "no",
      "to": "ls",
      "fromSide": "bottom",
      "toSide": "top"
    }
  },
  "boxes": {},
  "texts": {
    "t1": {
      "x": 100,
      "y": 540,
      "text": "they're not rivals — real systems use both: backpressure through the internal stages,\nload shedding at the untrusted edge where there's no one to push back on.\ntogether they replace the unbounded queue with an honest, bounded 'no'.",
      "color": "gray",
      "size": 12
    }
  },
  "meta": {
    "createdAt": "2026-07-23T09:00:00.000Z",
    "modifiedAt": "2026-07-23T09:00:00.000Z"
  }
}