Answer the question
In order to leave comments, you need to log in
How to optimize SSL in HAProxy or Nginx?
There is a VDS with 4 CPUs. Configured HTTPS at the HAProxy level.
This is what the settings in haproxy.cfg look like
global
ssl-default-bind-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS
ssl-default-bind-options no-sslv3
maxconn 2048
tune.ssl.default-dh-param 2048
nbproc 4
cpu-map all 4
stats bind-process 4
ab -c 100 -n 2000 "https://myhost//test.html"
Requests per second: 166 [#/sec] (mean)
Answer the question
In order to leave comments, you need to log in
> Меня смущает производительность, она болтается в районе 150 RPS.
Самая тяжелая операция - хендшейк, всё остальное мелочи жизни.
У вас производительность не 150 RPS, а 150 хендшейков.
По сабжу, как-то так:
ssl_certificate /etc/nginx/ssl/cert.pem;
ssl_certificate_key /etc/nginx/ssl/cert.pem;
ssl_dhparam /etc/nginx/ssl/dhparam.pem;
ssl_prefer_server_ciphers on;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers kEECDH+AES128:kEECDH:kEDH:-3DES:kRSA+AES128:kEDH+3DES:DES-CBC3-SHA:!RC4:!aNULL:!eNULL:!MD5:!EXPORT:!LOW:!SEED:!CAMELLIA:!IDEA:!PSK:!SRP:!SSLv2;
ssl_session_cache shared:SSL:64m;
ssl_session_timeout 28h;
#add_header Strict-Transport-Security "max-age=31536000; always";
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question