Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

How do I scale this laravel-websockets package? #1045

Unanswered
aceraven777 asked this question in Q&A
Discussion options

I am currently building a website that uses Live chats. Its currently working now as expected.

I am running the php artisan websocket:serve via supervisor.

My worry now is what will happen if there are thousands of concurrent users using my website.

And I have these 2 questions:

  1. How do I monitor if hitting the server limit?
  2. If there are more concurrent users does it mean it needs uses more memory? So if I'm expecting a lot of users visiting the website do I need to increase memory_limit in php.ini? Do I need to tweak any more settings?
You must be logged in to vote

Replies: 1 comment

Comment options

The current solution is pretty scalable and can handle a large number of connections. Not sure if you've already seen this section of the docs but it can handle close to 60,000 concurrent connections with just a couple GB.

Unless you're running a really high traffic site (keeping in mind that a daily traffic flow of 1 million users averages out at 695 users a minute) I wouldn't worry too much.

Having said that, I believe version 2 will be shipped with replication allowing events to be broadcast across multiple instances, introducing redundancy and allowing distribution of subscriptions across multiple servers. I'm looking forward to this as it will allow me to introduce redundancy and scalability on my Kubernetes cluster for example.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /