ratchetphp / Ratchet

Asynchronous WebSocket server
http://socketo.me
MIT License
6.29k stars 747 forks source link

Share connections between two separate socket server #754

Open boya1305 opened 5 years ago

boya1305 commented 5 years ago

I have two websockets running on two separate machines. Now I want to share connection pool (SplObjectStorage) between two webscokets app (make them run in cluster). What is the best way to do it? I came across solution like wamp, but in current architecture wamp is not an option.

Is there any solutions like using redis?

jupitern commented 5 years ago

I am using https://github.com/clue/reactphp-redis to send everything to a redis pub sub that all servers subscribe to