Reputation: 283
I have one website and one api server on different instances:
I went over these:
Upvotes: 1
Views: 564
Reputation: 1943
It is possible to serve both of them from the same HTTP load balancer (LB) by creating
The URL map can be configured from Developers Console or by using gcloud command as describe in step 7 of "Send traffic to your instances" section at Google Content-Based Load Balancing example. Every time an HTTP request arrives to your LB, it will check its URL map and dispatch it to the right backend.
Apart from duplicated configuration and number of external IPs, the difference between using one or two LBs is pricing as describe in "Load Balancing and Protocol Forwarding" section here. You can use the Google Cloud Platform Pricing Calculator to see how much would you pay depending on the number of LBs.
Hope it helps.
Upvotes: 2