N
N
Nikolay Kavunenko2015-01-29 00:06:07
Nginx
Nikolay Kavunenko, 2015-01-29 00:06:07

How to check nginx under load?

Hello.
There was a task to check how many connections nginx will withstand. As usual I took ab from apache2-utils.
But it was not there, for some reason the test stops. And the tested server is not even loaded by 10%.
Ubuntu 14.04.1 LTS server (both testing and testing).
Firewall turned off.
nginx settings:

user www-data;
worker_processes 2;
pid /run/nginx.pid;
events {
        worker_connections 2048;
        # multi_accept on;
}
http {
        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 15;
        types_hash_max_size 2048;
        server_tokens off;
        include /etc/nginx/mime.types;
        default_type application/octet-stream;
        # access_log /var/log/nginx/access.log;
        access_log off;
        error_log /var/log/nginx/error.log;

        gzip on;
        gzip_disable "msie6";

        include /etc/nginx/conf.d/*.conf;
        include /etc/nginx/sites-enabled/*;
}

I do the test with the command:
ab -n 10000 -c 100 ">>>URL<<<"
Stably I get the following result:
download?id=moskm06saRgO99Zir2ylbV83RgrE
I.e. once can pass, and then shuts up. Tried different servers. The picture is the same.
Who can prompt in what party to dig? Maybe the host has something like anti-ddos?
DigitalOcean if anything...

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
Vlad Zhivotnev, 2015-01-29
@NMellon

yandex-tank.

A
Alexey Sundukov, 2015-01-29
@alekciy

I support the idea with Yandex tank.
I myself use httperf. At it generation of parallel connections is "more honest" (than in ab). An example of such testing is here: alekciy.livejournal.com/10471.html ("Test Methodology").

A
Alexey Belyaitsev, 2015-01-29
@ti1orn

worker_processes 2;

At least add more workers

A
Arman, 2015-01-29
@Arik

What does netstat show?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question