haproxy和大型GET请求 [英] haproxy and large GET requests

查看:140
本文介绍了haproxy和大型GET请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台服务器,需要接收大型(64K)GET请求.看起来haproxy(v 1.6)的编译时限制为16K.我希望我错过了一些东西.

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

除了重新编译haproxy以外,还有其他指针吗?

Any pointers other than recompiling haproxy?

有些相关,为什么在这种情况下,haproxy会返回400而不能返回414?

Somewhat related, any insight why haproxy would return 400 and not 414 in such a case?

推荐答案

我可以为主要问题提供答案.尽管有链接的文档,但它似乎不是编译时的选项.设置就足够了

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

/etc/haproxy/haproxy.cfg的全局部分中.

关于400 vs 418,这是我自己的偏见. HAProxy表示请求太长了,它包含在400中.我在想GET请求,其中URI本身太长(418),这是请求本身太长的子集.

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.

这篇关于haproxy和大型GET请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆