MyMisPal
← Cloud computing lessons
Lesson 5 of 9

Scaling and availability: staying up during Ramadan

In the last ten days of Ramadan, orders in Nakhla's app jump fivefold. If the server can't cope, the app goes down on the most important days of the year. There are two ways to scale:

Vertical (scale up)A bigger server: more CPU and memory. Simple, but it has a ceiling and often needs a restart.
Horizontal (scale out)More servers working together, with a load balancer spreading requests across them. Almost no limit, and if one fails the rest carry on.

Auto scaling: set a rule like “if CPU is above 70% add a server; below 30% remove one”. The system grows at peak and shrinks afterwards, and you pay for what you use.

Availability is measured as a percentage. When a system depends on components in series (the app needs the server and the database), overall availability is the product of each. With two copies in parallel, the system fails only if both fail. Try it:

Overall availability99.750%

Expected downtime a year: about 21.9 hours

Watch outEach extra “nine” matters a lot: 99% ≈ 3.65 days of downtime a year, 99.9% ≈ 8.8 hours, 99.99% ≈ 53 minutes. And each extra nine costs more than the last.
Spotted a mistake on this page, or have an idea to improve the site?