Skip to main content
Glama
load-balancing-and-resilience.md1.24 kB
# Tutorial: Load Balancing & Resilience Demonstrates multiple backends with load balancing, retries, and circuit breaker tuning. ## Configuration `examples/multi-server/config.yaml` (provided): ```yaml hosting: platform: node port: 3000 master_oauth: authorization_endpoint: https://example.com/oauth/authorize token_endpoint: https://example.com/oauth/token client_id: master-mcp redirect_uri: http://localhost:3000/oauth/callback scopes: [openid] routing: loadBalancer: strategy: health circuitBreaker: failureThreshold: 3 successThreshold: 2 recoveryTimeoutMs: 10000 retry: maxRetries: 3 baseDelayMs: 200 maxDelayMs: 3000 backoffFactor: 2 jitter: full retryOn: networkErrors: true httpStatuses: [408, 429] httpStatusClasses: [5] servers: - id: compute type: local auth_strategy: bypass_auth config: port: 4101 - id: compute type: local auth_strategy: bypass_auth config: port: 4102 ``` Run master with: ``` MASTER_CONFIG_PATH=examples/multi-server/config.yaml npm run dev ``` The router will choose an instance per call, retry on transient errors, and open the circuit if failures breach the threshold.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Jakedismo/master-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server