Skip to main content
Glama
guides_request-routing.md.Bdzf0VLg.js2.6 kB
import{_ as o,c as r,o as a,a6 as t}from"./chunks/framework.CHl2ywxc.js";const p=JSON.parse('{"title":"Request Routing & Resilience","description":"","frontmatter":{},"headers":[],"relativePath":"guides/request-routing.md","filePath":"guides/request-routing.md","lastUpdated":1755281500000}'),i={name:"guides/request-routing.md"};function d(c,e,s,l,n,u){return a(),r("div",null,e[0]||(e[0]=[t('<h1 id="request-routing-resilience" tabindex="-1">Request Routing &amp; Resilience <a class="header-anchor" href="#request-routing-resilience" aria-label="Permalink to &quot;Request Routing &amp; Resilience&quot;">​</a></h1><p>Requests are routed by <code>RequestRouter</code>, which uses a <code>RouteRegistry</code>, <code>LoadBalancer</code>, <code>RetryHandler</code>, and <code>CircuitBreaker</code> to provide resilient upstream calls.</p><h2 id="endpoints" tabindex="-1">Endpoints <a class="header-anchor" href="#endpoints" aria-label="Permalink to &quot;Endpoints&quot;">​</a></h2><ul><li>Tools: <code>POST /mcp/tools/call</code> with <code>{ name, arguments }</code></li><li>Resources: <code>POST /mcp/resources/read</code> with <code>{ uri }</code></li></ul><p>Names and URIs may be prefixed by server id when aggregated.</p><h2 id="load-balancing" tabindex="-1">Load Balancing <a class="header-anchor" href="#load-balancing" aria-label="Permalink to &quot;Load Balancing&quot;">​</a></h2><p>Configure strategy under <code>routing.loadBalancer.strategy</code>:</p><ul><li><code>round_robin</code> (default)</li><li><code>weighted</code></li><li><code>health</code></li></ul><h2 id="retries" tabindex="-1">Retries <a class="header-anchor" href="#retries" aria-label="Permalink to &quot;Retries&quot;">​</a></h2><p><code>routing.retry</code> controls attempts with backoff and jitter:</p><ul><li><code>maxRetries</code>, <code>baseDelayMs</code>, <code>maxDelayMs</code>, <code>backoffFactor</code>, <code>jitter</code> (<code>full</code> or <code>none</code>)</li><li><code>retryOn.httpStatuses</code>, <code>retryOn.httpStatusClasses</code>, <code>retryOn.networkErrors</code></li></ul><h2 id="circuit-breaker" tabindex="-1">Circuit Breaker <a class="header-anchor" href="#circuit-breaker" aria-label="Permalink to &quot;Circuit Breaker&quot;">​</a></h2><p><code>routing.circuitBreaker</code> manages failure thresholds and recovery:</p><ul><li><code>failureThreshold</code>, <code>successThreshold</code>, <code>recoveryTimeoutMs</code></li></ul><p>When open, requests fail fast with a retry-after hint.</p>',15)]))}const g=o(i,[["render",d]]);export{p as __pageData,g as default};

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