René's URL Explorer Experiment


Title: Proposal: Optional High Availability Best Practices for MCP Deployments with Stateful Streaming (SSE) Connections · Issue #2000 · modelcontextprotocol/modelcontextprotocol · GitHub

Open Graph Title: Proposal: Optional High Availability Best Practices for MCP Deployments with Stateful Streaming (SSE) Connections · Issue #2000 · modelcontextprotocol/modelcontextprotocol

X Title: Proposal: Optional High Availability Best Practices for MCP Deployments with Stateful Streaming (SSE) Connections · Issue #2000 · modelcontextprotocol/modelcontextprotocol

Description: TL;DR Summary Proposal: Introduce optional High Availability best practices for MCP deployments to address session continuity and failover in stateful streaming (SSE) connections. Focuses on HA challenges in long-lived streaming sessions...

Open Graph Description: TL;DR Summary Proposal: Introduce optional High Availability best practices for MCP deployments to address session continuity and failover in stateful streaming (SSE) connections. Focuses on HA cha...

X Description: TL;DR Summary Proposal: Introduce optional High Availability best practices for MCP deployments to address session continuity and failover in stateful streaming (SSE) connections. Focuses on HA cha...

Opengraph URL: https://github.com/modelcontextprotocol/modelcontextprotocol/issues/2000

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Proposal: Optional High Availability Best Practices for MCP Deployments with Stateful Streaming (SSE) Connections","articleBody":"# TL;DR Summary\n\n**Proposal:** Introduce optional High Availability best practices for MCP deployments to address **session continuity and failover in stateful streaming (SSE) connections**.  \n- Focuses on **HA challenges in long-lived streaming sessions** behind load balancers.  \n- Recommends **non-normative, optional patterns** (pub-sub, cluster coordination, middleware, session partitioning).  \n\n---\n\n## Background / Community Context\n\nMCP deployments increasingly target **production environments** with multiple replicas and distributed workloads. Real-world deployments face challenges when **stateful streaming sessions** coexist with **stateless HTTP ingress**.  \n\nAdditionally, the community has previously discussed handling MCP sessions behind load balancers (see GitHub PR #325). Contributors highlighted that MCP’s stateful session establishment (e.g., via SSE) can conflict with stateless load balancing unless session affinity is maintained. The conversation concluded that while session stickiness is a practical consideration, specifying such behavior at the protocol level was not appropriate; instead, guidance for gateways and high‑availability deployments would be valuable. ([github.com](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/325))\n\nKey points from the discussion:  \n\n- **Session continuity**: Long-lived connections (SSE) may be routed to different replicas, breaking sessions without sticky sessions.  \n- **Implementation discretion**: Session management, sticky sessions, and shared session stores are left to implementers.  \n- **Best practices guidance**: The community sees value in providing **optional HA patterns or gateway guidance** rather than normative protocol changes.\n\nThis context provides **direct support for proposing optional HA best practices**, aligning with ongoing community awareness of multi-node deployment challenges.\n\n---\n\n## Goals\n\n- Enable MCP servers to **scale horizontally** while preserving session continuity.  \n- Avoid reliance on sticky sessions at the load balancer level.  \n- Keep MCP **protocol semantics unchanged**.  \n- Provide **implementation-agnostic guidance** applicable to diverse transports and environments.  \n- Allow gradual adoption without disrupting existing deployments.\n\n---\n\n## Non-Goals\n\n- Mandating specific HA mechanisms or middleware.  \n- Introducing protocol-level changes to MCP messages.  \n- Replacing existing transports or enforcing Streamable HTTP.  \n- Evaluating or criticizing specific platforms or client ecosystems.\n\n---\n\n## Motivation: HA Necessity in Production Deployments\n\nProduction MCP deployments face several HA-related challenges:\n\n- **Stateless ingress vs. stateful session/streaming egress**: load balancers can route connections to different replicas, causing session disruption.  \n- **Single-node failure or restart** can interrupt ongoing streaming sessions.  \n- **Session resumption across replicas** is non-trivial without additional coordination.  \n\nThese issues exist independently of the underlying transport or client support and justify optional HA patterns for reliable operation in multi-node deployments.\n\n---\n\n## Optional HA Patterns\n\n### 1. Core HA Patterns (Optional)\n\n#### 1.1 Event Bus / Pub-Sub\n\n- Externalize session events to a **distributed pub-sub system**.  \n- Multiple MCP server replicas can **subscribe and replay events** transparently.  \n- Decouples session lifetime from any single server node.  \n- Enables failover and session recovery without client awareness.\n\n#### 1.2 Cluster Coordination \u0026 P2P Forwarding\n\n- MCP nodes maintain **lightweight cluster state** via gossip, shared stores, or JDBC ping.  \n- Session messages can be **forwarded peer-to-peer** to the node currently handling the session.  \n- Provides **best-effort replication and routing** for streaming events.  \n- Avoids heavy consensus mechanisms (e.g., Raft) to preserve throughput.\n\n---\n\n### 2. Implementation \u0026 Optimization Support (Optional)\n\n#### 2.1 Middleware / SDK Abstraction\n\n- Encapsulates HA logic (pub-sub, P2P forwarding).  \n- Keeps protocol handlers and business logic unchanged.  \n- Provides a transparent API for SDK consumers.  \n- Optional per deployment, allows gradual adoption.\n\n#### 2.2 Session Partitioning / Affinity Hints\n\n- Opaque session IDs may encode **internal partitioning or affinity hints**.  \n- Reduces coordination overhead in large clusters.  \n- Affinity is advisory; correctness must not depend on it.  \n- Complements middleware, pub-sub, or P2P forwarding.\n\n---\n\n## Illustrative Middleware-Oriented Model (Python, Non-Normative)\n\n```python\nasync def handle_mcp_message(message, send):\n    if message[\"type\"] == \"tool_call\":\n        result = await run_tool(message[\"payload\"])\n        await send({\n            \"type\": \"tool_result\",\n            \"payload\": result\n        })\n\nclass MCPHAMiddleware:\n    def __init__(self, ha_backend):\n        self.ha = ha_backend\n\n    def wrap(self, handler):\n        async def wrapped(message, send):\n            session_id = self.ha.ensure_session(message)\n\n            async with self.ha.bind_session(session_id, send) as ha_send:\n                await handler(message, ha_send)\n\n        return wrapped\n````\n\n* Business logic remains unchanged.\n* HA logic (pub-sub, gossip, session partition) is fully encapsulated.\n* Works in both single-node and multi-node deployments.\n\n---\n\n## Compatibility\n\n* Fully backward compatible with existing MCP servers.\n* HA support is optional and implementation-defined.\n* Does not require clients to be aware of HA mechanisms.\n* Can coexist with Streamable HTTP.\n\n---\n\n## Summary\n\nProduction MCP deployments need HA considerations to maintain reliability and scalability. This proposal:\n\n* Highlights HA challenges.\n* Recommends **optional, non-invasive best practices**.\n* Maintains protocol compatibility and low intrusion.\n* Supports gradual adoption as ecosystems evolve.","author":{"url":"https://github.com/jizhuozhi","@type":"Person","name":"jizhuozhi"},"datePublished":"2025-12-20T19:40:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/2000/modelcontextprotocol/issues/2000"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:7cf28fe6-a1be-1628-de8d-bc97fd042048
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA54E:171905:37C67F:4A0570:6A5B26DD
html-safe-nonced162da9ecd2313561fdfa98c67aad2a9f53834caf6b99709b0eaf045eb19b261
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNTRFOjE3MTkwNTozN0M2N0Y6NEEwNTcwOjZBNUIyNkREIiwidmlzaXRvcl9pZCI6IjUyMTg1MjAzNTYwMzA3MTk3MDkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac2056e3d7136455725428b14e8be81a0d16839b414de2899bfc4fe23e12a383a5
hovercard-subject-tagissue:3750348206
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/modelcontextprotocol/modelcontextprotocol/2000/issue_layout
twitter:imagehttps://opengraph.githubassets.com/b972a84a73b6a06c9a910c25671bc875217cb9d39938f5367f604fe24cf149d0/modelcontextprotocol/modelcontextprotocol/issues/2000
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b972a84a73b6a06c9a910c25671bc875217cb9d39938f5367f604fe24cf149d0/modelcontextprotocol/modelcontextprotocol/issues/2000
og:image:altTL;DR Summary Proposal: Introduce optional High Availability best practices for MCP deployments to address session continuity and failover in stateful streaming (SSE) connections. Focuses on HA cha...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejizhuozhi
hostnamegithub.com
expected-hostnamegithub.com
None5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b
turbo-cache-controlno-preview
go-importgithub.com/modelcontextprotocol/modelcontextprotocol git https://github.com/modelcontextprotocol/modelcontextprotocol.git
octolytics-dimension-user_id182288589
octolytics-dimension-user_loginmodelcontextprotocol
octolytics-dimension-repository_id862570523
octolytics-dimension-repository_nwomodelcontextprotocol/modelcontextprotocol
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id862570523
octolytics-dimension-repository_network_root_nwomodelcontextprotocol/modelcontextprotocol
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release9c975978430e9ad293956f2bbdaf153b1bd84a99
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/modelcontextprotocol/modelcontextprotocol/issues/2000#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fmodelcontextprotocol%2Fissues%2F2000
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fmodelcontextprotocol%2Fissues%2F2000
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=modelcontextprotocol%2Fmodelcontextprotocol
Reloadhttps://github.com/modelcontextprotocol/modelcontextprotocol/issues/2000
Reloadhttps://github.com/modelcontextprotocol/modelcontextprotocol/issues/2000
Reloadhttps://github.com/modelcontextprotocol/modelcontextprotocol/issues/2000
Please reload this pagehttps://github.com/modelcontextprotocol/modelcontextprotocol/issues/2000
modelcontextprotocol https://github.com/modelcontextprotocol
modelcontextprotocolhttps://github.com/modelcontextprotocol/modelcontextprotocol
Notifications https://github.com/login?return_to=%2Fmodelcontextprotocol%2Fmodelcontextprotocol
Fork 1.7k https://github.com/login?return_to=%2Fmodelcontextprotocol%2Fmodelcontextprotocol
Star 8.6k https://github.com/login?return_to=%2Fmodelcontextprotocol%2Fmodelcontextprotocol
Code https://github.com/modelcontextprotocol/modelcontextprotocol
Issues 113 https://github.com/modelcontextprotocol/modelcontextprotocol/issues
Pull requests 80 https://github.com/modelcontextprotocol/modelcontextprotocol/pulls
Discussions https://github.com/modelcontextprotocol/modelcontextprotocol/discussions
Actions https://github.com/modelcontextprotocol/modelcontextprotocol/actions
Projects https://github.com/modelcontextprotocol/modelcontextprotocol/projects
Models https://github.com/modelcontextprotocol/modelcontextprotocol/models
Security and quality 0 https://github.com/modelcontextprotocol/modelcontextprotocol/security
Insights https://github.com/modelcontextprotocol/modelcontextprotocol/pulse
Code https://github.com/modelcontextprotocol/modelcontextprotocol
Issues https://github.com/modelcontextprotocol/modelcontextprotocol/issues
Pull requests https://github.com/modelcontextprotocol/modelcontextprotocol/pulls
Discussions https://github.com/modelcontextprotocol/modelcontextprotocol/discussions
Actions https://github.com/modelcontextprotocol/modelcontextprotocol/actions
Projects https://github.com/modelcontextprotocol/modelcontextprotocol/projects
Models https://github.com/modelcontextprotocol/modelcontextprotocol/models
Security and quality https://github.com/modelcontextprotocol/modelcontextprotocol/security
Insights https://github.com/modelcontextprotocol/modelcontextprotocol/pulse
Proposal: Optional High Availability Best Practices for MCP Deployments with Stateful Streaming (SSE) Connectionshttps://github.com/modelcontextprotocol/modelcontextprotocol/issues/2000#top
https://github.com/jizhuozhi
jizhuozhihttps://github.com/jizhuozhi
on Dec 20, 2025https://github.com/modelcontextprotocol/modelcontextprotocol/issues/2000#issue-3750348206
#325https://github.com/modelcontextprotocol/modelcontextprotocol/pull/325
github.comhttps://github.com/modelcontextprotocol/modelcontextprotocol/pull/325
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.