A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cloud.google.com/load-balancing/docs/enabling-connection-draining below:

Enable connection draining | Load Balancing

Enable connection draining

Stay organized with collections Save and categorize content based on your preferences.

Note: This page describes how to configure a specific load balancer component or feature before or after you've already created a load balancer. Working with specific components is useful for advanced configurations and necessary for some configuration options. Before using the information on this page, know the type of Google Cloud load balancer that you need.

Connection draining is a process that ensures that existing, in-progress requests are given time to complete when a virtual machine (VM) instance is removed from an instance group or when an endpoint is removed from network endpoint groups (NEGs) that are zonal in scope.

The information on this page applies only to instance groups and the following types of NEGs that are zonal in scope:

Connection draining begins whenever you do the following:

Connection draining doesn't apply when you disconnect a backend (instance group or zonal NEG) from a load balancer's backend service.

How connection draining works

To enable connection draining, you set a connection draining timeout on the backend service. The timeout duration must be from 0 to 3600 seconds, inclusive.

It can take up to 60 seconds after your specified timeout duration has passed for the instance to be terminated.

The following is a list of specifications about connection draining:

Enable connection draining

To enable connection draining, complete the following steps.

Console Update a load balancer
  1. Go to the Load balancing page in the Google Cloud console.
    Go to Load balancing
  2. On the Load Balancers tab, for the load balancer that you'd like to update, click more_vert, and then click Edit edit.
  3. Click Backend configuration.
  4. In the Backend configuration pane, click edit.
  5. At the bottom of the Edit backend service pane, click Advanced configurations.
  6. In the Connection draining timeout field, enter a value from 0 - 3600. A setting of 0 disables connection draining.
Update Cloud Service Mesh
  1. Go to the Cloud Service Mesh page in the Google Cloud console.
    Go to Cloud Service Mesh
  2. Click the Name of your service.
  3. On the Service details page, click Edit edit.
  4. At the bottom of your service, click Advanced configurations.
  5. In the Connection draining timeout field, enter a value from 0 - 3600. A setting of 0 disables connection draining.
  6. Click Save.
gcloud

Enable connection draining on a new or existing backend service by using the --connection-draining-timeout flag. The following examples demonstrate how to change the connection draining timeout:

Replace the placeholders with valid values:

API

To enable connection draining in the API when creating or updating an instance or endpoint, make a request to the respective API URI to include the connectionDraining field in your request body. The following examples demonstrate how to set that attribute by editing an existing backend service. For information about other required attributes, see the documentation for each load balancer.

What's next

For general information on backend services, see Backend services overview.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-07 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4