aminghadersohi opened a new pull request, #37216:
URL: https://github.com/apache/superset/pull/37216
## Summary
When running MCP service in Kubernetes with multiple replicas, session state
(SSE events, progress updates) needs to be shared across pods. This change adds
support for Redis-backed EventStore.
### Changes
- Added `MCP_EVENT_STORE_CONFIG` to `mcp_config.py` for configuring
Redis-backed session storage
- Modified `server.py` to create Redis EventStore when configured
- When enabled, uses `http_app()` with uvicorn instead of built-in `run()`
for multi-pod support
### Configuration Example
```python
MCP_EVENT_STORE_CONFIG = {
"enabled": True,
"redis_url": "rediss://elasticache.amazonaws.com:6379/1",
"max_events_per_stream": 100,
"ttl": 3600,
}
```
### Behavior
- **Disabled (default)**: Uses in-memory sessions via `mcp.run()` - suitable
for single-pod deployments
- **Enabled**: Uses Redis-backed EventStore via `mcp.http_app()` + uvicorn -
suitable for multi-pod/Kubernetes deployments
## Test plan
- [ ] Test single-pod mode (default) - verify in-memory sessions work
- [ ] Test multi-pod mode with Redis - verify sessions are shared across pods
- [ ] Verify SSL connection works with AWS ElastiCache (rediss:// scheme)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]