vercel-reliability-patterns
Implement Vercel reliability patterns including circuit breakers, idempotency, and graceful degradation. Use when building fault-tolerant Vercel integrations, implementing retry strategies, or adding resilience to production Vercel services. Trigger with phrases like "vercel reliability", "vercel circuit breaker", "vercel idempotent", "vercel resilience", "vercel fallback", "vercel bulkhead".
- License 许可
- MIT
- 最近更新
- 2026-03-20
- Stars
- ★ 4
- Forks
- 0
01 前言 Front Matter
- name
- vercel-reliability-patterns
- author
- Jeremy Longshore <jeremy@intentsolutions.io>
- license
- MIT
- version
- 1.0.0
- description
- Implement Vercel reliability patterns including circuit breakers, idempotency, and graceful degradation. Use when building fault-tolerant Vercel integrations, implementing retry strategies, or adding resilience to production Vercel services. Trigger with phrases like "vercel reliability", "vercel circuit breaker", "vercel idempotent", "vercel resilience", "vercel fallback", "vercel bulkhead".
- allowed-tools
- Read, Write, Edit
- compatible-with
- claude-code, codex, openclaw
02 资源文件 5
- 参考文档references/circuit-breaker.md782 B
- 参考文档references/dead-letter-queue.md1.0 KB
- 参考文档references/errors.md340 B
- 参考文档references/examples.md135 B
- 参考文档references/idempotency-keys.md880 B
03 SKILL.md 正文
Vercel Reliability Patterns
Prerequisites
- Understanding of circuit breaker pattern
- opossum or similar library installed
- Queue infrastructure for DLQ
- Caching layer for fallbacks
Instructions
Building reliable Vercel-deployed services requires addressing reliability at two levels: the reliability of calls made from your serverless functions to external dependencies, and the reliability of the Vercel deployment itself as seen by end users. Circuit breakers protect against dependency degradation propagating to user-facing failures. Idempotency keys make operations safe to retry after function timeouts. Vercel's edge caching and instant rollback capabilities protect against deployment-level failures.
Step 1: Implement Circuit Breaker
Wrap calls to external services (databases, third-party APIs) inside your serverless functions with a circuit breaker. When a dependency is degraded, the circuit opens and subsequent calls immediately return a fallback response rather than waiting for the full timeout, which keeps your Vercel function execution time low and prevents cascading failures. Use a library like opossum and configure the failure threshold based on the dependency's expected reliability.
Step 2: Add Idempotency Keys
Generate deterministic keys for state-modifying API operations by hashing the request payload and user identity. Return the cached result for duplicate requests rather than executing the operation again. This is critical for mutation endpoints that may be retried by clients after a network error or Vercel function timeout.
Step 3: Configure Bulkheads
Separate processing queues for background operations so that a surge in low-priority work does not consume all available function concurrency and starve real-time user-facing requests.
Step 4: Set Up Dead Letter Queue
Route background operations that exceed their retry budget to a dead letter queue rather than silently dropping them. Alert on DLQ depth and provide a replay interface so failed operations can be reprocessed after the underlying issue is resolved.
Output
- Circuit breakers protecting all external dependency calls from cascading failures
- Idempotency implemented on all state-modifying API endpoints
- Bulkhead concurrency isolation between real-time and background workloads
- Dead letter queue capturing and alerting on permanently failed operations
Error Handling
See ${CLAUDE_SKILL_DIR}/references/errors.md for comprehensive error handling.
Examples
See ${CLAUDE_SKILL_DIR}/references/examples.md for detailed examples.
Resources
Overview
Implement Vercel reliability patterns including circuit breakers, idempotency, and graceful degradation.
04 同仓库更多 Skills
azure-apim-architecture
Analyzes and explains Azure API Management architecture decisions for enterprise API marketplace implementations using VNet Internal mode, Front Door, hybrid authentication, and multi-environment strategies. Use when discussing APIM component selection, network topology, cost optimization, or comparing alternatives like workspaces vs instances, VNet Internal vs External mode, or Front Door vs Application Gateway.
apiops-deployment
Guides deployment of Azure API Management infrastructure using Infrastructure as Code (Bicep/Terraform), CI/CD pipelines (GitHub Actions/Azure DevOps), and APIOps workflows. Use when deploying APIM, creating pipelines, or implementing dev→test→prod promotion strategies.
apim-policy-authoring
Creates production-ready Azure API Management policy XML for authentication (OAuth 2.0, JWT validation, subscription keys), rate limiting, CORS configuration, error handling, and API transformations. Use when implementing API security, access control, or request/response processing logic.
api-security-review
Reviews Azure API Management configurations for security vulnerabilities, OWASP API Security Top 10 compliance, VNet Internal mode validation, Private Link verification, and Azure Security Benchmark alignment. Use when performing security audits, pre-deployment validation, or compliance reviews.
jira-cli
Interact with Jira from the command line to create, list, view, edit, and transition issues, manage sprints and epics, and perform common Jira workflows. Use when the user asks about Jira tasks, tickets, issues, sprints, or needs to manage project work items.
calculator
Performs arbitrary-precision arithmetic calculations including addition, subtraction, multiplication, division, and exponents. Use when the user asks to calculate, compute, or evaluate math expressions, or when precise decimal arithmetic is needed to avoid floating-point errors.