Design the deployment and operations plane for an enterprise application offered in four modes: shared multi-tenant SaaS, dedicated hosted instances, customer-owned VPCs, and fully air-gapped installations. We must safely release code/config/policy, observe service targets, honor residency and customer keys, recover disasters, and upgrade a large fleet.
One Product. Four Sovereignties.
Design a managed deployment plane spanning shared SaaS, dedicated instances, customer VPCs, and air-gapped sites—with signed releases, policy-safe configuration, fleet monitoring, service targets, keys, residency, and recoverable upgrades.
The answer map
Do not memorize every box. Remember this path and rebuild the answer from it.
Understand the problem
Restate the goal in plain English. Name the one thing the system must never get wrong.
I will split the system into two levels. A global coordinator publishes approved software versions and rollout plans. Each region or customer environment runs the product and keeps serving even if it cannot reach that coordinator.
No environment downloads a moving “latest” version. A release names the exact code, database changes, settings, policies, and models. Air-gapped sites install that same signed package without an internet connection. I also need to know who approves upgrades, how much downtime is allowed, and which health data may leave each environment.
Step 1 · Set the scope
Name the users, must-have features, speed and safety goals, and what is out of scope.
Give actors, functions, NFRs, and what you will not build initially.
Release engineers publish software. Customer and site operators approve and run it. Security teams set location and key rules. Reliability engineers and support teams monitor health and recover failures. Version one tracks every deployment, builds and signs exact release packages, rolls them out in small groups, checks health, detects drift, rolls back, and supports offline import and audit export.
For this mock, we manage 1,200 deployments in 12 regions. Losing the global coordinator must not stop customer applications. For the shared service, the recovery point objective (RPO) allows at most five minutes of lost work, and the recovery time objective (RTO) is under 30 minutes. A critical security patch reaches connected sites in 24 hours and offline sites in 72. We do not create permanent customer forks or hidden remote access to air-gapped sites.
Release engineers, SRE, customer/VPC/site operators, customer admins, security/compliance, support, auditors.
Fleet inventory, placement, signed bundles, target version and settings, rings, migrations, drift, telemetry, support, DR, offline import/export.
Pin code/config/policy/model digests. Secrets stay local. Data planes survive control loss. Every upgrade journaled.
1,200 units/12 regions. 99.95–99.99% tiers. Critical connected patch <24 h; offline bundle <72 h; tiered RPO/RTO.
Residency, customer/CMK keys, mTLS identity, signed outputs, narrow support access, no persistent air-gap backdoor.
Customer forks, unsigned emergency changes, silent config breakage, raw central telemetry, universal remote shell.
Step 2 · Do the useful math
Estimate only what changes the design. After each number, say why it matters.
Assume 1,200 deployment units, 40 concurrent upgrades, 20 minutes each, 2% manual-intervention rate, 30 telemetry samples/minute/deployment, and 1 KB/sample. Do the math.
A no-pause fleet pass is 30 waves and 600 minutes—10 hours. Two percent means about 24 interventions, enough to overwhelm a small on-call if we do one global blast. Canary rings and automatic halt are mandatory. Telemetry is 36,000 samples/minute, 600/s, about 600 KB/s or 51.8 GB/day before replication and index amplification. Logs/traces can be orders of magnitude larger, so budgets, sampling, and tenant-safe labels matter.
The fleet unit may be a shared regional cell rather than one customer. I size and roll out by fault domain and risk tier, not only count. Air-gap upgrades have human lead time, so supported-version windows and compatibility matrices are a product feature.
Fleet rollout and telemetry envelope
Steps 4–5 · APIs and data
Start with the few records the system cannot work without. Then add simple endpoints around them.
What are your records and APIs? Distinguish release, configuration, policy, and secret.
A ReleaseBundle is a package we never change after signing. It contains application images, database steps, models, a software bill of materials (SBOM), compatibility results, and the signature. A ConfigSet contains nonsecret operating values. A PolicySet contains dated business and security rules with separate approvers. A SecretRef points to a local secret manager or customer key service; secret values never enter the global coordinator.
DeploymentDesiredState names the exact release, configuration, policy, secret reference, location, maintenance window, and key rules wanted for one site. The local worker reports what is actually running with a sequence number that only increases. APIs promote, approve, pause, roll back, report drift, and export signed offline packages.
Records and how we find them
| Record | Main key / retry key | Fields we never overwrite | How we find it |
|---|---|---|---|
Deployment | (deployment_id, environment) | tenant/cell, mode, region, tier, owner, support window | fleet inventory; risk/version skew |
ReleaseBundle | release_digest | images/assets/migrations, SBOM, provenance, compatibility, signature | promotion; offline export; CVE impact |
ConfigSet | (config_id, version_digest) | schema, nonsecret values, scope, author/approval | desired-state composition; diff |
PolicySet | (policy_id, version_digest) | effective dates, rules/security behavior, dual approvals | tenant/runtime policy selection |
DesiredState | (deployment_id, generation) | release/config/policy/secret-ref digests, placement, window, channel | reconcile; drift; rollback |
UpgradeAttempt | (deployment_id, operation_id) | generation, stage journal, pre/post checks, receipts, failure/rollback | resume; fleet rollout audit |
TelemetryEnvelope | (deployment_id, interval_start, schema_version) | redacted aggregates, observed generation, signature | SLO/fleet health; offline export |
Simple API
POST /v1/releases signed manifest + attestations
POST /v1/releases/{id}:promote source ring, target ring, approval
PUT /v1/deployments/{id}/desired-state If-Match: generation
POST /v1/rollouts selector + concurrency + gates
POST /v1/rollouts/{id}:pause|resume|rollback reason + dual approval
POST /v1/deployments/{id}/observations generation + health receipt
GET /v1/fleet/drift?region=&mode=&cursor= desired vs observed
POST /v1/offline-bundles target base/version + expiry
POST /v1/offline-attestations signed install/health receipt
POST /v1/support-sessions scope + TTL + customer approvalSteps 3 and 6 · Draw, then follow one request
Explain the system in a few parts. Then follow one real request from the user to the final result.
Draw the architecture across four modes and trace one upgrade.
I would draw three parts: a global coordinator, a protected release builder, and a local deployment worker in each environment. The coordinator stores approved versions and rollout plans. The builder creates a complete package in a clean environment, scans it, signs it, and sends it to a regional registry or offline export. The local worker verifies the signature, checks local policy, takes a backup, installs without traffic, runs database steps and health checks, then switches traffic.
Shared software as a service (SaaS) uses regional cells. A dedicated customer gets an isolated stack. A virtual private cloud (VPC) uses a customer-side worker with an outbound-only connection. An air-gapped site imports the signed package manually. If the coordinator disappears, every site keeps serving its last approved version and may roll back locally.
Roll forward in rings. Migrate by contract
Minimum soak, domain health, expand/contract schemas, automatic halt, and operation journals make upgrades recoverable.
Deep dive into fleet rollout and database compatibility. A migration cannot be instantly reversed.
Rollout rings are internal test, one synthetic cell, employee tenants, low-risk shared cells, representative dedicated/VPC canaries, broad connected fleet, then offline channels. Advancement requires a minimum soak, service target burn, migration cross-checking, and domain quality gates. Failures halt the ring automatically. We cap concurrent units per region/account/customer and never consume all redundancy at once.
Database changes use expand/contract: add backward-compatible structures. Deploy code that can read old/new and dual-write if necessary. Backfill with throttling and checkpoints. Verify counts/main rules. Switch reads. Only remove old schema after the minimum supported version ages out. Rollback changes the application route and feature flag. Irreversible data transformation requires preimage/archive and a forward-fix plan. Bundle compatibility says which code can read each schema/config/policy version.
Version 12 first goes to a test cell, then one low-risk customer, then 5% of connected customers. Each group must stay healthy for a set time. If payment errors rise, promotion stops before the rest of the fleet is touched.
| Migration phase | Compatibility rule |
|---|---|
| Expand | Add schema that both old and new code tolerate. |
| Dual-read/write | One authority; idempotent backfill; compare invariants. |
| Switch | Atomic route/feature pointer with domain health gate. |
| Contract | Remove old schema only after minimum supported code ages out. |
| Failure | Use journaled preconditions and tested rollback/forward-fix—not blind rerun. |
Operate privately without a hidden backdoor
Customer-side verification, outbound identity, schema-limited telemetry, signed offline bundles, and explicit support consent preserve sovereignty.
Deep dive into VPC and air-gap operations. How do support, telemetry, and trust work without creating a backdoor?
The customer-side reconciler has a narrow, documented contract: verify approved bundle, apply target version and settings, collect redacted health, and produce signed receipts. It cannot access application data by default. VPC connectivity is outbound mTLS with customer allowlists, short-lived workload identity, and optional private endpoints. Support uses explicit time-bound customer approval, command allowlists, session recording, and break-glass—not persistent vendor SSH.
An air-gap bundle contains images, dependencies, models, migrations, SBOM, vulnerability data, schemas, conformance fixtures, and signatures. The import station validates chain of trust, anti-rollback policy, completeness, hardware/runtime compatibility, and clean-room tests. Telemetry export is a customer-reviewed, schema-limited signed package with aggregates and redaction. Diagnostics can be generated locally. We publish offline security advisories and delta/full bundles, and receive an installation/health attestation when policy permits.
An air-gapped hospital downloads a signed update on approved media. Its local import station checks the signature, software list, current base version, and free space. No vendor connection enters the hospital network.
offline_bundle = release artifacts + migrations + models + dependencies
+ SBOM + vulnerability notice + conformance fixtures
+ compatibility matrix + rollback/forward-fix runbook
+ manifest signature + expiry + target base versionsWhat if it breaks?
Protect the correct data first. Then contain the problem, recover, and explain what users see.
Ring three corrupts a data index in 2% of dedicated instances. Health checks only verify HTTP 200. Some schema steps completed. Revise.
The health gate was inadequate. I halt the rollout automatically on the key business-health signal, isolate affected units, and keep unaffected units on the prior desired generation. For each affected deployment, the runbook inspects migration journal and index cross-checking. If the old code remains schema-compatible, route back and rebuild the derived index from source of truth data. If not, execute the tested forward-fix under incident approval. We never rerun an unsafe-to-retry migration blindly.
Future gates include synthetic business transactions, count/checksum main rules, query-result parity, background job health, and a representative soak. Each migration step has a unique ID, precondition, checkpoint, postcondition, retry class, and compensating/forward action. The 2% pattern is sliced by database/version/region to find a compatibility cohort before resume.
What if timing gets messy?
Retries, delayed messages, and two updates at once are normal. State the rule that keeps one clear result.
A critical zero-day requires a patch today. The global coordinator is down, three VPC customers froze change, and six air-gapped sites are two releases behind.
Serving remains on last target version and settings. Release signing and saved item distribution have an emergency continuity path separated from general orchestration, with dual control and pre-authorized procedures—not an unsigned shortcut. Regional reconcilers can accept a signed emergency bundle from replicated catalogs. VPC customers receive impact, compatibility, and compensating-control guidance. We respect their authority and record risk acceptance rather than forcing a backdoor.
For air gaps we build patches against every supported base version or require an explicit staged upgrade, then ship signed full/delta bundles through the agreed channel. Sites validate locally and return attestation later. If an old version is outside support, that is visible in the fleet risk ledger before the incident. The long-term fix is support-window enforcement, dependency inventory/SBOM search, and regular offline upgrade rehearsals.
Keep it safe and running
Cover overload, security, monitoring, and disaster recovery in that order.
Cover customer keys/residency, idempotency, overload control, monitoring, service targets, and DR.
Placement policy is evaluated before provisioning and continuously: customer data, backups, indexes, logs, and keys remain in allowed regions. Customer separate encryption keys wrap data keys. Dedicated/VPC may use customer-managed KMS grants. Key rotation is versioned and resumable. Deletion revokes/wipes wrapped keys only under retention/legal-hold policy. Queue and telemetry labels use deployment IDs, never raw customer data.
Cross-check uses generation and operation IDs. Completed steps are journaled so retries are retry-safe. Rollout queues enforce per-fault-domain concurrency, maintenance windows, retry budgets, and emergency priority without starving repair. Observe desired/observed drift, version skew, upgrade stage age/failure, service target burn by cell, migration main rules, telemetry gaps, backup freshness/restore success, key errors, residency violations, and support access. DR is per tier: cell evacuation for shared, warm region or documented rebuild for dedicated, customer-coordinated VPC/air-gap. Quarterly restore proves RPO/RTO.
Desired/observed generation, drift age, version/support skew, cross-checking lag, offline attestation age.
Ring health, service target burn, business synthetic, migration main rules, stage failures, intervention/rollback time.
Per-region/fault-domain concurrency, maintenance windows, soak timers, retry budgets, emergency/repair priority.
Placement policy across data/backups/logs/indexes, envelope/CMK keys, resumable rotation, legal-hold-aware deletion.
Outbound mTLS, short-lived workload identity, customer-approved scoped commands, recorded break-glass, no standing shell.
Backup freshness is not enough: restore, cross-check, cell evacuation, region failover, and offline local recovery rehearsals.
Rollout and trade-offs
A credible production answer defines how it earns trust and how it retreats safely.
Rollout this platform and name the unavoidable trade-off.
First standardize release version lists and conformance without changing deployment. Onboard shared internal cells. Add dedicated instances. Then VPC agents with two customers. Finally offline bundle/import/receipt workflows. Run fleet inventory and drift in read-only mode before automatic cross-checking. Prove backup restore and rollback for each mode. Publish support/version policy and error budgets jointly with customers.
The trade-off is fleet uniformity versus customer sovereignty. Forcing one version simplifies operations but violates change control and air-gap reality. Unlimited skew multiplies vulnerability and test matrices. I set explicit supported windows, compatible expand/contract contracts, strong incentives and visibility, while preserving customer approval and a narrow emergency process.
- Define one release/config/policy/secret contract and support matrix.
- Produce signed version lists and conformance for existing deployments.
- Onboard internal/shared cells with read-only drift first.
- Automate dedicated deployments and prove restore/rollback.
- Pilot outbound-only VPC reconcilers with two customers.
- Exercise offline export/import/attestation and a security patch.
- Enable automatic remediation only for low-risk drift.
- Publish version-risk, service target, RPO/RTO, and intervention evidence per mode.
One-minute spoken recap
Practice this synthesis until it sounds conversational rather than memorized.
One-minute summary.
I’ll summarize write-once target version and settings, independent data planes, ringed upgrades, sovereignty, and recovery.
Reference shelf
Definitions, traps, and the final checklist stay outside the timed mock.
- Air gap
- An environment with no runtime network route to external/vendor systems.
- Anti-rollback
- A policy preventing installation of an older vulnerable or incompatible release.
- Attestation
- Signed evidence about an artifact build or deployment action.
- Cell
- A bounded deployment fault domain containing a subset of tenants/workload.
- Conformance suite
- Tests proving a deployment mode satisfies the same product contract.
- Desired state
- The exact immutable artifact/config/policy generation a deployment should run.
- Expand/contract
- Backward-compatible schema evolution that delays deletion until old code is gone.
- Fleet skew
- The distribution of versions/configurations across deployments.
- Hermetic build
- A build with declared, pinned inputs and no undeclared dependency fetches.
- Reconciler
- A controller that compares desired and observed state and applies idempotent steps.
- SBOM
- Software bill of materials: inventory of shipped components.
- Soak
- A minimum observation period before rollout advances.
- Assuming every customer equals one deployment unit.
- Making serving depend synchronously on the global coordinator.
- Fetching mutable latest images or policy at runtime.
- Putting secrets inside desired-state documents.
- Calling HTTP 200 a sufficient release health check.
- Running destructive schema migration before compatible code exists.
- Retrying an unknown migration step without an operation journal.
- Centralizing raw VPC/air-gap logs by default.
- Installing a persistent vendor support backdoor.
- Forcing an emergency patch without customer authority.
- Allowing unlimited version skew with no compatibility matrix.
- Claiming DR because backups exist without timed restore proof.
- Clarified actors, authority, business harm, and out-of-scope.
- Did correct BOTEC and named the variable that changes the architecture.
- Defined stable IDs, versions, access paths, and retry keys.
- Separated source of truth state from derived indexes and model output.
- Explained consistency, retries, overload control, and unknown outcomes.
- Revised the design after both failure injections.
- Covered customer isolation, secrets, least privilege, deletion, and audit.
- Named golden signals, domain quality metrics, rollout gates, and rollback.