Skip to content

Feat/socketio redis adapter - #12

Merged
mohamed-ctrl878 merged 10 commits into
mainfrom
feat/socketio-redis-adapter
Sep 26, 2026
Merged

mohamed-ctrl878 merged 10 commits into
mainfrom
feat/socketio-redis-adapter

Conversation

@mohamed-ctrl878

Copy link
Copy Markdown
Owner

No description provided.

mohamed-ctrl878 and others added 10 commits September 16, 2026 22:10
Needed so Socket.io room-based broadcasts (notifications, submissions)
work correctly across multiple Strapi instances instead of only the
instance that received the event.
Both submission-socket and notification-socket broadcast via
`io.to(room).emit(...)`. Socket.io's default in-memory adapter keeps
room membership local to each process, so with more than one Strapi
instance behind a load balancer, a client connected to instance B
never receives events emitted from instance A even if it joined the
same room. This silently drops real-time notifications/submission
updates for a subset of users instead of throwing an error.

- Adds Redis pub/sub adapter, gated on REDIS_URL
- Logs a loud warning (not a silent fallback) when REDIS_URL is
  missing, since that failure mode is otherwise very hard to notice
  until you scale past one instance
- No behavior change for the current single-instance deployment

See AxeCode_QA_Scalability_Plan.md section 4.2 for the full analysis.
Separate from judge0-redis (different lifecycle/blast-radius): this
one backs real-time notifications and submission-update broadcasts
and is required before scaling the strapi service to >1 replica.
@github-actions

Copy link
Copy Markdown

✅ Pipeline Results

Stage Status
🧪 Unit Tests ✅ Passed
📦 Build ✅ Passed

Deploy: Will run automatically after merge to main.

📋 View Full Logs

@mohamed-ctrl878
mohamed-ctrl878 merged commit d2e526f into main Sep 26, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant