Connection draining in GCP

0 votes
I need to make sure that I enable connection draining on GCP so that if at all I remove a VM instance, the processes in progress get completed. How can I enable this?
Oct 10, 2019 in GCP by Karan
• 19,610 points
3,975 views

1 answer to this question.

0 votes

Connection draining is a process that ensures that existing, in-progress requests are given time to complete when a VM is removed from an instance group.

To enable connection draining, you set a connection draining timeout on the backend service. 

The timeout duration must be from 1 to 3600 seconds.

To enable connection draining on a new or existing backend service by using the --connection-draining-timeout flag.

For example, when updating a backend service, provide the flag with your request:

gcloud compute backend-services update [BACKEND_SERVICE] \
    --connection-draining-timeout [CONNECTION_TIMEOUT_SECS]

where:

  • [BACKEND_SERVICE] is the backend service for this request.

  • [CONNECTION_TIMEOUT_SECS] is the number of seconds to wait before instances are terminated, between 0 - 3600 seconds, inclusively. A setting of 0 disables connection draining. This timeout duration applies to all instance groups that are part of the backend service.

answered Oct 10, 2019 by Sirajul
• 59,230 points

Related Questions In GCP

0 votes
2 answers

How to install gcp in Python?

If you're accessing BigQuery in python, you ...READ MORE

answered Aug 20, 2018 in GCP by Priyaj
• 58,020 points
1,732 views
0 votes
1 answer

Deciding on a Cloud load balancer in gcp.

Google Cloud Platform Load Balancing enables you ...READ MORE

answered Sep 26, 2019 in GCP by Sirajul
• 59,230 points
958 views
0 votes
1 answer

How to allow outbound traffic on a custom port in gcp?

To allow outbound traffic through a custom ...READ MORE

answered Sep 26, 2019 in GCP by Sirajul
• 59,230 points
5,062 views
0 votes
1 answer

Is it possible to rename a project in GCP?

Yes, it is possible to rename your ...READ MORE

answered Sep 27, 2019 in GCP by Sirajul
• 59,230 points
21,514 views
0 votes
1 answer

Creating a SQL Server instance using Google Compute engine.

Google Compute Engine provides public images preconfigured with ...READ MORE

answered Sep 23, 2019 in GCP by Sirajul
• 59,230 points
2,922 views
0 votes
1 answer
0 votes
1 answer

How do i install gcloud compute?

The gcloud compute command-line tool enables you to easily ...READ MORE

answered Sep 23, 2019 in GCP by Sirajul
• 59,230 points

edited Jun 16, 2023 by Khan Sarfaraz 1,262 views
0 votes
1 answer

Connect to an instance as a root user in GCP

If you configured an instance to allow ...READ MORE

answered Sep 24, 2019 in GCP by Sirajul
• 59,230 points
5,486 views
0 votes
1 answer

Storage services in GCP

As a part of its storage and ...READ MORE

answered Sep 24, 2019 in GCP by Sirajul
• 59,230 points
571 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP