Reputation: 1065
I am working on a web application with consists at the front end of multiple instances talking to the same API server.
The users will come in to a random instance (server) of the app with their session stored on a REDIS backend.
My options at the moment are:
1) Place a Redis server on each web server and cluster them so all sessions are copied across (there might be some issues here with continuity).
2) Setup a dedicated Redis server which all the web servers talk to.
Is there any other way to do this that I have missed? Also, what are the pros and cons of each option?
Upvotes: 1
Views: 1399
Reputation: 618
About option 1. If i understand correctly you tried to cluster redis instance. Unfortunately Redis doesn't provide clustering as of now.
About option 2. I think it looks, using single Redis instance as a backend session store. This approach is looks more reasonable. But about options 2. u needs to consider
If you are going to use the redis instance for the session store only, scalibility will not be a issue. (session data is not so huge). Only consideration point is availability.
Another options that you consider is couchbase. Couchbase is another nosql and it has clustered memcached. So it is very good to use for session store and it provides built in scale/out feature and failover/failback feature.
hope it will be useful to u.
Upvotes: 1