HTTP 请求/响应标头的平均大小是多少?
我正在使用一个只有 16MB RAM 的嵌入式平台。我需要对 HTTP 流进行深度数据包过滤。为了防止设备上的拒绝服务攻击,我想要一些有关 HTTP 流大小的统计平均值,特别是 HTTP 标头。
I am working with an embedded platform that has 16MB of RAM only. And I need to deep packet filter HTTP streams. To prevent a Denial of Service attack on the device I'd like some statistical averages regarding HTTP stream sizes, specifically the HTTP header in particular.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
摘自 Google 的 SPDY 研究项目白皮书
From Google's SPDY research project whitepaper
正如刚才所检查的,来自 www.google.com 的 HTTP HEAD 响应是 823 字节。这是没有任何认证的。其中大约一半是 Set-Cookie 标头。一种简单的检查方法是使用
curl
命令。The HTTP HEAD response from www.google.com is 823 bytes, as checked just now. This is without any authentication. About half of that is the Set-Cookie header. An easy way to check is the
curl
command.我没有任何统计数据来支持这一点(获取 HTTP 标头大小的统计平均值意味着什么?平均值是多少?),但根据轶事经验,典型的 HTTP 标头为 0.5KB,可能高达 1K 或2K(取决于cookie大小等)。理论上,您可以获得高达 4K 或 8K 的 HTTP 标头,但这种情况相当罕见。
I don't have any statistics to back this up (what does it mean to take a statistical average of HTTP header sizes? average over what?), but from anecdotal experience a typical HTTP header is 0.5KB and might go up to 1K or 2K (depending on cookie size, etc.). You could theoretically get HTTP headers up to 4K or 8K but that is fairly rare.
大小可能会根据 Web 应用程序所呈现的内容而有所不同,而且我们还需要考虑到 200KB 的网页不太可能是固定的 200KB。更有可能的是 20KB 的 HTML、30KB 的 Javascript/CSS 和 10 x 15KB 图像中的 150KB,总共可能有 12 个请求。因此,平均请求/响应对不会是 200KB,而是 17KB。
欢迎您检查此工具以了解基本概念:http://smallseotools.com/website-页面大小检查器/
The size might vary based on what is presented by the web application, also we need to consider that a 200KB web page is not likely to be a solid 200KB. More likely it is 20KB of HTML, 30KB of Javascript/CSS and 150KB in 10 x 15KB images for a total of 12 requests perhaps. So the average request/response pair would NOT be 200KB but rather 17KB.
You welcome to check this tool for a basic idea : http://smallseotools.com/website-page-size-checker/