I have my local Ubuntu, AWS EC2 (8 Core) Ubuntu and Nginx (8 Worker) running on both the machines
When I try 10K concurrent connection with local Nginx it works
ab -c 10000 -n 10000 http://localhost/
But when I try the same with Nginx on EC2 I get the following error
ab -c 10000 -n 10000 http://<ec2-ip-address>/
This is ApacheBench, Version 2.3 <$Revision: 1843412 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 65.0.95.45 (be patient)
apr_socket_recv: Connection refused (111)
Total of 1 requests completed
At same time curl command and 4K connections with Nginx on EC2 works fine
ab -c 4000 -n 4000 http://<ec2-ip-address>/
curl <ec2-ip-address>
How can I get 10K concurrent connection work with EC2 ?