Welcome! Log In Create A New Profile


Nginx use ssl slow than ELB

December 08, 2015 09:03AM

I want to use nginx as LB to replace aws ELB, but found that it is much slower, it affected web users, sometime user will encounter access web time out.

this is my configuration, please help to check if something is wrong. I use ssl.

user nginx;
worker_processes auto;
worker_rlimit_nofile 65535;

error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;

events {
use epoll;
worker_connections 65535;

http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main buffer=1m flush=5s;

sendfile on;
keepalive_timeout 60;
client_max_body_size 0;

server {
listen 8080;
root /usr/share/nginx/html;

location = /nginx_status {
stub_status on;
access_log off;

location = /status.html {

include /etc/nginx/test.d/test.conf;

ssl_session_cache shared:SSL:10m;
ssl_session_timeout 30m;
upstream backend {

server x.x.x.x;
server x.x.x.x;
check interval=30000 rise=3 fall=5 timeout=5000 type=http;
check_http_send "HEAD /healthcheck HTTP/1.0\r\n\r\n";


server {
listen 80;
listen 443 ssl;

location / {
proxy_pass http://backend;

keepalive_timeout 60;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffers 128 16k;
client_body_buffer_size 2048k;
underscores_in_headers on;
ssl_certificate ssl/chained.crt;
ssl_certificate_key ssl/key.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
#ssl_ciphers HIGH:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!AESGCM;
ssl_prefer_server_ciphers on;
Subject Author Posted

Nginx use ssl slow than ELB

huakaibird December 08, 2015 09:03AM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 80
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready