如何在Windows中设置Nginx端口的最大队列连接? [英] How to set maximum queue connection for nginx port in Windows?

查看:214
本文介绍了如何在Windows中设置Nginx端口的最大队列连接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习设计可扩展的系统,目前正在使用Windows机器.我创建了两个服务器,它们将监听端口27016和27015,它们所做的只是返回"HelloWorld!".回复.我在

I am learning to design scalable system, for now using Windows machine. I created two servers that will listen to port 27016 and 27015, all they do is return "HelloWorld!" response. I had set listen(ListenSocket, SOMAXCONN) for both the servers when creating them in Visual studio following Winsock tutorial. Using jmter performed load test on each of them individually (1000 request per sec) and got everything OK.

现在,当我引入nginx时,它正在侦听端口80并在上述两个服务器之间负载均衡请求(每秒1000 req),在使用jmeter执行负载测试时,许多请求都被丢弃了.

Now when I introduced nginx which is listening to port 80 and load balancing the requests (1000 req per sec) among the two servers I mentioned above, many requests are being dropped down while performing load test using jmeter.

我假设端口80的队列大小未配置为高流量,并希望对其进行调整.如何通过nginx config或cmd命令将队列大小设置为最大可能值?

I am assuming that queue size for port 80 is not configured for high traffic and want to tune it. How to set the queue size to maximum possible value either from nginx config or cmd command?

推荐答案

即使增加队列大小并不能解决我的问题,增加队列大小的方法还是修改积压值,例如

Even though increasing queue size did not fix my problem the way to increase queue size is modifying backlog value, example

listen       server_port backlog=queue_size;

这篇关于如何在Windows中设置Nginx端口的最大队列连接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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