Reputation: 23
I am well aware of Openshift Routes which supports HAproxy by default, however in what scenarios do we need to use external load balancer, when routes also provides load balancing.
Also when External load balancer is used, still the internal routes objects are generated, which one takes the preference in that case?
Upvotes: 1
Views: 2218
Reputation: 3583
Default routing with the OpenShift Software Defined Network plugin (https://docs.okd.io/latest/architecture/networking/sdn.html) typically looks something like this
Internet -> Router -> Service -> Pod
This is using the HAProxy router. The HAProxy router "is limited to HTTP/HTTPS(SNI)/TLS(SNI) [traffic], which covers web applications." (https://docs.okd.io/latest/dev_guide/expose_service/expose_internal_ip_router.html)
If you need more control over your application ingress, or if you need direct TCP access, this is where a LoadBalancer Service is beneficial (https://docs.okd.io/latest/dev_guide/expose_service/expose_internal_ip_load_balancer.html#automatically-assign-create-lb). The workflow now looks like
Internet -> Load Balancer -> Service -> Pod
This bypasses the route entirely. The load balancer will have its own URL/IP address, separate from the HAProxy router instance. So you should never have a concern of where the traffic is coming from. You'll either configure your applications to use the Load Balancer or the HAProxy router.
Upvotes: 2