The problem
A move to the cloud is a design decision, not a copy
Four servers and a NAS in a rack whose contract ends. 20,000 bookings a day, 99.9% availability wanted.
A booking app runs on four servers and a file store, in a rented rack whose contract ends in six months. It takes twenty thousand bookings a day, keeps 500 gigabytes of files and a 200 gigabyte database, and the business wants it up 99.9 percent of the time. Finance asks one question: what will it cost each month?
The estimate
Size from the numbers, not from the old hardware
About 24 requests a second at peak; files grow 15 GB a month; the database needs 2 cores; 99.9% allows 43.8 minutes down.
Twenty thousand bookings, about thirty requests each, spread over a day, is under seven requests a second, and about 24 at the evening peak. Two small web servers. The files grow 15 gigabytes a month, so they need storage that grows by itself. The database server uses 15 percent of four cores, so two will do. And 99.9 percent allows about forty-four minutes of downtime a month. Every choice is checked against that.
Lift and shift
Lift and shift: the same machines, rented by the hour
Four VMs in one zone and a big disk: about $467 a month at example list prices.
The fastest move copies the rack: four virtual machines of the same sizes in one zone, and the files on a large disk. Nothing in the app changes. At example list prices it costs about $467 a month. Before agreeing, check it against the estimate.
The cause
Lift and shift moved the rack, with every weakness of the rack
One VM is promised 99.5%, below the 99.9% target. The database is still yours to run, and machines idle all night.
Everything is in one zone, and a single machine is promised 99.5 percent: over three and a half hours down a month, against forty-four minutes allowed. The database is still ours to patch, back up and fail over. The files sit on a disk that must be grown by hand. And four machines sized for the peak run at five percent all night. The bill was low because the risks stayed.
The redesign
Two zones and managed parts meet the target, and cost more
A load balancer over two zones, managed MySQL with a standby, files in object storage, a CDN: about $718 a month.
Users reach a content delivery network and a load balancer. Behind it, web and app servers in two zones, and a managed MySQL database with a standby in the second zone that takes over in a minute or two, backups included. The files move to object storage, which grows by itself. More parts run, so the bill rises, to about $718 a month.
The trade-off
Pay for what the target needs, then commit to the floor
A one-year commitment on the always-on part brings the redesign to about $559 a month.
Lift and shift: $467 a month, with the old risks. The redesign at full price: $718. But four machines and the database run all the time, so we commit to them for a year, at about thirty percent off, and keep the extra web servers on demand. $559 a month, for an app that meets its target.
The design
The same design on every provider; only the names change
CDN, load balancer, scaling VMs, managed MySQL, file storage, identity and commitments, on AWS, Azure and Google Cloud.
Here is the finished design as parts, each named on all three providers. A CDN. A load balancer. Virtual machines that scale. Managed MySQL with a standby. Object storage for files. Roles or identities instead of passwords. And a commitment on the bill. Design with the ideas first; then choose the provider. Each row opens the lesson that teaches that part.
A real case
Netflix rebuilt for the cloud rather than copying
After a 2008 database failure stopped DVD shipping for three days, Netflix spent seven years rebuilding on AWS.
In August 2008 a database corruption stopped Netflix shipping DVDs for three days. Netflix decided to move away from single points of failure like that one, to distributed systems in the cloud, and chose AWS. It chose not to forklift its systems unchanged, and rebuilt most of them instead. It took seven years. The last data centre parts of streaming were shut down in January 2016. By then Netflix had eight times as many streaming members, and availability nearing four nines. Our booking app made the same choice at a smaller scale.
Lesson complete
You finished “Moving a booking app to the cloud”
Nicely done.