1
votes

I am creating a global HTTPS Load Balancer in Google Cloud and wondering how does location affect a global load balancer.

I am unable to find much detail about it on internet.

There are price differences based on location: https://cloud.google.com/vpc/network-pricing#lb

but no idea how it affects routing of https requests: https://storage.googleapis.com/gweb-cloudblog-publish/images/global_lb.max-1800x1800.png

For example: if my website receives most of its traffic from USA, India and Europe then what would be the best location I should choose while setting up global HTTPS Load Balancer and what difference it will make?

2

2 Answers

0
votes

The primary difference is that the global load balancing is for Layer-7 (high-level application layer) traffic while regional load balance is for Layer-4 (transport layer) traffic and uses Maglev for traffic routing.

Let's say you want to do your own SSL terminations and operate your own Layer-7 reverse proxies, I believe regional is the correct option. For the vast majority of users I would wager that global is the better choice.

0
votes

Have a look at the documentation Cloud Load Balancing overview section Global versus regional load balancing:

Use global load balancing when your backends are distributed across multiple regions, your users need access to the same applications and content, and you want to provide access by using a single anycast IP address. Global load balancing can also provide IPv6 termination.

Use regional load balancing when your backends are in one region, and you only require IPv4 termination.

and at section External HTTP(S) Load Balancing:

HTTP(S) Load Balancing is implemented on GFEs. GFEs are distributed globally and operate together using Google's global network and control plane. In Premium Tier, GFEs offer cross-regional load balancing, directing traffic to the closest healthy backend that has capacity and terminating HTTP(S) traffic as close as possible to your users.

more information about Network Service Tiers you can find in this article.

To find more details have a look at the documentation External HTTP(S) Load Balancing overview:

HTTP(S) Load Balancing is a global service when the Premium Network Service Tier is used.

and

  1. When a user request comes in, the load balancing service determines the approximate origin of the request from the source IP address.
  2. The load balancing service knows the locations of the instances owned by the backend service, their overall capacity, and their overall current usage.
  3. If the closest instances to the user have available capacity, the request is forwarded to that closest set of instances.
  4. Incoming requests to the given region are distributed evenly across all available backend services and instances in that region. However, at very small loads, the distribution may appear to be uneven.
  5. If there are no healthy instances with available capacity in a given region, the load balancer instead sends the request to the next closest region with available capacity.

also

HTTP(S) Load Balancing is a regional service when the Standard Network Service Tier is used. Its backend instance groups or NEGs must all be located in the region used by the load balancer's external IP address and forwarding rule.

Meanwhile, Maglev is a distributed system for Network Load Balancing.