Skip to content

Instantly share code, notes, and snippets.

@ryanlelek
Forked from dsuch/haproxy.conf
Last active August 29, 2015 14:25
Show Gist options
  • Save ryanlelek/af31c6055071e8ce05bd to your computer and use it in GitHub Desktop.
Save ryanlelek/af31c6055071e8ce05bd to your computer and use it in GitHub Desktop.
# At most 10 concurrent connections from a client
acl too_fast fe_sess_rate ge 10
# Matches any path beginning with a given prefix
acl bursts_inclined path_beg -i /client1
# Effectively working as a delay mechanism for clients that are too fast
tcp-request inspect-delay 1000ms
# Fast-path - accept connection if it's not this troublesome client
tcp-request content accept unless bursts_inclined too_fast
# The very fast client gets here meaning they have to wait full inspect-delay
tcp-request content accept if WAIT_END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment