Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Adds a new Virtual MCP Server (vMCP) guide focused on circuit breaker behavior and partial-failure handling, filling the documentation gap called out in issue #535 and linking back to existing backend status monitoring docs to avoid duplication.
Changes:
- Adds a new
Failure handlingguide covering circuit breaker states/config, partial failure modes, examples, and troubleshooting. - Wires the new guide into the vMCP docs navigation sidebar.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
sidebars.ts |
Adds the new failure-handling guide to the “Guides: Virtual MCP Server” sidebar section. |
docs/toolhive/guides-vmcp/failure-handling.mdx |
New end-to-end documentation for vMCP circuit breaker and partial-failure behavior, with configuration examples and troubleshooting. |
Add comprehensive documentation for Virtual MCP Server's circuit breaker and failure handling features, addressing the gap identified in issue #535. The new failure-handling guide covers: - Circuit breaker states (Closed, Open, Half-open) with state diagram - Configuration options for circuit breaker and health checks - Partial failure modes (fail vs best_effort) - Production-ready example configurations - Troubleshooting common circuit breaker issues This integrates with existing backend-discovery documentation which already covers health status monitoring and the /status endpoint, avoiding duplication while providing focused guidance on circuit breaker patterns for handling backend failures gracefully. Resolves: #535 Related: stacklok/toolhive#3036
Editorial Review: PR 536 - Failure Handling DocumentationSummaryThis PR adds excellent documentation for circuit breaker and partial failure modes. The content is well-structured, follows Diataxis principles (clear how-to guide), and provides practical examples. Only minor improvements suggested below. ✅ Strengths
📝 Suggestions for Improvement1. Strengthen "when to use" guidance (lines 32-38)Issue: The decision-making guidance is buried in a tip callout. This is important information that helps users decide whether to enable this feature. Suggestion: Expand the Overview section to include a dedicated "When to enable circuit breaker" subsection: ## Overview
When backends fail due to crashes, network issues, or rate limiting, vMCP provides circuit breaker and partial failure modes to handle failures gracefully:
- **Circuit breaker**: Prevents cascading failures by immediately rejecting requests to failing backends instead of waiting for timeouts
- **Partial failure modes**: Choose whether to fail entire requests or continue with available backends
- **Automatic recovery**: Backends are automatically restored when they recover
### When to enable circuit breaker
Enable circuit breaker for:
- Production environments where backends may experience temporary failures (deployments, restarts, rate limits)
- Systems with multiple backend dependencies where cascading failures are a concern
- Environments where fast failure response is preferred over retry attempts
Health checks alone may be sufficient for:
- Highly stable backends with minimal downtime
- Development environments where debugging requires seeing actual failures
- Single-backend deployments where circuit breaker adds unnecessary complexity2. Improve table formatting (lines 94-103)Issue: The "Circuit breaker" row in the configuration table creates an awkward separator within the table. Suggestion: Split into two subsections for better visual hierarchy: ### Health check configuration
| Field | Description | Default |
| ------------------------- | ----------------------------------------------------- | ------- |
| `healthCheckInterval` | Time between health checks for each backend | `30s` |
| `unhealthyThreshold` | Consecutive failures before marking backend unhealthy | `3` |
| `healthCheckTimeout` | Maximum duration for a single health check | `10s` |
| `statusReportingInterval` | Interval for reporting status to Kubernetes | `30s` |
### Circuit breaker configuration
| Field | Description | Default |
| ------------------- | --------------------------------------------- | ------- |
| `enabled` | Enable circuit breaker | `false` |
| `failureThreshold` | Number of failures before opening the circuit | `5` |
| `timeout` | Duration to wait before testing recovery | `60s` |3. Minor clarity improvementsLine 151: "any required backend is unavailable"
Line 188:
Line 208:
4. Terminology consistencyThroughout: The doc uses "health status", "health state", and "backend status" interchangeably. Recommendation:
🎯 Overall AssessmentThis is high-quality documentation that meets the bar for merging. The suggested improvements are minor and could be addressed in a follow-up if needed. The content is clear, accurate, and provides exactly what operators need to configure failure handling effectively. Recommendation: Approve with optional minor improvements |
Description
Add comprehensive documentation for Virtual MCP Server's circuit breaker and failure handling features, addressing the gap identified in issue #535.
The new failure-handling guide covers:
This integrates with existing backend-discovery documentation which already covers health status monitoring and the /status endpoint, avoiding duplication while providing focused guidance on circuit breaker patterns for handling backend failures gracefully.
Type of change
Related issues/PRs
Resolves: #535
Related: stacklok/toolhive#3036
Screenshots
Submitter checklist
Content and formatting
Navigation
sidebars.ts) updated for added, deleted, reordered, or renamed filesvercel.jsonfor moved, renamed, or deleted pages (i.e., if the URL slug changed)Reviewer checklist
Content