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 in GCP by Karan
• 6,670 points
753 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 by Sirajul
• 41,000 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
• 57,300 points
282 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 in GCP by Sirajul
• 41,000 points
38 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 in GCP by Sirajul
• 41,000 points
60 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 in GCP by Sirajul
• 41,000 points
42 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 in GCP by Sirajul
• 41,000 points
65 views
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 in GCP by Sirajul
• 41,000 points
81 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 in GCP by Sirajul
• 41,000 points
54 views
0 votes
1 answer

Storage services in GCP

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

answered Sep 24 in GCP by Sirajul
• 41,000 points
29 views