Subsequent versions of rocketchat are regressing on snappiness
Your Rocket.Chat version: .24
Hats off to a great piece of engineering,
At our organization:
- The users love the features of rocketchat
- The management loves the privacy/owning its own data
BUT, I am getting pushback from users that rocketchat is not as snappy to use as slack.
I have done the following settings to pare rocket chat down:
- Administration -> Messages -> Embeds -> False
- Administration -> Messages -> Audio recorder enabled -> False
- Rocket chat is running on a server with 128GB of RAM and 32 CPU cores.

Any recommendations on what I can do to make rocketchat snappy to use ?
@vikaskedia first off glad to hear that your users love our features :+1:
Regarding speed. What kind of user load are you running? Also Rocket.Chat being based on Meteor and Node.js is single threaded so its only making use of a single Thread.
Are you running just one instance of Rocket.Chat on your server? On our demo server we have 4 cores and have 4 instances of Rocket.Chat running.
If you don't want to public share more of your setup, I fully understand. Please feel free to hit me up on our demo server(@ aaron.ogle). I'd love to help you get increased performance! :smile:
Please if possible keep the discussions here, causes I think it would be valueable information for others...
@vikaskedia you really need to run multiple process, 1 per core is ideal when you have 100s of users.
@engelgabriel does it exist any doc/tutorial regarding scaling?
+1
I'd love to see the demo deployment details as a case study. There are lots of vanilla meteor scaled deployment posts out there (nginx -> HAProxy, etc) but it would be nice to know how you chose to do it for RC.
@vikaskedia did you manage to run multiple instances?
We are running https://lisk.chat with approx. 1300+ users, and 80+ actively online. Our number of users has grown quite rapidly, and performance is beginning to be a problem.
Currently the instance is running on one CPU core. Does anyone have any pointers on how to proceed with configuring my deployment to take advantage of multiple cores?
Can https://github.com/meteorhacks/cluster be used in this case?
My deployment is on a Ubuntu server, based on these docs:
https://rocket.chat/docs/master/installing-and-updating-2-deployment-options-ubuntu
FYI, I am using pm2 for process management.
Any pointers or help would be much appreciated, as I would really like to learn the best practices for scaling our deployment. Thanks.
@karmacoma what version of RC are you using? We have just release a new refactoring on the streams on the develop branch that improves the CPU load significantly. But we have a much bigger improvement coming soon.
Are you using Nginx with PM2?
@engelgabriel We are currently using 0.25.0. Yes, we are using Nginx and PM2.
If you set up your PM2 config json like the example: https://github.com/RocketChat/Rocket.Chat/blob/develop/example-pm2.json You can configure you NGINX like:
upstream demo.rocket.chat {
server localhost:8080 weight=1;
server localhost:8081 weight=1;
server localhost:8082 weight=1;
server localhost:8083 weight=1;
}
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
server_name demo.rocket.chat;
return 301 https://demo.rocket.chat$request_uri;
}
server {
listen 443 default_server;
listen [::]:443 default_server ipv6only=on;
server_name demo.rocket.chat;
root /var/www/rocket.chat/bundle/programs/web.browser/app/;
ssl on;
ssl_certificate /var/www/rocket.chat/ssl/demo/demo.rocket.chat.chained.crt;
ssl_certificate_key /var/www/rocket.chat/ssl/demo/demo.rocket.chat.key;
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
ssl_prefer_server_ciphers on;
ssl_dhparam /etc/nginx/dhparams.pem;
client_max_body_size 32m;
proxy_buffering off;
proxy_http_version 1.1;
proxy_read_timeout 600;
proxy_send_timeout 600;
proxy_set_header Host $host:$server_port;
proxy_set_header Referer $http_referer;
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 https;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Nginx-Proxy true;
proxy_redirect off;
location / {
proxy_pass http://demo.rocket.chat;
}
}
@engelgabriel Thank you! Very much appreciated 👍
Darn I was hoping for a docker-compose variation... But thanks for that!!
@vikaskedia is your DB running in ReplicaSET mode? THIS IS THE MOST IMPORTANT REQUERIMENT
This information on this thread is already added to our docs. Thanks for your contributions!