1

I'm getting to know how load balancers work in cloud platforms. I'm specifically talking about load balancers you use to expose multiple backends to the public internet here, not internal load balancers.

I started with GCP, where when you provision a load balancer, you get a single public IP address. Then I learned about AWS, where when you provision a load balancer (or at least, the Elastic Load Balancer), you get a host name (like my-loadbalancer-1234567890.us-west-2.elb.amazonaws.com).

With the single IP, I can set up any DNS records I like. This means I can keep my name servers outside of the cloud platform to set up domains, and I can do DNS challenges for Lets Encrypt because I can set a TXT record for my domain after setting an A record for it. With the host name approach, I have to use ALIAS records (AWS has to track things internally) so I have to use their DNS service (Route 53). This DNS difference is a slight inconvenience for me, because it's not what I'm used to, and if I want to keep my main name servers for my domain outside of AWS, I can. I would just delegate a subdomain of my domain to Route 53's name servers.

So far, this DNS difference is the only consequence of this load balancer architectural difference that I've noticed. Maybe there are more. Is there a reason GCP and AWS may have chosen the approaches they did, from an architecture perspective? Pros and cons?

2

In AWS the Load Balancer IPs may change and the change is automatically reflected in the DNS name. Hence you refer to the DNS name (e.g. as a CNAME) and it all works. When using Route53 for DNS you can even create ALIAS-A records which directly propagates the current IP addresses from the LB DNS to your custom DNS name.

If you want the same behaviour as in GCP, i.e. a Load Balancer with two fixed, non-changing IP addresses look up Amazon Global Accelerator. It seamlessly integrates with AWS Application Load Balancer and gives you the same experience as you're used to on GCP.

Hope that helps :)

4
  • "When using Route53 for DNS you can even create ALIAS-A records which directly propagates the current IP addresses from the LB DNS to your custom DNS name." Would this make it more efficient since using Route 53 is an alternative to using a CNAME record, and CNAME records involve "hops" so to speak?
    – Matt
    Apr 18 at 23:45
  • Also, is my understanding correct then that when it comes to load balancers scoped to regions, it's normal to have IPs that change, and that's why they only offer the type with fixed IP addresses for their globally-scoped load balancer products? And maybe GCP just chooses not to offer external regional load balancers as a product, like AWS does?
    – Matt
    Apr 18 at 23:48
  • Hah, answered my own follow-up question, now that you got me going. GCP does indeed offer this kind of load balancer (cloud.google.com/load-balancing/docs/network). It appears to work at the network level though (it uses direct server return) not application level, like the AWS example you mentioned. I'd have to read more about them to see the differences. Thanks!
    – Matt
    Apr 18 at 23:52
  • 1
    @MattWelke Using Route53 for AWS deployments is preferable because it lets you do a lot of automation and facilitates lots of stuff. ALIAS records are one such example. And yes it also gets away with the CNAME "hops" as a bonus.
    – MLu
    Apr 19 at 0:29

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.