Disaster recovery

Running again after the disaster · Part of Reliability and security

Key idea

Practice

6 questions · about 3 min

Explained step by step

Disaster recovery

Disaster recovery (DR) is the process of regaining access and functionality of infrastructure after a natural disaster, a cyber attack or a business disruption. It relies on replicating data and processing in another place, far from the disaster. If the data center in New York floods, the data is still in, for example, Chicago, and work can move there. It's like leaving a spare house key with a friend: if you lose yours, you still get in.

A good disaster recovery plan minimizes interruption and downtime, limits damage, allows fast restoration and helps keep customers. It's rarely asked in system design interviews, but it's worth understanding the basics. An online store making $10,000 per hour loses $240,000 if it takes 1 day to come back. It's like a fire drill: if you practiced, everyone is out in 3 minutes; if not, it's chaos.

RTO

RTO (Recovery Time Objective) is the maximum acceptable delay between the service going down and coming back. It defines how much time without service is tolerated. An RTO of 4 hours says that, whatever happens, in 4 hours the service must be running. It's like a repair shop's guarantee: «we'll give your car back in 48 hours».

RPO

RPO (Recovery Point Objective) is the maximum acceptable time since the last recovery point, that is, how much data may be lost. If you back up every 1 hour, in the worst case you lose 1 hour of data: your RPO is 1 hour. RTO measures how long you take to come back; RPO, how much you lose. It's like saving a document: if you save every 10 minutes and the power goes out, you lose at most 10 minutes of work.

Hot site

There are 3 common strategies. Backup: the simplest, storing data off-site or on a removable drive. Cold site: setting up basic infrastructure in a second place, which has to be turned on and loaded if something happens. Hot site: keeping up-to-date copies of the data at all times; it's pricier and takes more work to set up, but it slashes downtime. It's like having a spare car: a photo of the car (backup), a car in the garage with no gas (cold), or one with the engine running (hot).

Cold site

Picking the strategy depends on the RTO and RPO you need, and how much you want to pay. A personal blog is fine with a daily backup: an RPO of 24 hours. A mid-size store can use a cold site and come back in a few hours. A bank needs a hot site: RTO and RPO of minutes. It's like insurance: the more it covers, the more it costs, and not everyone needs full coverage.

Terms in this lesson

Arki, the beaver mascot

Your next interview starts with 5 minutes today.

Free on iOS and Android. Start from zero, no account needed.

Key idea

Running again after the disaster