amazon web services - Google Cloud : How to send data within the network using public hostname without incurring the data transfer cost? -


i've log aggregator service running on cluster in google cloud. applications both inside , outside google cloud platform supposed send data service. due design, there constraint internal/external apps can use same hostname/ip communicate service.

now, if use external ip advertised hostname, system works fine i'll charged google sending data apps in internal network service. want avoid incurring cost.

on other hand, aws provides public hostname resolves public ip outside network resolves internal ip inside network. way have used public hostname service without incurring cost internal data transfer. there way achieve same thing in google cloud?

aws ec2 make easy providing hostnames automatically resolve either public or private ips depending on they're being accessed. google cloud doesn't have feature here ways around it:

  • use hostnames of instances, instead of ips. hostname automatically resolved internal ip when used inside gcp. when outside, can edit local hosts file on external machines resolve external ip. isn't easy scale though if have lots of external machines or if they're outside control.

  • run own dns server, setup new domain, , automatically respond right ip depending on request coming from.

  • use virtual sdn (software defined network) automatically route traffic. hosts on same virtual lan network , can use internal ips between them all. internal hosts automatically connect directly , external hosts use tunnel on public internet, both use same ips. zerotier or pritunl choices depending on need.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -