HAProxy Routing Among Two Classes of Backends Based on Request Structure: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:


* https://seanmcgary.com/posts/haproxy---route-by-domain-name
* https://seanmcgary.com/posts/haproxy---route-by-domain-name
* https://stackoverflow.com/questions/20606544/haproxy-url-based-routing-with-load-balancing


=Internal=
=Internal=

Latest revision as of 06:02, 11 November 2017

External

Internal

Overview

frontend openshift

       ...

       # Define ACLs based on the "host" header

       acl api_acl hdr(host) -i master.openshift.novaordis.io

       # Direct traffic
       use_backend api_backend if api_acl
       default_backend app_backend

backend api_backend
   ...
   server      master0 192.168.122.24:443 check

backend app_backend
   ...
   server      infranode 192.168.122.25:443 check