Bundle vs isolate
Description
bundle-vs-isolate names the recurring design choice of how broadly to scope a single act of execution over independently addressable items. If each execution container has a fixed setup cost, bundling more items into one container improves throughput by amortizing that cost. But shared containment also COUPLES items — they may compete for finite attention or compute, inherit shared context, fail together, become harder to attribute individually, or lose per-item tailoring. Isolating items into separate containers does the opposite: it preserves per-item specificity, clean failure boundaries, and independent attribution, but pays the fixed overhead repeatedly. The concept appears wherever work can be partitioned AND container startup/setup is not free.
The deepest invariant is the scope of one execution container over addressable work-items. From that scope choice follow the common consequences — overhead amortization, isolation strength, shared-context benefits OR interference, failure blast radius, scheduling/latency behavior, and observability. Earlier framings centered “amortize vs attend” (the economic + cognitive consequence pair); that framing oversells unification across substrates where attention isn’t the binding constraint. The invariant is structural, not anthropomorphic: how wide is the boundary you draw around one operation?
The complementary primitive — choices about how many CONSUMERS share one durable data shape (file format, dataclass) — looks superficially similar but operates at the data/interface layer rather than the runtime/execution layer. That belongs in a separate concept and should not be merged here; the deep structural invariant is different.
Triggers
User-initiated: User describes a design choice between per-item handling and batched handling. Vocabulary cues: “should we batch this?”, “one call or many?”, “should we spawn separately or reuse?”, “fine-grained vs coarse-grained”, “individual vs combined.” Agent-initiated: Agent notices a runtime architecture choice involving N addressable items and an operation with nonzero per-container overhead. Candidate inference: “this is a bundle-vs-isolate decision; what does shifting the packing-policy buy and cost?” Situation-shape signals: Multiple work-items present + fixed per-container cost + ability to choose grouping. Cost-quality tradeoffs around throughput vs precision. Failure-mode discussions involving all-or-nothing vs partial-success patterns.Exclusions
See frontmatterexclusions field — copied here for narrative reading:
- Atomically-bound work-items. When N items intrinsically must be one operation (atomic transactions, all-or-nothing semantic requirements), there is no design choice to make.
- Container-free operations. No fixed setup cost → no amortization meaning → the choice degenerates.
- Single-item domains. Requires ≥2 addressable units competing for container scope.
- Pure data-modeling choices. “How many consumers share one schema” is a different primitive (representation abstraction / shared-schema-multiple-consumers); structurally distinct from execution-container scope, despite surface similarity. Don’t merge.
Structure
- work-items — the distinct addressable units a system could partition. Without ≥2 of these competing for container scope, the design choice degenerates.
- execution-container — the bounded operation, vehicle, session, or boundary that carries out work on one-or-more items. Type-narrowed to container — an instance of the image-schema primitive (bounded interior + boundary + exterior) applied to execution rather than data or physical space. The container is what gets shared (bundle horn) or replicated (isolate horn). Its scope is the load-bearing variable.
- fixed-overhead — the per-container setup/coordination cost paid once regardless of how many items live inside. When this approaches zero the concept loses force; when it dominates per-item work the bundle horn becomes structurally compelling.
- packing-policy — the design rule that maps work-items to containers. This is the decision the concept names. Policies range from extreme bundling (all items, one container) through chunked grouping to extreme isolation (one item, one container). Each point on the spectrum trades the coupling-effects below.
- coupling-effects — consequences of shared containment, both productive (shared context enables cross-item synthesis, ranking, comparison; amortizes setup; rides the uniformity-dividend) and adverse (interference, attention dilution, joint failure modes, harder per-item attribution). These are what the packing-policy is buying or paying for.
Relationships
- prompt-chaining — prompt-chaining is sequential composition across stages; bundle-vs-isolate is parallel packing across items. Both are orchestration primitives — one names the temporal axis (what comes next), the other names the spatial axis (what shares a container).
- chunking — chunking IS the bundle horn applied to sequenced/streamed data: group N items into a shared execution unit to amortize per-item overhead. bundle-vs-isolate names the axis; chunking is the resolution-of-the-axis specifically for stream-shaped work.
- bulkhead — bulkhead IS the isolate horn applied for failure-isolation: partition into N independent compartments so failure in one doesn’t propagate. bundle-vs-isolate names the design axis that bulkhead resolves in one direction; bulkhead lives at the extreme of the isolate end when failure-boundary clarity is the binding constraint.
- orchestrator-workers — orchestrator-workers is one common shape of “isolate” — fan-out across parallel workers, one item per worker. The bundle-vs-isolate concept names the design space in which orchestrator-workers is one occupied corner.
- uniformity-dividend — bundling earns the uniformity-dividend (shared execution context, amortized fixed costs, N+1th item nearly free); isolating sacrifices it. uniformity-dividend names the WHY behind the bundle horn’s appeal — “conserving shape across N instances keeps cost roughly constant rather than linear in N.”
- grain — the bundle-vs-isolate decision IS a grain choice: at what resolution do we individuate work items for execution? Grain bugs (locally-correct, aggregation-wrong) are the class of failures that result from bundling at too coarse a grain.
- mixed-use — mixed-use is the bundle horn applied to physical/organizational containers (zones, buildings) — multiple functions share one space rather than each getting its own. Same structural shape applied to durable physical containers rather than transient execution containers; the analogical claim is that the packing-vs-overhead tradeoff is the same operation at different substrates.
- bottleneck-buffer — packing-policy choices interact with bottleneck-buffer dynamics: denser bundling can mask per-item latency but delays defect discovery; sparser packing exposes per-item latency but reveals defects sooner. The two concepts travel together in flow-shaped systems and illuminate the same throughput-vs-fidelity tradeoff from different angles.
- caching — caching amortizes computation cost via TEMPORAL reuse (same operation reused across time); bundle-vs-isolate amortizes container cost via SPATIAL reuse (same container reused across items at one time). Different axes of amortization — orthogonal optimizations.
Examples
Dave Rensin, "Elephants, Goldfish, and the New Golden Age of Software Engineering" (Medium, April 27, 2026) — https://drensin.medium.com/elephants-goldfish-and-the-new-golden-age-of-software-engineering-c33641a48874 · computer-science
Dave Rensin, "Elephants, Goldfish, and the New Golden Age of Software Engineering" (Medium, April 27, 2026) — https://drensin.medium.com/elephants-goldfish-and-the-new-golden-age-of-software-engineering-c33641a48874 · computer-science
bundle-vs-isolate at the session-as-container layer. The elephant takes the bundle horn (amortize session-warmup across many design tasks; cross-task synthesis is the whole point); the goldfish takes the isolate horn (per-task fresh context guarantees independent attention; failures don’t compound across tasks; per-task warmup is paid intentionally). What makes the pattern load-bearing as an exemplar is the intentional commitment to both horns simultaneously, partitioned by the kind of work each horn is good at — design vs implementation, synthesis vs validation, cross-task coherence vs per-task independence.Operations-research literature on vehicle routing problems (VRP); canonical industry framing in last-mile delivery (UPS ORION route-optimization system, USPS rural carrier routes, instant-delivery fleets like Uber Eats / DoorDash) · transportation
Operations-research literature on vehicle routing problems (VRP); canonical industry framing in last-mile delivery (UPS ORION route-optimization system, USPS rural carrier routes, instant-delivery fleets like Uber Eats / DoorDash) · transportation
Agroecology literature on monoculture vs polyculture / intercropping; canonical references include Miguel Altieri's *Agroecology* (1995), Vandana Shiva's *Monocultures of the Mind* (1993), and traditional Mesoamerican Three Sisters (corn-beans-squash) interplanting practiced for ~3,500 years · agriculture
Agroecology literature on monoculture vs polyculture / intercropping; canonical references include Miguel Altieri's *Agroecology* (1995), Vandana Shiva's *Monocultures of the Mind* (1993), and traditional Mesoamerican Three Sisters (corn-beans-squash) interplanting practiced for ~3,500 years · agriculture