my questions are about the http/s load balancing on compute engine:

if I have an instance loaded in compute engine with a zone set europe-west3-a, by default the google cloud already has the pre-set load balancing, right ?

So I will go to configure load balancing only if I want a customization of load balancing, correct ?

Isnt'it auto scale ?

My second question is about the cdn on google cloud. To have the cdn in compute engine it need to set the load balancing but if instead of setting the load balancing to get the benefit of the cdn, I set the multi-zone on instance zone, get I the same result ? And if not what is the difference between cdn with load balancing and multi-zone ?

Thank you in advance to help me to understand.


Google Compute Engine has two completely different methods of load balancing. Those are network load balancing and HTTP(S) load balancing.

Network load balancing is regional and can load balance any TCP or UDP based protocol across multiple VMs within the same region. A network load balancer backed by only a single VM is possible, but it will behave almost the same way as assigning an external IP address to that VM.

As such there isn't much reason to use a network load balancer unless you intend to scale to more than a single VM. If you want a decent availability it is however not recommended to use only a single VM. Instead use VMs in different zones and load balance between them.

The other method of load balancing is HTTP(S) load balancing. The HTTP(S) load balancing will allow you to use a single pair of IPv4 and IPv6 addresses to address your site. Google operated HTTP(s) proxies will then load balance the traffic across your VMs in multiple regions (with a preference for nearby regions).

With HTTP(S) load balancing one TCP connection is used from client to proxy and a different TCP connection is used from proxy to VM. As such you will need to use the X-Forwarded-For header if you want to know the IP address of the client.

  • If I wanted to configure http/s load balancing for a non-static content (for example a Cms like WordPress inside a VM Lemp instance with Nginx) I should use this configuration tutorial (cloud.google.com/community/tutorials/…) , correct? – Riccardo Castagna Jan 14 at 17:21
  • @RiccardoCastagna Whether the content is static or not makes no difference to the load balancer configuration. However if you need to update data it will get more complicated to configure multiple VMs since the data they work on needs to be in sync. – kasperd Jan 14 at 17:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.