Using Socket.IO with Loopback

399 views
Skip to first unread message

Peter Kariuki

unread,
Sep 14, 2015, 9:46:55 AM9/14/15
to LoopbackJS
Hello,

I have a Loopback application with a Socket.IO server attached. 

This works perfectly when am running one process, but as soon as I try to scale it vertically, Socket.IO can no longer be connected to. 

I have done research and found a lot of recommendations of using sticky-sessions such as this one.

Has anyone successfully scaled a Loopback application running Socket.IO? How did you do it?

Thanks,

Peter 

Raymond Feng

unread,
Sep 14, 2015, 12:16:15 PM9/14/15
to loopb...@googlegroups.com
Have you checked out https://docs.strongloop.com/display/MSG/Pub-sub?

For SocketIO beyond one process, you probably need to have distributed store, such as Redis.

Thanks,

---
Raymond Feng
Co-Founder and Architect @ StrongLoop, Inc.

StrongLoop makes it easy to develop APIs in Node, plus get DevOps capabilities like monitoring, debugging and clustering.

--
You received this message because you are subscribed to the Google Groups "LoopbackJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to loopbackjs+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/loopbackjs/8c552779-ef96-4418-bde6-277a8bd8eb11%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Peter Kariuki

unread,
Sep 14, 2015, 1:31:36 PM9/14/15
to LoopbackJS
I have seen other implementations using a distributed store such as Redis on normal NodeJS apps,

I was however wondering how this can be integrated into a loopback application, which can then be clustered using Strongloop.

Currently the application is deployed on Heroku but would want as well to take it to BlueMix.

The biggest issue is how to make sure the client connects to the right worker and I donot get 400 Bad Requests.

Regards,

Peter
Reply all
Reply to author
Forward
0 new messages