I am new to Google Cloud Platform and advanced networking in general but I have been tasked with setting up an external HTTPS load balancer that can forward internet traffic to 2 separate Virtual Machines on the same VPC. I have created the load balancer, SSL certs, DNS, frontend, and a backend. I have also created an instance group containing the two VM's for use with the backend.
What I am failing to understand is, how do I determine which VM is going to receive the traffic? Example:
To detail what @John Hanley mentioned in configuring URL maps, you can follow these steps :
Host and path rules
, then click Add host and path rule
.On the host field, enter test.com/login
. Then for your path, instance1/some/path/login.php
.
Backends
, select the backend associated to the VM instance. Do the same step for test.com/download
by adding another host and path rule.You can check and refer to this guide for more details