We've long known one of the virtues of the cloud is, through the magic of services and automation, that systems can be shut or tuned down when not in use. What may be surprising is how much money can be saved.
This aspect of cloudiness got a lot of pub at AWS re:Invent and is being rebranded under the term Cost-Aware Architecture. An interesting example was given by Ryan Park, Pinterest’s technical operations lead:
- 20% of their systems are shutdown after hours in response to traffic loads
- Reserved instances are used for standard traffic
- On-demand and spot instances are used to handle the elastic load throughout the day. When more servers are needed for an auto-scaled service, spot requests are opened and on-demand instances are started at the same time. Most services are targeted to run at about 50% on-demand and 50% spot.
- Watchdog processes continually check what's running. More instances are launched when needed and terminated when not needed. If spot prices spike and spot instances are shut down, on-demand replacement instances are launched. Spot instances will be relaunched when the price goes back down. Spot capacity issues are rare and rarely are apparent to users.
- Using this approach costs have gone from $54 per hour to $20 per hour
- Only 2 weeks of engineering were required to build the system and with very little maintenance needed, it saves a lot of money.
We are in very early days of Adaptive Architectures. What is being managed are relatively large resource abstractions running on relatively large scale computer abstractions. Yet it's a start. More at Cloud Programming Directly Feeds Cost Allocation Back Into Software Design.