laravel-echo-server icon indicating copy to clipboard operation
laravel-echo-server copied to clipboard

allowing multiple nodes using socket.io-redis

Open sleimanx2 opened this issue 7 years ago • 9 comments

At the moment laravel-echo-server can run in single instance mode because it 's using the default in-memory adapter which means whispers won't be propagated across nodes.

Here are the changes that make it possible to run multiple nodes.

  • Added socket.io-redis as an adapter when redis db is set
  • Modified the redis-subscriber to ignore all messages coming from the adapter
  • Modified the echo-server to broadcasts to local connections only to avoid sending multiple events due to the new adapter behavior.

sleimanx2 avatar Oct 02 '17 08:10 sleimanx2

Thanks for the PR will be checking it out soon. I need to spend some time on refactoring the docs to be more readable. Once that is ready this will be available in 1.4.1 or later

tlaverdure avatar Mar 13 '18 18:03 tlaverdure

I have laravel-echo-server deployed on Google App Engine, with autoscaling. I'm occasionally losing connections, and getting a lot of 400 responses indicating that the session ID is invalid.

I'm assuming this lack of multi-instance support is the issue, and that if this change were merged, it would fix my problem.

I know this is over two years old now, and has merge conflicts, but is there any chance this could get looked at again, and maybe merged in?

goodevilgenius avatar Jan 06 '20 20:01 goodevilgenius

I think, this multiple node support is important. Do you need help to review this one @tlaverdure ?

efriandika avatar May 14 '20 23:05 efriandika

I would also really appreciate this being considered again, any conflicts fixed, and merged.

TheWiseNoob avatar Jul 23 '20 10:07 TheWiseNoob

@tlaverdure what is the current status of this? Do you need help reviewing and testing it?

SelimSalihovic avatar Aug 13 '20 14:08 SelimSalihovic

Bump

TCURT15 avatar Jan 07 '21 23:01 TCURT15

Any update?

ghost avatar Jan 09 '21 18:01 ghost

@tlaverdure what's the current state here?

renepardon avatar Oct 28 '21 14:10 renepardon

@tlaverdure any update here plz?

metaory avatar May 02 '23 06:05 metaory