skip to content

In the deployment stamp pattern, what does a single stamp typically include, and why is the data tier bundled into the stamp rather than left as one shared database behind many stamped app tiers?

level: middleimportance: must knowfreq 50%

answer

  1. stamp = app tier + own DB + caches/queues bundled
  2. DB is the real bottleneck, not app tier
  3. shared DB = no isolation gained
  4. migrations roll out wave-by-wave per stamp
  5. per-stamp backup/DR/monitoring overhead

basics

~20 s

A stamp usually bundles the app servers AND their own database (plus caches/queues) together as one unit. If the database were shared across stamps, you wouldn't actually raise your capacity ceiling or contain failures — you'd just have duplicated app servers hitting the same bottleneck.

solid answer

~50 s

A deployment stamp is the full vertical slice of the stack needed to serve a tenant group end to end: app/API tier, its own database (or schema), caches, message queues, and any per-tenant background workers — all provisioned and versioned together as one unit. The data tier has to be included, not shared, because the database is usually the actual bottleneck (connection limits, IOPS, lock contention) and the actual source of blast radius (a bad migration or corruption event). If ten stamps of app servers all pointed at one shared database, you'd have multiplied your compute without solving either problem — the database would still be a single point of failure and a single capacity ceiling. Bundling the data tier per stamp is what makes each stamp genuinely independent: it can be deployed, scaled, backed up, and even deleted without any other stamp knowing or caring.

go deeper

for a junior

Should know a stamp includes both the app tier and its own database, not just app servers.

for a middle

Should explain specifically why a shared database across stamps defeats the pattern's purpose — bottleneck and blast radius both remain.

for a senior

Should describe wave-based/canary migration rollout across stamps and the backup/monitoring overhead multiplied by stamp count.

for a principal

Should weigh the utilization trade-off (pooled vs. per-stamp headroom) quantitatively and design migration/rollout tooling that's safe against stamp drift.

## What one stamp bundles A deployment stamp is best understood as a **full vertical slice of the system**, not just a horizontal slice of the compute tier. Concretely, one stamp typically bundles: - The application/API tier — however many app server instances that stamp needs. - Its **own dedicated database or database instance** — this is the critical piece. - Any caching layer used by that tier. - Message queues or event brokers scoped to that stamp. - Often per-stamp background job workers or schedulers. All of these are provisioned together as one deployable, versioned unit — usually via an infrastructure-as-code template that can be re-run to produce a new, identical stamp elsewhere. The stamp is the **atomic unit** of both scaling (you add capacity by adding a whole new stamp) and isolation (a stamp fails, degrades, or gets upgraded independently of every other stamp). ## Why the data tier sits inside the boundary The reason the data tier specifically has to be inside the stamp boundary, rather than factored out into one shared database that many stamped app tiers point at, comes down to where the real constraints live. In most systems, the app/API tier is comparatively easy to scale horizontally — it's usually stateless, so you can add replicas cheaply and a load balancer distributes traffic across them without much coordination cost. The database is where the hard limits actually are: - Maximum connection counts. - IOPS and storage throughput ceilings. - Lock contention between concurrent transactions. - The fact that a single logical database is a natural point of failure — a bad migration, an accidental mass-delete, a corrupted index, a runaway lock. If you stamp out many copies of the app tier but leave them all pointed at one shared database, you've added compute capacity without touching the actual bottleneck — the database still saturates at the same load, and a database-level incident still takes down every tenant across every 'stamp,' which defeats the entire purpose of stamping (both the capacity-ceiling goal and the blast-radius-containment goal go unmet). So the data tier has to move with the app tier as one bundled, independently-provisioned unit for the pattern to deliver on its promises. ## The operational weight of bundling The trade-off of bundling the data tier this way is real operational weight. Each stamp's database needs its own backup schedule, its own point-in-time-recovery posture, its own monitoring for slow queries and connection saturation, and its own capacity headroom sized for the tenants assigned to it. Schema migrations, instead of running once against one database, now have to run against every stamp's database — usually rolled out in waves (a canary stamp first, watched for a period, then the rest) specifically because a bad migration should only ever be able to hurt one stamp at a time, which is the whole point, but it does mean migration tooling has to be built to run safely and idempotently across a fleet rather than assuming a single target. Storage and compute utilization also gets less efficient: | One shared single database | Per-stamp databases | |---|---| | A shared single database can multiplex demand across all tenants and smooth out spikes statistically | Whereas N independent per-stamp databases each need enough headroom for their own assigned tenants' peak load, so you typically carry more aggregate idle capacity than a single pooled system would | ## Failure modes in production Failure modes that show up in production because of this bundling include: - A stamp's database silently approaching its connection or storage ceiling while operators are watching fleet-wide averages that don't surface the one hot stamp. - A migration script that works against a freshly-provisioned stamp's empty schema but fails against an older stamp that has accumulated schema drift from manual hotfixes. - **Cost sprawl**, where many low-traffic stamps each carry a minimum viable database footprint (even a lightly-used tenant group still needs a database sized for baseline availability and backups), so the aggregate infrastructure bill grows faster than aggregate usage would suggest. ## Where it shows up A concrete, named real-world example of this shape is Microsoft's own description of the Deployment Stamps pattern in the Azure Architecture Center, which explicitly defines a stamp as including the application tier and its dependent services and data stores as one unit, and calls out that customers can be assigned to a stamp, multiple customers can share a stamp, or a customer can even get a dedicated stamp for isolation or compliance reasons — all of which only works because the data tier travels with the app tier inside the stamp boundary.

  • If two stamped app tiers pointed at one shared database, what specifically fails to be achieved?
    Both of the pattern's main goals fail: you haven't raised the capacity ceiling, because the database — usually the actual bottleneck — still serves the combined load of every 'stamp'; and you haven't contained blast radius, because a database-level incident (bad migration, corruption, saturation) still takes down every tenant across every stamp at once.
  • How do teams handle schema migrations across many independent per-stamp databases safely?
    Typically via wave-based rollout: apply the migration to one canary stamp first, monitor it for a defined period, then roll it out to the rest in batches. Migration tooling needs to be idempotent and safe to re-run per-stamp, since stamps can drift from each other (different data volumes, occasional manual hotfixes) even though they started from the same template.
  • Does bundling the data tier per stamp make per-stamp cost efficiency better or worse than one shared database?
    Generally worse in aggregate: a single shared database can multiplex demand across all tenants and smooth out peaks statistically, while N independent databases each need their own headroom sized for their assigned tenants' peak load plus a baseline footprint for availability and backups, so total idle capacity tends to be higher.

It's like giving each branch of a bank its own vault instead of one central vault that every branch shares over a phone line — opening more teller windows (app servers) doesn't help if every branch still has to queue for the same single vault (shared database); the vault has to be duplicated too for the branches to be truly independent.

saying these in an interview costs you the question

  • Thinks a stamp is only the app/compute tier
  • Believes sharing one database across stamps still delivers isolation or a higher capacity ceiling
  • No awareness that migrations must be rolled out per-stamp, often in waves
  • Assumes per-stamp databases are cheaper or more efficient than one shared database

context