HAProxy Routing Among Two Classes of Backends Based on Request Structure

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

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