问题
I have a server that needs to receive large (64K) GET requests. It looks like haproxy (v 1.6) has a compile-time limit of 16K. I'm hoping I missed something.
https://cbonte.github.io/haproxy-dconv/1.6/configuration.html#3.2-tune.bufsize
Any pointers other than recompiling haproxy?
Somewhat related, any insight why haproxy would return 400 and not 414 in such a case?
回答1:
I can provide an answer to the primary question. Despite the linked documentation, this appears not to be a compile-time option. It was enough to set
tune.bufsize 65536
in the global section of /etc/haproxy/haproxy.cfg
.
As to 400 vs 418, this was my own bias. HAProxy is saying that the request is too long, which is included in 400. I was thinking of GET requests in which the URI itself is too long (418), and this is a subset of the request itself being too long.
来源:https://stackoverflow.com/questions/56090720/haproxy-and-large-get-requests