324 reputation
412
bio website coryforsyth.com
location Brooklyn, NY
age 33
visits member for 4 years, 4 months
seen 17 hours ago
I work at playmegaphone.com, and live in Brooklyn.

Jul
2
awarded  Curious
Jun
13
awarded  Popular Question
Nov
27
awarded  Popular Question
Oct
31
awarded  Notable Question
Feb
18
awarded  Notable Question
Sep
12
awarded  Popular Question
Aug
7
awarded  Notable Question
Apr
18
awarded  Yearling
Apr
18
awarded  Self-Learner
Mar
13
awarded  Popular Question
Dec
6
comment How to rate-limit concurrent sessions with nginx or haproxy?
I've ended up routing all valid requests through a backend that has a stick-table on ip. It has an expiry time and uses nopurge. On the frontend I use table_cnt to form an acl that checks for the existence of the incoming request's ip in that backend stick-table. If it is not there (and the backend has hit the limit set for it), then then incoming request is blocked.
Dec
6
accepted How to rate-limit concurrent sessions with nginx or haproxy?
Dec
6
accepted What's the difference between socat and netcat?
Dec
6
accepted Can Haproxy deny a request by IP if its stick-table is full?
Dec
6
asked Is it possible to see active connections in nginx?
Jul
27
awarded  Teacher
Mar
11
asked What's the difference between socat and netcat?
Mar
10
comment Can Haproxy deny a request by IP if its stick-table is full?
Oh and thanks for the mention of the maxconn param. I can't use the number of connections to limit this, though, because each client that I have connecting will be making multiple requests. I essentially want to let the first 5 (for example) IPs in and let them make requests. If I limited it to 5 total connections, then if the first IP connected, got data, waited a second, and then tried to connect again for more data, then another stray client might have connected in the meantime taking its "slot" so to speak. I want to track these IPs so I can keep the slot for a given IP open.
Mar
10
comment Can Haproxy deny a request by IP if its stick-table is full?
I don't think the gpc0 counter will work because the first time someone comes by, their counter value will always be 0, and I need to let them initially. And as I understand the counter variable is tied to the IP itself...each "row" of the stick-table (one for each IP) has a separate gpc0 counter. What would be helpful is if I have a way to count all of the rows in the table...that's what I'd implicitly be doing if I took a different action when the stick-table was full.
Mar
10
asked Can Haproxy deny a request by IP if its stick-table is full?