May 05, 2015 10:54AM
Hi guys,

We set up a basic reverse proxy configuration (that you can find below this thread).
Our main app is using websocket, and the reverse proxy works fine when no using SSL.

But when SSL is enabled, we noticed a big performance issue making our app very slow. Moreover, the most important: we get a problem when reaching the 50th websocket alive connection for a given user: it crashes our app.

Could you help us finding what's wrong in the following?

App server conf:
- ubuntu v.14.10

Nginx server conf:
- nginx v1.9.0
- ubuntu v.14.04

and the conf file is the following:

###################################

user nginx_user nginx_user;
daemon off;
worker_processes 2;

pid logs/nginx.pid;

events {
worker_connections 1024;
}


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

server {
listen 8443 ssl;
server_name ourapp.com;

ssl_certificate ../ssl/cacert.pem;
ssl_certificate_key ../ssl/privkey.pem;

ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;

ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;

location / {
proxy_pass http://ourapp.com:8800;
}

location /our_ws_location {
proxy_pass http://ourapp.com:8801;

proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header X-NginX-Proxy true;

# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
}

###################################

Thanks in advance,

Regards,

Z
Subject Author Posted

Websockets max connections with SSL + slow

zanadu2 May 05, 2015 10:54AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 148
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready