0
votes

I managed to set up autoscaling based on an external load balancer, but I didn't find a way to do the same for an internal load balancer.

Is this feature supported, how to go about auto-scaling my instance group based on the internal load balancer?

The issue is, when you configure an instance group to scale by HTTP requests, you need an HTTP load balancer, which is internet facing, So, the UDP load balancer, which can be internal doesn't work for that.

2
Yes, this is supported. What have you tried and what problems are you seeing (provide details)?John Hanley

2 Answers

0
votes

The Internal Load Balancer uses a backend service which can use a managed instance group. You can assign a managed instance group to the backend or target pools of both internal and network load balancers.

Keep in mind that the Network Load Balancer uses target pools instead of backend services, but target pools can use managed instance groups as well.

Take a look at the documentation for more details. Alternatively I found this and this posts that I believe can be useful to you.

0
votes

From your last comment:

I'm not able to setup a TCP load balancer which has a backend service, I only get a REGIONAL backend service, which doesn't support http load balancing..

As stated in the Internal Load Balancing Concepts, "internal client requests stay internal to your VPC network and region", so there is neither need of HTTP here, nor a multi-regional setup.

On the same page, under section "About Internal Load Balancing", the schema shows a classic load balancing architecture, featuring one global (http) and multiple internal (tcp/udp) load balancers for each region.

Further on, under "Deploying Internal Load Balancing with clients across VPN or Interconnect", the following is stated in an "Important" note:

Internal Load Balancing is a regional product. [...] An internal load balancer cannot forward or receive traffic to and from VM instances in other regions.

Basically, if your managed instance group has instances across multiple regions, then you need an external load balancer, but if all your instances are within the same region (instances can be split across zones within this same region, e.g. us-west1-a/b/c), then you can rely on an internal load balancer.