Do you know how much Pinterest used to spend to keep its web infrastructure running? It was $54 per hour. Thanks to a new architecture, this cost is now reduced to $20 per hour, by automatic shut down of servers when traffic load is low.
Pinterest needs a huge stack of servers to keep its users connected. The social network currently uses a Cost-Aware Architecture. The novelty of this cloud system is that it has a feature called “Auto Shut Down System” that can shut down servers when traffic load is lower than average.
By using this optimized infrastructure, Pinterest has cut its infrastructure cost from $54 per hour to $20 per hour. Ryan Park, Pinterest’s technical operations lead, explained the case as follows.
- 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.
If you want to know more, you will get it at Cloud Programming Directly Feeds Cost Allocation Back Into Software Design.
Source: High Scalability