Creating a replica of redis session store
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 17.6k
- Forks
- 2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 40
Description
When used as a session store in an expressjs/nodejs app as such:
var express = require("express");
var session = require('express-session');
var redis = require("redis");
var redisStore = require('connect-redis')(session);
var redisClient = redis.createClient();
// more dependencies are loaded here...
app.use(session({
secret: 'mysecret',
// create new redis store.
store: new redisStore({ host: 'localhost', port: 6379, client: redisClient }),
saveUninitialized: false,
resave: false
}));
is there a way to create a replica of redisStore with the session data as the initial store. Are there any PubSub events when ever a new session is added, or removed from the store? I was thinking of using pubsub, and having two separate redis session stores, where one publishes to the other. Is this possible, is it the best solution?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Begin with the express-session configuration shown in the report, then inspect connect-redis and Redis Pub/Sub documentation to determine whether session creation/removal events and initial-store replication are supported. Done requires a documented, agreed approach or a narrowly scoped implementation target; the issue currently names no files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- express, javascript, nodejs, redis
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100