Design Safe Patching and Image Rollout for a Storage Fleet
Patch and fix the data-plane hosts of a storage service without hurting customers, and make sure every new host starts on the latest approved image.
Problem statement
Design the system that keeps the data-plane hosts of a storage service patched and up to date. It must answer three questions: how do we patch hosts without impacting customers, how do we reliably deploy bug fixes, and how do we make sure newly launched hosts run the latest image?
For this exercise, assume the storage service is replicated, with one region, three availability zones, and about 20,000 data-plane hosts. Each data chunk keeps three replicas, one in each zone, and a write succeeds once two replicas acknowledge it.
A storage metadata service already owns chunk placement and knows which hosts hold replicas of the same chunks. Customers keep reading and writing during every rollout.
For this exercise, assume every change ships as a release: an OS security patch or a storage-software bug fix is built into a new, immutable, versioned machine image. Updating an existing host means draining it, applying the release, rebooting, and checking its health.
The host keeps its data disks, so its replicas are still on disk when it returns, but they must catch up on writes made while the host was down before they count as healthy and up to date. New hosts are launched to add capacity or replace failed ones, and they boot from an image chosen at launch time.
A host is not finished until it has rebooted into the new version, passed health checks, and caught up its replicas; downloaded or installed does not count. Operators must be able to pause a rollout and roll back to the previous approved release.
Building the storage engine, cross-region replication, hardware repair, and the customer-facing API are out of scope.
What to build
- Turn an OS patch or a bug fix into a tested, versioned machine image and approve it for rollout only after it passes automated tests and a canary.
- Roll an approved release across existing data-plane hosts in waves without reducing customer availability or putting acknowledged writes at risk.
- Stop a rollout automatically when health gets worse, and let operators pause, resume, or roll back to the previous approved release.
- Make every newly launched or replaced host run the current approved image before it stores data, and find and fix hosts that drift from the target version.
At scale
- For this exercise, assume one region with three availability zones and about 20,000 data-plane hosts; each chunk keeps three replicas, one per zone, and a write needs two replica acknowledgments.
- For this exercise, assume updating one host (drain, apply, reboot, verify) takes about 10 minutes, and the storage service starts copying a host's data elsewhere if the host stays unavailable for more than 30 minutes.
- For this exercise, assume a routine release must reach the whole fleet within 7 days, and an urgent security patch or bug fix within 48 hours.
- For this exercise, assume about 50 hosts per hour are launched to add capacity or replace failed hosts, and on a normal day about 0.5% of hosts are unhealthy for reasons unrelated to any rollout.