captjack on Nostr: #haproxy has some excellent http ratelimit traffic shaping features #linuxstr ...
#haproxy has some excellent http ratelimit traffic shaping features #linuxstr #techstr
In the backend section where you would like to enable the limit:
add a filter bwlim-out directive to limit download speeds
add a filter bwlim-in directive to limit upload speeds
backend webservers
server web1 192.168.56.6:80 check maxconn 30
server web2 192.168.56.7:80 check maxconn 30
filter bwlim-out mydownloadlimit limit 625000 key be_id table mypeers/downloadrate
filter bwlim-in myuploadlimit limit 625000 key be_id table mypeers/uploadrate
http-response set-bandwidth-limit mydownloadlimit
http-request set-bandwidth-limit myuploadlimit
dig their KB doc for more ... this is microblog tip only
Published at
2024-10-13 12:23:09Event JSON
{
"id": "8733e812ce1478c81a7f8cb329a162ac6b92548c1ac6f2b13ea8780128fc7eaa",
"pubkey": "5e5fc1434c928bcdcba6f801859d5238341093291980fd36e33b7416393d5a2c",
"created_at": 1728822189,
"kind": 1,
"tags": [
[
"t",
"haproxy"
],
[
"t",
"linuxstr"
],
[
"t",
"techstr"
]
],
"content": "#haproxy has some excellent http ratelimit traffic shaping features #linuxstr #techstr\nIn the backend section where you would like to enable the limit:\n add a filter bwlim-out directive to limit download speeds\n add a filter bwlim-in directive to limit upload speeds\nbackend webservers\n server web1 192.168.56.6:80 check maxconn 30\n server web2 192.168.56.7:80 check maxconn 30 \n filter bwlim-out mydownloadlimit limit 625000 key be_id table mypeers/downloadrate \n filter bwlim-in myuploadlimit limit 625000 key be_id table mypeers/uploadrate\n http-response set-bandwidth-limit mydownloadlimit \n http-request set-bandwidth-limit myuploadlimit\ndig their KB doc for more ... this is microblog tip only\n",
"sig": "90f9c65adab81e95bc876c165c10b3460ddc46cec6de2d34c61464da24668e740b671aed7b277e815fab5d298f28d941d63d98b924882a5883d05ec8982715f8"
}