{
  "docVersion": 1,
  "id": "blog-bp-1",
  "name": "Backpressure — push the 'no' upstream",
  "purpose": "A fast producer, a bounded queue, a slow consumer. When the buffer fills, a signal flows BACK to the producer to slow or pause — flow control, not data loss.",
  "nodes": {
    "prod": {
      "type": "worker",
      "label": "Producer",
      "x": 40,
      "y": 220,
      "w": 140,
      "h": 86,
      "color": "green",
      "runtime": "fast · 10k/s"
    },
    "buf": {
      "type": "queue",
      "label": "Bounded buffer",
      "x": 340,
      "y": 220,
      "w": 140,
      "h": 86,
      "color": "amber",
      "runtime": "capacity = 1000 · FULL"
    },
    "cons": {
      "type": "worker",
      "label": "Consumer",
      "x": 660,
      "y": 220,
      "w": 140,
      "h": 86,
      "color": "green",
      "runtime": "slow · 2k/s"
    },
    "sink": {
      "type": "database",
      "label": "Downstream",
      "x": 960,
      "y": 220,
      "w": 140,
      "h": 86,
      "runtime": "the real bottleneck"
    }
  },
  "edges": {
    "e1": {
      "from": "prod",
      "to": "buf",
      "fromSide": "right",
      "toSide": "left",
      "label": "enqueue",
      "animated": true
    },
    "e2": {
      "from": "buf",
      "to": "cons",
      "fromSide": "right",
      "toSide": "left",
      "label": "dequeue at 2k/s",
      "animated": true
    },
    "e3": {
      "from": "cons",
      "to": "sink",
      "fromSide": "right",
      "toSide": "left",
      "label": "write"
    },
    "sig": {
      "from": "buf",
      "to": "prod",
      "fromSide": "top",
      "toSide": "top",
      "label": "SLOW DOWN — buffer full",
      "color": "red",
      "style": "dashed",
      "animated": true
    }
  },
  "boxes": {
    "z1": {
      "x": 300,
      "y": 150,
      "w": 200,
      "h": 200,
      "label": "the boundary that forces a choice",
      "color": "amber",
      "opacity": 0.05
    }
  },
  "texts": {
    "t1": {
      "x": 40,
      "y": 360,
      "text": "bounded buffer + a way to say 'wait' = backpressure. the producer BLOCKS,\npauses, or the pull-based consumer only requests what it can handle.\nnobody outruns the slowest stage. use it when you CONTROL both ends.",
      "color": "green",
      "size": 12
    }
  },
  "meta": {
    "createdAt": "2026-07-23T09:00:00.000Z",
    "modifiedAt": "2026-07-23T09:00:00.000Z"
  }
}