miguelgrinberg/Flask-SocketIO-Chat

Scaling with Redis

cheickmec opened this issue · 1 comments

I have been trying to slightly modify the code to use my local instance of Redis by providing it with the redis:// argument as the message_queue argument on the following

socketio.init_app(app)
becomes
socketio.init_app(app, message_queue='redis://').
According to my reading of the documentation, that is all I need for accomplishing what I'm attempting here and it does seem to work to some extent because when I monitor my redis from another terminal (redis-cli monitor), I see the application subscribing to the flask-socketio channel once I fill out the initial form for joining a room. However, after being redirected to the chat room page, socketio attempts to make a connection to the server multiple times but all those requests never seem to return as they show up as pending in my Chrome dev tools. Below is a screenshot of that.
screen shot 2018-03-07 at 7 18 53 am
Have I missed something in the configuration step for this?The behavior I'm expecting is to be able to instantiate two servers on different ports and let's say I join room 1 on both from different browser windows, then I should be able to send a message from one window to the other. I have done something similar in NodeJs and it worked fine but I'm having trouble replicating the same behavior here.

This issue will be automatically closed due to being inactive for more than six months. Please reopen if you need more assistance.