High Availability
Can this app be set up for high availability? If you have a cluster, can you have a load balancer, at least two application nodes, and several mongo nodes?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
We need to try it in a lab environment. Configure a mongo replica set with op log. Load balancer needs to support sticky sessions if you have old browsers and/or older mobile clients. @calebmeyer -- do you have access to test facilities for HA configurations? If issues are found in such configurations - we can fix them. (note - some optional packages, such as file-upload to local filesystem, are by design not HA compatible)
I have access to some testing facilities. I will be trying this out. Can you recommend a load balancer?
haproxy? Other community members may have more experience with other software load balancers. Please keep us posted on how it goes.
I enjoy playing with these things. I'll give this a go.
So things wanted tested?
- cluster mongodb (couple nodes)
- rocket.chat (couple instances. Pointing to the master of the mongo cluster)
- load balancer (haproxy or nginx)
Anything else? I guess rattle it a bit and see what bolts fall out? :D
My 2c
- variety of client browser/devices (especially IE versions)
- force-fail mongo instance; force-fail meteor instance; observe interruption in user experience - expected to see some UI anomalies due to delayed session recovery/fail-over, but no data lost
@calebmeyer any update on experiments with clusters of more than 4 RC instances? Thanks.
I have logged a JIRA for access to my organization's openstack cluster, I'm just waiting on a response. I'll keep you posted.
Thanks, @calebmeyer ! :+1:
#769 <---- where are the HA guys when we really need them?! :grinning:
We need to do some testing this weekend
@geekgonecrazy @Sing-Li
I have an HA solution up and running at Google Cloud. Here is the private Gist that describes what I did. I still need to tweak some of the docs, but it is running famously at http://130.211.152.251/.
@leefaus sweet! Come across any issues?
Also did you use anything in front of your nodes?
@geekgonecrazy
The only issue is trying to automate setting up the MongoDB Replica Set. I am digging more into that. And on Google Cloud, the HTTP Load Balancing doesn't support websockets so you need to use Network Load Balancing. Other than that, everything went according to plan.
Thanks for the update! Automated provisioning of failed mongo would be cool ... k8s can do that for sure. But websocket load balance front end is going to take some testing and tinkering. I think. We need to come up with some way to blast it from the front, then introduce different failures at the back and see how the thing behaves :smile_cat:
What is NLB? Is it round robin?
Please keep us in the 'loop' :-)
@leefaus Thanks for the awesome starting point! @Sing-Li I got access to our internal open stack. I'll be looking into setting up a cluster with: 1 HAProxy node 2 Rocket.Chat meteor nodes 3 MongoDB nodes
I'm new to setting all this up, so it will likely take some time while I learn the technologies (or at least how to configure them).
Can anyone recommend testing tools for hitting the frontend, or should I just script something?
@calebmeyer thanks for the update! Two suggestions:
- Can you please 'up' the number of Rocket.Chat meteor nodes from 2 to either 6 or 10? The reason being the 24 x 7 demo chat that we have running now is already 4 nodes - and we see no problem at that tier so far
- For front-end loading, I'd suggest scripting something yourself. We will have a Rocket.Chat specific scalable 'load test tool' in the future.
@calebmeyer for load i'd recommend taking a look at Asteroid
Could use multiple instances of a script using this and hit the server with as many messages as you want.
@Sing-Li will I need to set up sticky sessions?
@calebmeyer
Yes, you need sticky sessions.
Hey all, sorry for the long downtime. I got one of the openstack admins to help me. Didn't get my 6-10 app nodes, but I have it running behind a proxy on our corporate network.
I used @leefaus gist to help with the mongo replicaset (thank you very much!), and I have my haproxy balancing via source.
However, I noticed that avatars are stored on the filesystem in the administration/accounts section. Is that intended? How did we get around that limitation for the demo?