skip to content

A team packages their entire application — web UI, order processing, and inventory logic — into one JAR file that gets built by one CI pipeline and deployed to production as a single unit. What operational advantage does this single-artifact deployment give the team day to day, and what's the corresponding cost when only the inventory logic needs to change?

level: middleimportance: must knowfreq 80%

answer

  1. one artifact, one pipeline, one rollback target
  2. no service versioning needed internally
  3. whole test suite gates every release
  4. shared release train blocks unrelated fixes
  5. DORA deploy-frequency plateau as team grows

basics

~20 s

One build, one thing to deploy — simple and predictable. But if you only changed one small piece, you still have to rebuild, retest, and redeploy the whole app, and unrelated failures can block your release.

solid answer

~40 s

Packaging everything as a single deployable unit means one CI pipeline, one versioned artifact, one rollback target, and one environment to provision — no service discovery, no API versioning between independently released services, no coordinating deploy order across a dependency graph. Operationally that's far simpler than a distributed deployment. The cost is the flip side of the same coin: even a one-line fix to inventory logic requires rebuilding and redeploying the entire application, including untouched UI and order-processing code. The whole app must pass the whole test suite before anything ships, unrelated teams share one release train and one deploy window, and a regression anywhere blocks a fix shipping anywhere else — so deploy frequency and lead time degrade as the codebase and team grow.

go deeper

for a junior

Should recognize that one artifact means one deploy step, and that changing one thing still means redeploying everything.

for a middle

Should name the concrete operational wins (no service versioning, simple rollback) and the concrete cost (shared test suite gating, coupled release cadence) with a plausible example.

for a senior

Should describe how the cost compounds with team growth — release cadence degradation, merge freezes, cross-team negotiation over release windows — and know at least one mitigation like feature flags.

for a principal

Should be able to reference a real organization's experience with this trade-off, discuss when the cost outweighs the benefit at scale, and connect it to concrete engineering metrics like deploy frequency and lead time for changes.

## What "single deployable unit" means 'Single deployable unit' means the build pipeline produces exactly one artifact — a JAR, a WAR, a Docker image wrapping one binary — and that one artifact is what gets versioned, tested, promoted through environments, and rolled back if something goes wrong. Concretely: 1. `git commit` triggers one CI job. 2. That job runs one test suite and produces one version-tagged artifact (say `app-v482.jar`). 3. That artifact is deployed to every instance behind the load balancer. 4. If `v482` is broken the rollback is simply redeploying `v481` everywhere. There's exactly one thing to reason about at deploy time. ## What the single artifact buys This buys real **operational simplicity** relative to a distributed alternative. - There's **no service registry** to keep consistent. - There's **no need to version an internal API** between two independently deployable pieces — the inventory 'module' and the order 'module' are compiled together, so a breaking change to inventory's internal method signature is caught by the compiler immediately, not discovered at runtime by a mismatched service contract. - There's **no need to decide deploy order** across a dependency graph of services, and no need to run canary rollouts across a fleet of different services with different versions in flight. - **Infrastructure is simpler too** — one runtime, one process type to autoscale, one set of health checks and metrics dashboards. For a small team this is a genuine, not merely nostalgic, advantage: less to build, less to operate, fewer moving parts that can be individually misconfigured. ## The cost is the direct mirror of the benefit The cost is structural, not incidental, and it's the direct mirror of the benefit: **because there is one artifact, there is one unit of change.** - If the inventory team fixes a one-line bug, the artifact that ships contains that fix bundled with whatever the UI team and the order-processing team happen to have merged since the last release — code they may not have finished testing, or may have deliberately left behind a feature flag for later. - The entire application's test suite has to pass, end to end, before any part of it can go out, which means test suite runtime and flakiness become a shared tax the whole organization pays on every release, not just the team whose code actually changed. As the codebase and headcount grow, this shows up very concretely: - **Release cadence slows down** — weekly, then biweekly, then feature-flagged 'dark' releases just to decouple the deploy event from the feature's actual availability. - **'Merge freeze' periods** appear before releases to stabilize the shared artifact. - **One team's broken build or failing test** literally blocks every other team's ability to ship anything, including urgent fixes unrelated to the breakage. ## How it shows up in production, and socially In production this failure mode shows up as deploy velocity metrics (deploy frequency, lead time for changes — the DORA metrics) plateauing or regressing even as the team grows, which is often the first hard signal that a monolith's deployment model has become the bottleneck rather than the codebase's raw complexity. It also shows up socially: - Teams start negotiating over shared release windows. - A 'release manager' role emerges just to coordinate who's allowed to merge before a cut. - Hot-fixing production for one team's critical bug means either a full rebuild-and-redeploy of the entire artifact (slow, and risks pulling in someone else's half-finished change) or a separate emergency branch-and-cherry-pick process that adds its own risk. ## The Amazon instance of this trade-off A well-known real-world instance of exactly this trade-off is Amazon's own early monolith (internally called Obidos): as Amazon's single deployable grew, build times, test suite runtime, and coordination overhead across hundreds of engineers sharing one release train became a widely cited internal motivation for eventually decomposing into independently deployable services — not because the single-artifact model is wrong, but because the cost side of that trade-off (shared release train, shared test suite, coupled deploy cadence) scales worse with team size than the benefit side (deployment simplicity) scales well. Smaller teams and smaller codebases routinely make the opposite, and often correct, call: the single-artifact simplicity is worth more than the coupling costs until team size or release-frequency needs actually create pain.

  • How do teams commonly work around the 'whole app must be redeployed for one small change' cost without splitting into separate services?
    Feature flags are the most common workaround: code ships inside the single artifact but stays dark behind a flag until it's ready, decoupling the deploy event (rebuilding and redeploying the artifact) from the release event (turning a feature on for users). Trunk-based development with small, frequent merges and a fast, reliable CI pipeline also reduces the pain, since the shared test suite runs quickly and merge conflicts stay small even though the artifact remains singular.
  • Why does a broken test in the UI module block a critical bug fix in the inventory module under this deployment model, and how severe is that really?
    Because the pipeline produces one artifact from one build, and that build only produces a deployable output if the full test suite passes — the inventory fix and the broken UI test are baked into the same commit history and the same CI run. It's a real severity concern for urgent fixes: teams often mitigate it with an expedited hotfix branch that skips the broken commit, or by disabling the flaky/broken test temporarily, but both are workarounds around the model, not features of it.
  • Does containerizing a monolith (e.g., wrapping the JAR in a Docker image) change any of this deployment trade-off?
    Not fundamentally — containerizing changes how the artifact is packaged and run (portable image vs. a JAR on a VM) and can simplify environment provisioning, but it's still one image built from one build, gating on one test suite, deployed as one unit. The single-deployable-unit trade-off (simplicity vs. coupled release cadence) is about the deployment granularity, not the packaging format.

It's like shipping a single crate that contains an entire furniture set rather than shipping each piece separately: loading one crate onto the truck is simple, but if the chair inside is damaged you have to unpack, fix, and reship the whole crate — table, sofa, and all — even though only the chair needed attention.

saying these in an interview costs you the question

  • Thinks a monolith can deploy just the changed module without rebuilding the whole artifact
  • Doesn't recognize that the full test suite gates every release in this model
  • Assumes deployment simplicity has no corresponding cost
  • Can't name a concrete symptom (slower release cadence, merge freezes) of the coupled release train
  • Confuses 'single deployable unit' with 'small codebase' — they're independent properties

context