What's the difference between Load Balancers, External Services, and Service Alias?

  • Load Balancers,
    running a HAProxy and target as backend. target should be one or more services.
  • External Services
    setting a DNS CNAME to target. target shoud be an ip addr or a domain .
  • Service Alias
    setting a DNS CNAME to target.target should be one service.

It seams that the Load Balancer is very similar to the Service Alias.
Is this right ?

So you’re essentially asking “why do load balancers exist?”, which isn’t really rancher-specific…

Service Alias and External Service are effectively a list of IPs/names returned as a DNS record. Clients will (sorta) round-robin when they get multiple answers and that will (sorta) balance the load. A target which has a health check will get removed (by Rancher) from the list eventually, and DNS caches will expire old entries eventually.

A balancer does actual round-robin, health checks on its own and actively removes failing backends (even if they don’t have health checks themselves), sticky sessions, and (potentially) 1001 other features haproxy has.