About the number of Nginx concurrent connections
Recently in learning to use Nginx, do some simple stress test, found that the maximum number of concurrent connections can only up to more than 100
The state at the beginning of the test,
- Netstat-n | awk '/^tcp/{++s[$NF]} END {for (a in S) print A, s[a]} '
- Close_wait 2
- Established 133
- SYN_RECV 39
Copy Code
Then the connection to the SYN_RECV state has risen
- Netstat-n | awk '/^tcp/{++s[$NF]} END {for (a in S) print A, s[a]} '
- Close_wait 2
- Established 133
- SYN_RECV 124
Copy Code
Lasted until the test was finished.
Here is my configuration
- Worker_processes 10;
- Worker_rlimit_nofile 51200;
- daemon on;
- Master_process off;
- Error_log/home/test/apps/nginx/logs/nginx-error.log Debug;
- Pid/tmp/nginx_demo.pid;
- Events {
- Worker_connections 51200;
- }
- HTTP {
- Include/home/test/apps/nginx/conf/mime.types;
- Sendfile on;
- Keepalive_timeout 65;
- Tcp_nodelay on;
- server {
- Listen 8100;
- server_name localhost;
- Access_log/home/test/apps/nginx/logs/access.log;
- Error_log/home/test/apps/nginx/logs/error.log Debug;
- Location/lottery_image {
- Lig "Hi,this is a demo module";
- }
- }
- }
- ~
About the number of Nginx concurrent connections