8000 WIP: Horizontal Scaling by AlexMog · Pull Request #114 · ottomated/CrewLink-server · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

WIP: Horizontal Scaling #114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

WIP: Horizontal Scaling #114

wants to merge 3 commits into from

Conversation

AlexMog
Copy link
@AlexMog AlexMog commented Dec 25, 2020

Hello,
I've just seen this tweet from Ottomated.
Scaling vertically a server can work for a limited number of users, but it's not the best way to scale nodes, that's why I've started this PR, I'm working on vertical scaling for CrewLink Server with modular ways to implement messaging and caching.
I've replicated noop scaling (which replicated the current server for local use) and cluster-based node servers.

Currently implemented caches:

  • Local (noop)
  • Redis

Currently implemented messaging system:

  • Local (noop)
  • RabbitMQ

This PR is still in WIP status, because I'll also like to rewrite completely the index.ts to provide a better, modular-through-config and cleanest MVC model for this part of the code.
Theoretically, it can support an infinite amount of users, depending on the number of nodes you are able to provide to your cluster.

WIP part: Everything should work correctly, I've just didn't tested it very well, that's why I've added the WIP tag, I'll test it more with real world usage to validate all this PR.

Have fun !

@AlexMog
Copy link
Author
AlexMog commented Jan 9, 2021

Tested with 50k clients spamming Signal messages each 100ms on 3 servers (standard HA, 3 rabbitMQ, 3 redis (1 sentinel 2 workers), 3 crewlink servers) with 2 cores each (3 GHz each), works like a charm !

@ottomated
Copy link
Owner

How would this perform with a TURN server?

@AlexMog
Copy link
Author
AlexMog commented Jan 10, 2021

That's a good question, haven't tested it at all, just tested the Websocket messaging system.
I think it would depend on the TURN implementation used https://github.com/coturn/coturn seems to have a good implementation for horizontal scaling behing a loadbalencer tho

(btw, I have a kubernetes cluster available (3x6 workers (8c16t x 4.5GHz) if you want me to host the CrewLink server with horizontal scaling if you want to test it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0