How can I connect to multiple Google Cloud VMs using a single IP? (or alternative)

alex.brown asked:

I am currently looking into migrating my current system over to Google Cloud. We have multiple on field devices that contact a specific server and log data. each of these servers is running custom software that processes the data.

I would like to set up multiple Google Cloud Engine VMs under a single IP address and address them via port forwarding. However, It does not look like google supports this. I can do what I need to do using static IPs but there are limits to IP address use and we want to be able to scale correctly with more VMs as we gain more clients.

What is the best way to talk between the clients and servers while keeping IP use down?

My answer:


If your devices and servers speak HTTP, you can use an HTTP(S) load balancer. Otherwise you can use a TCP Proxy load balancer, but the range of allowed port numbers is restricted.


View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.