**Parent Topic**: [[Software/README]] ## The Hot/Warm Hazard In a Hot/Warm architecture, reads are served from any datacenter but writes go to only one. To keep "decent site performance, you're not going to use synchronous data replication" — so when a write occurs, "you'll make a best effort to get it to all other locations as soon as you can, but with no guarantees." Replication lag "can range from seconds to minutes to hours." ## The Failure Case "What happens when a write occurs in one location followed by an immediate read in another location? The update may not have arrived yet, and you can get stale data." Christian names these **critical reads** — the specific reads that must reflect a just-made write but might hit a not-yet-replicated replica. ## The Mitigation "You need to identify and mitigate critical reads, through either error handling or proxying the read back to the original site." You don't need every read to be consistent — only the critical few that immediately follow a write — so target the mitigation narrowly. This is the multi-datacenter form of Schwartz's read-after-write problem ([[Async Replication Lag]]); session-based routing is the database-layer analog. --- *Source: [[Web Operations]] (Allspaw & Robbins, O'Reilly 2010) — Ch 17 — Things That Go Bump in the Night*