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

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=External= * https://seanmcgary.com/posts/haproxy---route-by-domain-name =Internal= * HAProxy Configuration =Overview=")
 
Line 8: Line 8:


=Overview=
=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

Revision as of 04:00, 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