Skip to content

Instantly share code, notes, and snippets.

@haproxytechblog
Created November 10, 2020 14:45
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Layer 4 and Layer 7 Proxy Mode
defaults
# mode is inherited by sections that follow
mode tcp
frontend db
# receives traffic from clients
bind :3306
default_backend databases
backend databases
# relays the client messages to servers
server db1 192.168.0.10:3306
server db2 192.168.0.11:3306
defaults
# mode is inherited by sections that follow
mode http
frontend www
# receives traffic from clients
bind :80
default_backend web_servers
backend web_servers
# relays the client messages to servers
server s1 192.168.0.10:3000
server s2 192.168.0.11:3000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment