Skip to content
WebsiteHosting.com

comparison Hosting

Colocated versus managed database failure domains

A separate database can survive an app-host failure, yet the app still cannot serve a request. Compare what each fault interrupts, who handles recovery, and what a restore exercise actually proves.

Latest recorded source check · P0120

What it means

Putting the database on a separate host means a database-host failure no longer takes down the application host with it. The tradeoff is that the application now needs a working network link to reach its data. Making the database provider-managed changes who operates it; it does not, by itself, keep the application available or prove that a backup can be restored.

A failure domain is a boundary within which one fault can affect several components. An app and database on one host share that host's fate. On separate hosts, they can survive different host failures but still share a larger failure domain, such as a region. The useful question is not just “Which components survive?” but “Can they still serve a request that needs the database?”

Try it

Simulation. Start with app-host as the synthetic failure. The site team operates both setups, no replica is selected, and a tested restore is assumed for each. Neither setup can serve the request: even where the separate database survives, there is no working application host to use it. Replica evidence is not evaluated for this fault.

Colocated versus managed database failure domains

Compare responsibility and failure coupling when app and DB run together or separately

Simulation
Modeled outcome: Comparison

Compare immediate application access, possible database failover and independently observed restore readiness. No uptime prediction.

Colocated versus managed database failure domains: synthetic scenario inputs
Replaces all inputs with the documented starting example and the indicated change. Reset restores the starting example.
Same fault, two placements

Colocated

  1. Dependenciesapp + DB on one host
  2. Data accessunavailable
  3. Operatorsite team
  4. Restore evidencestipulated tested restore

Separated

  1. Dependenciesapp + network + separate DB
  2. Data accessunavailable
  3. Operatorsite team
  4. Restore evidencestipulated tested restore

The access outcome, operating responsibility and restore evidence are separate. A failover candidate is not a recovered service.

Evaluated inputs

Required scenario evidence
provided
Synthetic failure
app-host
Restore exercise
verified
Separate DB responsibility
self-managed

Not evaluated: Independent DB replica evidence

Fixed two topologies and single event, all other dependencies healthy by assumption. Region hosts both DBs and replica. Colocated DB-host event means same physical host failure. Replica does not prove promotion, connectivity, data freshness or SLA. Same supplied restore evidence used symmetrically for comparison, not a provider guarantee.

About this model

The controls set only a local, bounded scenario. The computed branch is not a verdict about a live system. Inputs listed as not evaluated did not participate in this branch after validation.

Reset restores the original inputs. It does not change the open or closed state of help or FAQ answers.

Change only Synthetic failure to network. This means loss of the link between the app and a separate database, not loss of the site's connection to its visitors. The colocated app can still reach its database on the same host. The other app and database are both running, but the request cannot cross the failed link. The access results now differ even though the restore evidence has not changed. Reset returns to the original app-host failure and all its starting choices.

What a surviving replica tells you

Consider a different event: the database host fails. Give the separate database a healthy replica on another host in the same region, select provider-managed, and set the restore exercise to not-tested. Here is the comparison under that one fault:

QuestionApp and database on one hostApp and database on separate hosts
What does the request need?The app and database on the shared hostThe app host, the inter-host link, and a database that can serve the request
What access remains?Unavailable: the failed database host is also the app host.Failover candidate: the app host survives and there is a healthy replica, but access has not been established.
Who operates the database?The site teamResponsibility is shared; check the service agreement for the split.
What does the restore exercise establish?Restore unprovedRestore unproved

Compare the access row independently of the restore and operator rows. Changing who operates the separated database does not alter the selected fault or the application access calculation. Likewise, a successful restore exercise does not cause the request to cross a failed link.

A failover candidate is a database that might take over, not one that has already taken over. Replica health does not show that the replica has been promoted, that its data is fresh enough, or that the application has connected to it. With the same database-host failure but no replica, the separated result is unavailable. If replica health is unknown, that result is unknown instead. Neither change affects the colocated result.

Now widen the fault from one host to the shared region. Both database placements and the candidate replica are inside that boundary. Access is unavailable in both setups; the model does not use replica health to decide this case. If the restore exercise also failed, both setups report a failed restore. The exercise is separate evidence, not the reason the regional fault interrupted access.

In practice

Compare the same request under the same fault. If the concern is loss of the database link, a colocated setup avoids that particular dependency. If the concern is loss of the database host, a separate app host and a replica offer a possible route back to service. To assess that route, look for evidence that the replica can take over and the app can reconnect. Check the agreement to find out which steps belong to the provider and which belong to your team.

For recovery, ask a different question: Which backup was restored, and what did the exercise show? The backup's type and version can matter. For example, the PostgreSQL 18.7 release notes, section E.1.1, warn that previously taken incremental backups may be corrupt. They recommend taking a new full backup after updating before taking further incremental backups. That is a specific PostgreSQL 18 correction, not a rule for every managed database. Test the restore rather than using replica health as evidence that the backup is usable.

This comparison considers one event at a time and assumes other dependencies are healthy. It gives neither failure rates nor recovery times. Use placement to identify what can fail together, the service agreement to identify who must respond, and restore evidence to judge what can be recovered. None of those answers substitutes for the other two.

Frequently asked questions

Editorial questions based on the listed sources and explicitly labeled local examples.

Is separating the database always safer?

No. It changes shared failure domains while introducing a connection dependency. The useful comparison is which dependencies a particular event removes.

Does managed mean recovery is guaranteed?

No. Responsibilities vary with the particular managed service and how you integrate it. Check the actual recovery agreement, backups, restore evidence and application reconnect behavior; the label managed does not establish a recovery guarantee.

Can replica health prove a backup is restorable?

No. A replica addresses availability under some faults; a backup provides a separate recovery point. A restore exercise tests a particular backup and process. For PostgreSQL 18, also consider the specific incremental-backup correction in the 18.7 release notes.

Does this diagram estimate an SLA?

No. The outcomes are conditional on single stipulated failures. Actual availability also depends on failure frequency, correlation, detection and recovery behavior.

Sources & model boundaries

Primary references used for this explanation. The interactive example is an educational model, not a live check.

  1. AWS Reliability Pillar: fault isolation

    failure isolation. Workload and dependency placement across isolated locations mitigates shared failure risks; component resilience needs can differ.

    Checked .

  2. PostgreSQL backup and restore

    backup and restore. Database backup approaches include dumps, filesystem backup and continuous archiving, with distinct tradeoffs.

    Checked .

  3. AWS shared responsibility model

    Shared responsibility model. Managed-service responsibilities vary by service and integration. A service label does not specify your recovery agreement, restore evidence or application recovery.

    Checked .

  4. PostgreSQL 18.7 release notes

    E.1.1 Migration to Version 18.7. Warns that prior incremental backups may be corrupt and recommends a new full backup after updating.

    Checked .

Report an issue. Include the article URL and ID, not passwords or access keys.