HAProxy Routing Among Two Classes of Backends Based on Request Structure: Difference between revisions
Jump to navigation
Jump to search
m (Ovidiu moved page HAProxy Routing Among Two Classes of Backends Based on Request Struture to HAProxy Routing Among Two Classes of Backends Based on Request Structure without leaving a redirect) |
|||
(3 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= | ||
Line 10: | Line 11: | ||
frontend openshift | frontend openshift | ||
... | ... | ||
# Define ACLs based on the "host" header | # Define ACLs based on the "host" header | ||
acl api_acl hdr(host) -i master.openshift.novaordis.io | acl api_acl hdr(host) -i master.openshift.novaordis.io | ||
# Direct traffic | # Direct traffic | ||
use_backend api_backend if api_acl | use_backend api_backend if api_acl | ||
default_backend app_backend | default_backend app_backend | ||
backend api_backend | backend api_backend | ||
... | ... | ||
server master0 192.168.122.24:443 check | server master0 192.168.122.24:443 check | ||
backend app_backend | backend app_backend | ||
... | ... | ||
server infranode 192.168.122.25:443 check | server infranode 192.168.122.25:443 check |
Latest revision as of 06:02, 11 November 2017
External
- https://seanmcgary.com/posts/haproxy---route-by-domain-name
- https://stackoverflow.com/questions/20606544/haproxy-url-based-routing-with-load-balancing
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