thejsj / socket.io-rethinkdb

A RethinkDB adapter for Socket.io
https://www.npmjs.com/package/socket.io-rethinkdb
20 stars 2 forks source link

question : possible to have an exemple with koajs ? #2

Open smolleyes opened 8 years ago

smolleyes commented 8 years ago

hi i have an app using koajs and rethinkd but problems with socket.io ...

i use the nginx ip_hash and pm2 and start 4 times my app on different ports then i don t understand how to use your module

possible to add an exemple ? (server/client)

thanks :+1:

thejsj commented 8 years ago

I think this has nothing to do with the module. Is socketio working on a single server without rethinkdb? If it's not, fix that first. There should be ample documentation out there for that.

Once you have that working, you would use this module to scale out socketio for use in multiple servers.

If your using NGNIX, it's sounds like you might have a we sockets problem. Keep in mind that you have to add special config for websockets. I'm pretty sure socketio has some documentation around that. I've used that in the past.

On Jun 14, 2016, at 10:37, smolleyes notifications@github.com wrote:

hi i have an app using koajs and rethinkd but problems with socket.io ...

i use the ngixn ip_hash but don t understand how to use your module

possible to add an exemple ? (server/client)

thanks 👍

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

smolleyes commented 8 years ago

hi

yes no problems with only one process thru pm2

i just followed the instructions from socket.io doc http://socket.io/docs/using-multiple-nodes/

this is my actual config in my web conf

i want to use the redis solution for sticky session but with rethinkdb...