Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
Advice on setup/config for Load-balancing with a RAM-intensive Chat app
I’m new to security and load balancing techniques and hoping to learn them in case I need to in the future. I’m a webserver newbie hoping to learn and apply advance techniques. Any help or links to tutorials would be appreciated.
Currently. my 1 VPS server will composes of:
1) wordpress multisite
2) a custom-php dating site
3) a chat app called that will be attached to my dating site and primarily uses text, and it’s caching can be externally offloaded to a Chatservice or other memcached service like Memcachier. Currently, the chat “data and objects are stored in RAM instead of a server or external source,” and for every 1000 users, it accesses the database 2 times every minute.
For now I’m on development and planning phase. I was told that the chat app will be RAM intensive and might require 4GB to 8GB to serve 100-1000+ concurrent users, hence I’m exploring scalability options.
The other options is to use their the Chatservice" to offload MEMcached processes at prices and msg exchanges, respectively:
1) Keep overall cost under $60 USD and retain more benefits if I can have a Digitalocean networking solution instead.
2) Start with Layer 4 load balancing and hopefully move on to 7 if advised.
My questions are:
1) what kind of load-balancing setup would be ideal for the chat app? What are the usual costs for Layer 4 and Layer 7 with private networking?
- Not ideal= one option is to load balance multiple servers that lumps in websites and chat app together -Ideal = have a separate Memcached Server just for Cometchat (but clients has to connect to the database servers for Login first). I feel this is my ideal solution, but lack the know how.
2) Reading the DO tutorials led me to this slightly modified diagram for an ideal setup:
with 2 isolated memcached servers (hmm, better 3?)
Would this work ideally?
Is it possible that the chat app can have it’s own Ha-proxy loadbalancer and be connected to a Slave database or a Redis+mysql instance? (security wise, what’s the ideal server app between a haproxy and the memcached cluster so SSL is applied?)
3) Correct me if I’m wrong: I hope to serve Canadians in the Alberta province and the only Canadian server is Toronto (not quite PCI compliant until later this year). So, it’s one option to use the San Francisco server for Memcached instance as it’s 500 miles less.
Lastly, is it possible to private network with other VPS servers that is not digitalocean? Are there risks?
4) Lastly, if 4GB RAM is optimal for 1000+ connection, would 1 GB x 2 memcached server suffice and I slowly increase?
Thanks so much for any help. I certainly need to practice and test things out. Links to the right tutorials would help.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×