Perform planned maintenance
When you change application settings or add new assets, you will likely want to make these changes on one origin server at a time. Going server by server reduces the risk of changes and ensures a more consistent user experience.
To take servers out of rotation gradually (important for session-based load balancing), enable origin drain on your load balancer. This option is only available for proxied load balancers (orange-clouded) .
To direct traffic away from your origin server immediately, adjust settings on the pool or monitor .
Before you begin
Before disabling any origin server, review the settings for any affected load balancers and pools.
If a pool falls below its Health Threshold, it will be considered Unhealthy and — depending on the load balancer setup and steering policy — a load balancer may begin routing traffic away from that pool.
Gradual rotation
With session-based load balancing , it is important to direct all requests from a particular end user to a specific origin server. Otherwise, information about the user session — such as items in their shopping cart — may be lost and lead to negative business outcomes.
To remove a server from rotation while still preserving session continuity, set up Origin drain on a load balancer:
- On a new or existing load balancer, go to the Hostname step.
- Make sure you have enabled Session Affinity.
- For Origin drain duration, enter a time in seconds. If this value is less than the Session TTL value, you will affect existing sessions.
- Save your changes to the load balancer.
- Click Manage Pools.
- Disable an origin. Your load balancer will gradually drain sessions from that origin.
- On your load balancer, expand your pools to find the disabled origin. You will see the estimated Drain Time counting down.
- When a drain is Complete, there are no longer any connections to that origin.
- Perform your required maintenance or upgrades.
- To bring your origin back online, re-enable the origin.
Immediate rotation
To direct traffic away from an origin server immediately:
- Do one of the following actions:
- On the origin’s monitor , update the monitor settings so the origin will fail health checks, such as putting an incorrect value for the Response Body or Response Code.
- On the pool, disable the origin.
- On the pool, set the
origin weight
to
0
(though traffic may still reach the origin if it is included in multiple pools).
- Monitor
Load Balancing Analytics
to make sure no requests are reaching the pool.
- If you are using DNS-only load balancing (gray-clouded) , changes may be delayed due to DNS resolver caching.
- Perform your required maintenance or upgrades.
- Undo the changes you made in Step 1.