workerman
workerman copied to clipboard
reduced speed when running a server with openresty
Hi, doing direct benchmarks on the machine with Mark the speed is remarkable, but if I pass my connection through an api gateway with openresty doing the benchmark the speed drops a lot and I would like to understand how to improve it.
Show your Nginx config, that creates openresty.
Show your Nginx config, that creates openresty.
user www-data; worker_processes 2;
#error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info;
pid /run/openresty.pid;
events { worker_connections 4096; }
http { include mime.types; default_type application/octet-stream;
#access_log logs/access.log main;
sendfile on; #tcp_nopush on;
#keepalive_timeout 0; keepalive_timeout 75;
gzip off;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE ssl_prefer_server_ciphers on;
include ../sites/*; }
can someone help?
First, you need to say how do you benchmark it.
If you are using ab
, it's only http 1.0, and create a new connection each time.
With this config, each connection need to check the TLS, and will be very slow.
This config have:
worker_processes 2;
...
worker_connections 4096;
So the maximum concurrent connections will be: 2 x 4096
It's also very important that you show the config in /sites/
, that make the proxy_pass
to Workerman.