CDP:Scheduled Scale Out Pattern
Increasing or Decreasing the Number of Servers Following a Schedule
Problems to Be Solved
The Scale-Out Pattern is effective when handling high levels of traffic in a web service that is structured in a Cloud environment. However, when monitoring the load status to manually add virtual servers, or when automatically adding instances depending on the load statuses of the virtual servers, the creation of instances may not be able to keep up with the demand when there is a sudden increase in accesses (such as a case where traffic doubles in less than five minutes).
Explanation of the Cloud Solution/Pattern
Use scale-out through scheduling when the timing when there will be an sudden increase in traffic is understoodi n advance. While the fundamental structure is similar to that of the Scale-Out Pattern, the key difference is that of performing the scale-out through specifying the timing for doing so. You can handle a rapid increase in traffic robustly by completing the scale-out in advance, and you can minimize wasted costs by performing the scaling immediately prior to the rapid increase in traffic.
Auto Scaling in AWS has a function for specifying a time for changing the settings. You can use this function to configure scheduled scale-out. You can also perform Scale-in through specifying a time band when the traffic is anticipated to settle down.
- Reference the Scale-Out Pattern to set up Auto Scaling (including scale-out triggers and scale-in triggers).
- Specify the timing with for increasing the number of EC2 instances and change the setting for "minimum number of instances (– – – min-size)" to the number of instances to be provided. * At the specified time, new EC2 instances will be launched, up to the minimum number of instances specified.
- If the minimum number of instances again is reduced with the timing with which the load is to settle down, then scale-in will follow the trigger that has been set.
- This allows you to increase the number of EC2 instances following the schedule with which the traffic volume is anticipated to increase.
- This reduces your cost because the number of EC2 instances is reduced when there is little traffic.
- When compared to scale-up, the limit on processing capability is extremely high because the required number of EC2 instances can be provided in parallel, under the control of the ELB.
- Be aware that the specified time is in terms of UTC.
- When there is to be a sudden increase in traffic, you must scale-out the ELB in addition to scaling-out the EC2 instances. In this case, you should perform pre-warming.
See the Scale Out Pattern.