import{_ as r,c as o,o as a,a6 as i}from"./chunks/framework.CHl2ywxc.js";const h=JSON.parse('{"title":"Performance & Tuning","description":"","frontmatter":{},"headers":[],"relativePath":"configuration/performance.md","filePath":"configuration/performance.md","lastUpdated":1755281500000}'),t={name:"configuration/performance.md"};function n(l,e,s,d,c,u){return a(),o("div",null,e[0]||(e[0]=[i('<h1 id="performance-tuning" tabindex="-1">Performance & Tuning <a class="header-anchor" href="#performance-tuning" aria-label="Permalink to "Performance & Tuning""></a></h1><p>Tune routing and runtime to handle your workload.</p><h2 id="routing" tabindex="-1">Routing <a class="header-anchor" href="#routing" aria-label="Permalink to "Routing""></a></h2><ul><li>Prefer <code>health</code> strategy to route to instances with better health scores (when provided)</li><li>Increase <code>retry.maxRetries</code> for flaky networks, but cap <code>maxDelayMs</code></li><li>Use <code>jitter: full</code> to avoid thundering herds</li><li>Adjust <code>circuitBreaker</code> thresholds based on observed upstream reliability</li></ul><h2 id="node-runtime" tabindex="-1">Node Runtime <a class="header-anchor" href="#node-runtime" aria-label="Permalink to "Node Runtime""></a></h2><ul><li>Use <code>NODE_ENV=production</code></li><li>Run behind a reverse proxy (nginx, Cloudflare) for TLS termination</li><li>Set <code>LOG_LEVEL=info</code> or <code>warn</code></li></ul><h2 id="workers-runtime" tabindex="-1">Workers Runtime <a class="header-anchor" href="#workers-runtime" aria-label="Permalink to "Workers Runtime""></a></h2><ul><li>Bind KV storage for token persistence to avoid in-memory losses across isolates</li><li>Avoid large responses; stream when possible</li></ul><h2 id="observability" tabindex="-1">Observability <a class="header-anchor" href="#observability" aria-label="Permalink to "Observability""></a></h2><ul><li>Use <code>/metrics</code> to scrape basic system stats in Node</li><li>Add platform logs/metrics (Cloudflare, Koyeb dashboards)</li></ul>',10)]))}const f=r(t,[["render",n]]);export{h as __pageData,f as default};