kpgenes
kpgenes

Reputation: 113

How to create multiple health checks in GCP corresponding to different instances?

In the following image below I am trying to create a load balancer.

I have added two instances, let say vm1 enabled at port 80 and vm2 at port 86.

In order to do so, I am not able to create an health check for each instances, since GCP is allowing me to create only one.

But in tutorials available online I could see users are able to create multiple health checks. In my case I am not able to create an health check more than once. Since I am new to GCP and struggling to find a solution for this enter image description here

I am trying tcp load balancer because it allows me to create custom ports, since I have VMS enabled at ports 80, 85, 86 etc.

I referred this video.

Upvotes: 1

Views: 2006

Answers (1)

Sergiusz
Sergiusz

Reputation: 1235

A single backend can use only one health check, on one port, as per documentation.
If you are serving HTTP traffic, you can use HTTP(S) Load Balancer and place your VMs in separate backends. Each backend can use different health check.

As a workaround, you can add a dummy service on VM2, running on port 80 so that the health check can verify if the machine is running.

Feature you mention has been already requested here. However, there is no ETA when it will be available.

Upvotes: 1

Related Questions