Perform planned maintenance

Last updated Jul 23, 2026 When you change application settings or add new assets, you will likely want to make these changes on one endpoint at a time. Going endpoint by endpoint reduces the risk of changes and ensures a more consistent user experience.

To take endpoints out of rotation gradually (important for session-based load balancing), enable endpoint drain on your load balancer. This option is only available for proxied load balancers (orange-clouded).

To direct traffic away from your endpoint immediately, adjust settings on the pool or monitor.

Note

If you want to divert traffic from an endpoint to prevent it from becoming unhealthy, use Load Shedding instead.

Existing connections are not terminated

When an endpoint becomes unhealthy, Cloudflare Load Balancing stops routing new requests to it. However, existing connections (including long-lived WebSocket connections) are not terminated — they remain open until they close naturally.

If you need graceful connection draining, use endpoint drain to proactively take endpoints out of rotation before maintenance, rather than relying on health check failures alone.

Before you begin

Before disabling any endpoint, 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

Note

Endpoint drain is only available for proxied load balancers (orange-clouded).

With session-based load balancing, it is important to direct all requests from a particular end user to a specific endpoint. Otherwise, information about the user session — such as items in their shopping cart — may be lost and lead to negative business outcomes.

To remove an endpoint from rotation while still preserving session continuity, set up Endpoint drain on a load balancer:

  1. On a new or existing load balancer, go to the Hostname step.
  2. Make sure you have enabled Session Affinity.
  3. For Endpoint drain duration, enter a time in seconds. If this value is less than the Session TTL value, you will affect existing sessions. Example configuration of session affinity with endpoint drain
  4. Save your changes to the load balancer.
  5. Click Manage Pools.
  6. Disable an endpoint. Your load balancer will gradually drain sessions from that endpoint.
  7. On your load balancer, expand your pools to find the disabled endpoint. You will see the estimated Drain Time counting down. Example showing load balancer draining in progress
  8. When a drain is Complete, there are no longer any connections to that endpoint. Example showing load balancer draining complete
  9. Perform your required maintenance or upgrades.
  10. To bring your endpoint back online, re-enable the endpoint.

Immediate rotation

To direct traffic away from an endpoint immediately:

  1. Do one of the following actions:
  2. On the endpoint's monitor, update the monitor settings so the endpoint will fail health monitor requests, such as putting an incorrect value for the Response Body or Response Code.
  3. On the pool, disable the endpoint.
  4. On the pool, set the endpoint weight to 0 (though traffic may still reach the endpoint if it is included in multiple pools).
  5. Monitor Load Balancing Analytics to make sure no requests are reaching the pool.
  6. If you are using DNS-only load balancing (gray-clouded), changes may be delayed due to DNS resolver caching.
  7. Perform your required maintenance or upgrades.
  8. Undo the changes you made in Step 1.

Was this helpful?

YesNo

On this page

Perform planned maintenance - 图4Docs

{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/load-balancing/additional-options/planned-maintenance/#page","headline":"Perform planned maintenance","description":"When you change application settings or add new assets, you will likely want to make these changes on one endpoint at a time. Going endpoint by endpoint reduces the risk of changes and ensures a more consistent user experience.","url":"https://developers.cloudflare.com/load-balancing/additional-options/planned-maintenance/","inLanguage":"en","image":"https://developers.cloudflare.com/load-balancing/additional-options/planned-maintenance/og.png?v=b70dc7dec309af4e","dateModified":"2026-07-23","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}


description: Use Load Balancing with Spectrum for TCP and UDP traffic. title: Spectrum image: https://developers.cloudflare.com/load-balancing/additional-options/spectrum/og.png?v=719ccce2345bf2a4


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/load-balancing/llms.txt
Use this file to discover all available pages before exploring further.