Challenge 2: Explain Why Blue-Green's Rollback Is Instant — Possible Solution ==================================================================== WHAT HAPPENS TO THE "OLD" ENVIRONMENT IN EACH STRATEGY ------------------------------------------------------------ In BLUE-GREEN deployment, per this chapter's own description, the new version is deployed "entirely to the idle environment (green), while blue still serves all real traffic" — meaning the "old" environment (blue) is NEVER TOUCHED during the deployment process at all. It keeps running the exact same code, completely unmodified, serving all real traffic the whole time green is being deployed and tested. Only at the very end does traffic switch entirely from blue to green — a single, atomic routing change. In ROLLING deployment, the "old" environment doesn't exist as a distinct, untouched thing at all — the old version's instances are being PROGRESSIVELY REPLACED, a few at a time, by the new version. Once an instance has been replaced, the old code that used to run there is GONE from that specific instance; there's no separate, still-intact copy of "the old environment" sitting untouched somewhere, the way blue remains genuinely untouched in blue-green. WHY THIS MAKES BLUE-GREEN'S ROLLBACK FASTER AND CLEANER ------------------------------------------------------------- Because blue was never modified, "rolling back" in blue-green is simply switching traffic BACK to blue — the exact same routing-change mechanism used to switch TO green in the first place, just reversed. Blue is still there, still fully intact, still running the known-good version, ready to receive traffic again instantly. Rolling deployment has no equivalent "untouched, ready-to-go" copy of the old version to switch back to. A rollback means re-deploying the old version's code back onto the instances that were already replaced — effectively repeating the rollout process IN REVERSE, instance by instance, rather than a single instantaneous switch. Worse, if the rollback is initiated mid-rollout, the system is, per this chapter's own description, already dealing with "a mix of both versions simultaneously" — rolling back means untangling that mixed state, not simply flipping a single switch back to a clean, known-good starting point. WHY THIS WORKS AS AN ANSWER ------------------------------ The core structural difference is PRESERVATION vs REPLACEMENT: blue- green PRESERVES a complete, working copy of the old version throughout the entire deployment, making rollback a trivial routing flip; rolling deployment REPLACES the old version incrementally as it goes, leaving no equivalent intact copy to instantly switch back to — rollback there means reconstructing the old state rather than simply re-pointing to something that was never actually removed.