How relays throttle traffic per connection, and how to configure limits on a self-hosted relay
Why you’re here
If an iroh endpoint just logged something like this:
The relay is rate-limiting this endpoint; outbound relay traffic is beingthrottled. Send less data over the relay, or, if you operate this relay,raise Limits::client_rx.
This means the relay has started throttling how fast it reads data from your connection. This is not an error.
This just means that the connection stays open and traffic keeps moving, just slower than usual.Two ways to fix it:
Get a direct connection instead. Relay rate limits only apply while traffic is relayed over a relay server. A successful direct P2P path bypasses the relay entirely. If an endpoint keeps falling back to the relay, diagnose a direct connection.
This notice is sent at most once per connection, and only to endpoints at iroh
version 1.0.4 or higher. Older clients are throttled the same way but won’t see
the warning.
Public relays
The public relays n0.computer runs are free,
open to every iroh endpoint, and rate-limited to prevent abuse of shared
infrastructure.The exact rate limits aren’t published today, as they get tuned as needed. However, the
mechanism is applied per connection. If you are using the N0 preset, you’re
sharing the relay’s total capacity with every other tenant, so heavy traffic
from other users can affect your experience.This means that public infrastructure is meant for development and hobby use. Do not rely on it for production workloads, especially if your application is sensitive to rate limiting, uptime, or relay software version.
Shared and managed relays
Shared relays run on separate infrastructure
from the public relays, with far fewer tenants per machine and higher
per-connection limits.Dedicated relays provisioned through Iroh
Services are dedicated to your project. These have no other tenants, no rate limits at
all.
How it works
Rate limiting is a property of a single relay connection, not a global switch.Each client connection gets its own token-bucket limiter on the side of the
relay that reads data sent by that client (rx, for “receive”):
bytes_per_second — the steady-state rate the relay will keep reading from that connection.
max_burst_bytes — how far a client can exceed that rate momentarily before the bucket runs dry.
When a client’s bucket empties, the relay stops reading from that connection’s
socket until it refills. Data isn’t dropped. The client just experiences
backpressure. Writes to the relay stall until the bucket has room again. This is
what triggers the one-time RateLimited status notice.Because the limiter is per-connection, one client hitting its limit doesn’t affect other clients on the same relay.
Self-hosted relays
If you run the iroh-relay binary (or embed the iroh-relay server crate)
yourself, rate limiting is off by default. This means connections can send
unlimited data.With the iroh-relay binary, configure it in your TOML config file:
bytes_per_second is required to enable the limiter; max_burst_bytes is
optional and defaults to no burst allowance above the steady rate if omitted.See the relay server API reference
for the configuration types used when embedding the server.If you’re embedding the relay server as a library, the equivalent is
iroh_relay::server::Limits::client_rx. This is the field the client-facing
warning message refers to when it says “raise Limits::client_rx”.
Limits also has accept_conn_limit / accept_conn_burst fields for rate-limiting new incoming connections. As of this writing they’re reserved but not yet enforced — setting them has no effect.
Consider a per-connection limit even on a single-tenant dedicated relay: it protects your egress bandwidth and CPU from a single misbehaving client or a bug in your own application, not just from other tenants.
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"iroh","colors":{"primary":"#8790ff","light":"#8790ff","dark":"#8790ff"},"logo":{"light":"https://mintcdn.com/number0/1epvC3-oXGhuzYfu/logo/iroh-wordmark-purple.svg?fit=max\u0026auto=format\u0026n=1epvC3-oXGhuzYfu\u0026q=85\u0026s=f38ef57cfd1329c2a7cfcf2305784f9e","dark":"https://mintcdn.com/number0/1epvC3-oXGhuzYfu/logo/iroh-wordmark-purple.svg?fit=max\u0026auto=format\u0026n=1epvC3-oXGhuzYfu\u0026q=85\u0026s=f38ef57cfd1329c2a7cfcf2305784f9e"},"favicon":"https://mintcdn.com/number0/9MUTBj41IlLmNoVZ/favicon.ico?fit=max\u0026auto=format\u0026n=9MUTBj41IlLmNoVZ\u0026q=85\u0026s=6fd2492ee6e2fba2cb10d827b8a784b2","navbar":{"links":[{"href":"https://www.iroh.computer/discord","label":"Community"},{"href":"https://iroh.computer/blog","label":"Blog"}],"primary":{"type":"button","label":"Login","href":"https://services.iroh.computer?utm_source=docs\u0026utm_content=nav-login"}},"footer":{"socials":{"github":"https://github.com/n0-computer/iroh"}},"integrations":{"plausible":{"domain":"docs.iroh.computer"}},"contextual":{"options":[],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"number0","hasAudioNarration":false,"actualSubdomain":"number0","customDomains":["docs.iroh.computer"],"gitSource":{"type":"github","owner":"n0-computer","repo":"docs.iroh.computer","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":"","_id":"6b10c6389ffae5051c407072"},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{},"buildId":"6b04b2cea3c1684e21d3eaff","clientVersion":"0.0.4428","searchFilterCounts":[{"language":"default","tag":"Tutorials","count":9},{"language":"default","tag":"Languages","count":9},{"language":"default","tag":"About","count":7},{"language":"default","tag":"How it works","count":7},{"language":"default","tag":"Observability","count":7},{"language":"default","tag":"Creating Connections","count":6},{"language":"default","tag":"Relays","count":6},{"language":"default","tag":"Sending Data","count":6},{"language":"default","tag":"API References","count":5},{"language":"default","tag":"Services Billing","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"#sidebar-content a[class*=\"text-gray-700\"],#sidebar-content button[class*=\"text-gray-700\"]{color:rgb(17, 24, 39)}.dark #sidebar-content a[class*=\"dark:text-gray-400\"],.dark #sidebar-content button[class*=\"dark:text-gray-400\"]{color:#ddd}"}]}
{"page":{"pagePath":"relays/rate-limiting","slug":"/relays/rate-limiting","pageMetadata":{"title":"Rate Limiting","description":"How relays throttle traffic per connection, and how to configure limits on a self-hosted relay","href":"/relays/rate-limiting"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"How relays throttle traffic per connection, and how to configure limits on a self-hosted relay\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`why-you’re-here`,children:`Why you’re here`}),`\n`,_jsx(_components.p,{children:`If an iroh endpoint just logged something like this:`}),`\n`,_jsx(CodeBlock,{numberOfLines:`4`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`The relay is rate-limiting this endpoint; outbound relay traffic is being`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`throttled. Send less data over the relay, or, if you operate this relay,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`raise Limits::client_rx.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`This means the relay has started throttling how fast it reads data from your connection. This is not an error.\nThis just means that the connection stays open and traffic keeps moving, just slower than usual.`}),`\n`,_jsx(_components.p,{children:`Two ways to fix it:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Get a direct connection instead.`}),` Relay rate limits only apply while traffic is relayed over a relay server. A successful direct P2P path bypasses the relay entirely. If an endpoint keeps falling back to the relay, `,_jsx(_components.a,{href:`/iroh-services/net-diagnostics/quickstart`,children:`diagnose a direct connection`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Use a relay with a higher limit.`}),` `,_jsx(_components.a,{href:`/iroh-services/relays/shared`,children:`Shared relays`}),` allow more throughput and higher rate limits, and `,_jsx(_components.a,{href:`/iroh-services/relays/managed`,children:`dedicated relays`}),` remove rate limits entirely. If you run your own relay, `,_jsx(_components.a,{href:`#self-hosted-relays`,children:`raise or remove its limit`}),`.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`This notice is sent at most once per connection, and only to endpoints at iroh\nversion 1.0.4 or higher. Older clients are throttled the same way but won’t see\nthe warning.`}),`\n`,_jsx(Heading,{level:`2`,id:`public-relays`,children:`Public relays`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.a,{href:`/iroh-services/relays/public`,children:`public relays`}),` n0.computer runs are free,\nopen to every iroh endpoint, and rate-limited to prevent abuse of shared\ninfrastructure.`]}),`\n`,_jsx(_components.p,{children:`The exact rate limits aren’t published today, as they get tuned as needed. However, the\nmechanism is applied per connection. If you are using the N0 preset, you’re\nsharing the relay’s total capacity with every other tenant, so heavy traffic\nfrom other users can affect your experience.`}),`\n`,_jsx(_components.p,{children:`This means that public infrastructure is meant for development and hobby use. Do not rely on it for production workloads, especially if your application is sensitive to rate limiting, uptime, or relay software version.`}),`\n`,_jsx(Heading,{level:`2`,id:`shared-and-managed-relays`,children:`Shared and managed relays`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.a,{href:`/iroh-services/relays/shared`,children:`Shared relays`}),` run on separate infrastructure\nfrom the public relays, with far fewer tenants per machine and higher\nper-connection limits.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.a,{href:`/iroh-services/relays/managed`,children:`Dedicated relays`}),` provisioned through Iroh\nServices are dedicated to your project. These have no other tenants, no rate limits at\nall.`]}),`\n`,_jsx(Heading,{level:`2`,id:`how-it-works`,children:`How it works`}),`\n`,_jsxs(_components.p,{children:[`Rate limiting is a property of a single relay `,_jsx(_components.em,{children:`connection`}),`, not a global switch.`]}),`\n`,_jsxs(_components.p,{children:[`Each client connection gets its own token-bucket limiter on the side of the\nrelay that reads data sent by that client (`,_jsx(_components.code,{children:`rx`}),`, for “receive”):`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`bytes_per_second`})}),` — the steady-state rate the relay will keep reading from that connection.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`max_burst_bytes`})}),` — how far a client can exceed that rate momentarily before the bucket runs dry.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`When a client’s bucket empties, the relay stops reading from that connection’s\nsocket until it refills. Data isn’t dropped. The client just experiences\nbackpressure. Writes to the relay stall until the bucket has room again. This is\nwhat triggers the one-time `,_jsx(_components.code,{children:`RateLimited`}),` status notice.`]}),`\n`,_jsx(_components.p,{children:`Because the limiter is per-connection, one client hitting its limit doesn’t affect other clients on the same relay.`}),`\n`,_jsx(Heading,{level:`2`,id:`self-hosted-relays`,children:`Self-hosted relays`}),`\n`,_jsxs(_components.p,{children:[`If you run the `,_jsx(_components.code,{children:`iroh-relay`}),` binary (or embed the `,_jsx(_components.a,{href:`https://crates.io/crates/iroh-relay`,children:_jsx(_components.code,{children:`iroh-relay`})}),` server crate)\nyourself, rate limiting is `,_jsx(_components.strong,{children:`off by default`}),`. This means connections can send\nunlimited data.`]}),`\n`,_jsxs(_components.p,{children:[`With the `,_jsx(_components.code,{children:`iroh-relay`}),` binary, configure it in your TOML config file:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`toml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`toml`,children:_jsxs(_components.code,{language:`toml`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`limits`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`rx`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bytes_per_second`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1_000_000`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`max_burst_bytes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2_000_000`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`bytes_per_second`}),` is required to enable the limiter; `,_jsx(_components.code,{children:`max_burst_bytes`}),` is\noptional and defaults to no burst allowance above the steady rate if omitted.`]}),`\n`,_jsxs(_components.p,{children:[`See the `,_jsx(_components.a,{href:`https://docs.rs/iroh-relay/latest/iroh_relay/server/`,children:`relay server API reference`}),`\nfor the configuration types used when embedding the server.`]}),`\n`,_jsxs(_components.p,{children:[`If you’re embedding the relay server as a library, the equivalent is\n`,_jsx(_components.code,{children:`iroh_relay::server::Limits::client_rx`}),`. This is the field the client-facing\nwarning message refers to when it says “raise `,_jsx(_components.code,{children:`Limits::client_rx`}),`”.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`Limits`}),` also has `,_jsx(_components.code,{children:`accept_conn_limit`}),` / `,_jsx(_components.code,{children:`accept_conn_burst`}),` fields for rate-limiting new incoming connections. As of this writing they’re reserved but not yet enforced — setting them has no effect.`]})}),`\n`,_jsx(_components.p,{children:`Consider a per-connection limit even on a single-tenant dedicated relay: it protects your egress bandwidth and CPU from a single misbehaving client or a bug in your own application, not just from other tenants.`}),`\n`,_jsx(Heading,{level:`2`,id:`see-also`,children:`See also`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/iroh-services/relays/public`,children:`Public Relays`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/iroh-services/relays/shared`,children:`Shared Relays`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/iroh-services/relays/managed`,children:`Managed Relays`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/deployment/dedicated-infrastructure`,children:`Dedicated Infrastructure`})}),`\n`,_jsx(_components.li,{children:_jsxs(_components.a,{href:`https://github.com/n0-computer/iroh/tree/main/iroh-relay`,children:[`Relay source (`,_jsx(_components.code,{children:`iroh-relay`}),`)`]})}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Rate Limiting","description":"How relays throttle traffic per connection, and how to configure limits on a self-hosted relay","href":"/relays/rate-limiting"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Why you’re here","slug":"why-you’re-here","depth":2,"children":[]},{"title":"Public relays","slug":"public-relays","depth":2,"children":[]},{"title":"Shared and managed relays","slug":"shared-and-managed-relays","depth":2,"children":[]},{"title":"How it works","slug":"how-it-works","depth":2,"children":[]},{"title":"Self-hosted relays","slug":"self-hosted-relays","depth":2,"children":[]},{"title":"See also","slug":"see-also","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"number0","siteName":"iroh","title":"Rate Limiting - iroh","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-23T19:11:18.088Z","originalFileLocation":"relays/rate-limiting.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"How relays throttle traffic per connection, and how to configure limits on a self-hosted relay\">\u003cmeta data-mint-head name=\"application-name\" content=\"iroh\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/number0/fJyttL6sVwOc7nEM/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/number0/fJyttL6sVwOc7nEM/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/number0/fJyttL6sVwOc7nEM/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/number0/fJyttL6sVwOc7nEM/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/number0/fJyttL6sVwOc7nEM/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/number0/fJyttL6sVwOc7nEM/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/number0/fJyttL6sVwOc7nEM/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/number0/fJyttL6sVwOc7nEM/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/number0/fJyttL6sVwOc7nEM/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Rate Limiting - iroh\">\u003cmeta data-mint-head property=\"og:description\" content=\"How relays throttle traffic per connection, and how to configure limits on a self-hosted relay\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"iroh\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.iroh.computer/relays/rate-limiting\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://number0.mintlify.site/_mintlify/api/og/v2?division=Relays\u0026amp;title=Rate+Limiting\u0026amp;description=How+relays+throttle+traffic+per+connection%2C+and+how+to+configure+limits+on+a+self-hosted+relay\u0026amp;theme=74c6e919f89ca262c908ce9e\u0026amp;signature=f4ae784828862e092b67a5b06bef6a141853682ce2923b95db76efe0e93494b1\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Rate Limiting - iroh\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"How relays throttle traffic per connection, and how to configure limits on a self-hosted relay\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://number0.mintlify.site/_mintlify/api/og/v2?division=Relays\u0026amp;title=Rate+Limiting\u0026amp;description=How+relays+throttle+traffic+per+connection%2C+and+how+to+configure+limits+on+a+self-hosted+relay\u0026amp;theme=74c6e919f89ca262c908ce9e\u0026amp;signature=f4ae784828862e092b67a5b06bef6a141853682ce2923b95db76efe0e93494b1\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/number0/fJyttL6sVwOc7nEM/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"iroh\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#8790ff\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.iroh.computer/relays/rate-limiting\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/relays/rate-limiting.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.iroh.computer/#organization\",\"name\":\"iroh\",\"url\":\"https://docs.iroh.computer\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/number0/1epvC3-oXGhuzYfu/logo/iroh-wordmark-purple.svg?fit=max\u0026auto=format\u0026n=1epvC3-oXGhuzYfu\u0026q=85\u0026s=f38ef57cfd1329c2a7cfcf2305784f9e\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.iroh.computer#website\",\"name\":\"iroh\",\"url\":\"https://docs.iroh.computer\",\"publisher\":{\"@id\":\"https://docs.iroh.computer/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.iroh.computer/relays/rate-limiting#webpage\",\"url\":\"https://docs.iroh.computer/relays/rate-limiting\",\"name\":\"Rate Limiting\",\"description\":\"How relays throttle traffic per connection, and how to configure limits on a self-hosted relay\",\"dateModified\":\"2026-11-23T19:11:18.088Z\",\"isPartOf\":{\"@id\":\"https://docs.iroh.computer#website\"},\"breadcrumb\":{\"@id\":\"https://docs.iroh.computer/relays/rate-limiting#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.iroh.computer/relays/rate-limiting#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\" \",\"item\":\"https://docs.iroh.computer/what-is-iroh\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Relays\",\"item\":\"https://docs.iroh.computer/deployment/dedicated-infrastructure\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Rate Limiting\",\"item\":\"https://docs.iroh.computer/relays/rate-limiting\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.iroh.computer/relays/rate-limiting#article\",\"headline\":\"Rate Limiting\",\"name\":\"Rate Limiting\",\"description\":\"How relays throttle traffic per connection, and how to configure limits on a self-hosted relay\",\"url\":\"https://docs.iroh.computer/relays/rate-limiting\",\"mainEntityOfPage\":{\"@id\":\"https://docs.iroh.computer/relays/rate-limiting#webpage\"},\"dateModified\":\"2026-11-23T19:11:18.088Z\",\"publisher\":{\"@id\":\"https://docs.iroh.computer/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.iroh.computer#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"iroh\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"iroh\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/relays/rate-limiting.md","siteName":"iroh","nav":{"global":null,"groups":[{"group":" ","pages":[{"title":"What is iroh?","href":"/what-is-iroh"},{"title":"Quickstart","href":"/quickstart"},{"title":"Compatibility","href":"/compatibility"},{"group":"Languages","expanded":false,"pages":[{"title":"Overview","href":"/languages/index"},{"title":"Rust","href":"/languages/rust"},{"title":"Python","href":"/languages/python"},{"title":"Swift","href":"/languages/swift"},{"title":"Kotlin","href":"/languages/kotlin"},{"title":"JavaScript","href":"/languages/javascript"},{"title":"C","href":"/languages/c"},{"title":"Go","href":"/languages/go"},{"title":"WebAssembly and Browsers","href":"/languages/wasm-browser"}]},{"group":"Tutorials","expanded":true,"pages":[{"title":"Connect two endpoints","href":"/connect-two-endpoints"},{"title":"See your direct data rate","href":"/iroh-services/quickstart"},{"title":"Organize endpoints with groups and attributes","href":"/iroh-services/endpoint-metadata"},{"title":"Set the metrics reporting interval","href":"/iroh-services/metrics/reporting-interval"},{"title":"Diagnose a connectivity issue","href":"/iroh-services/net-diagnostics/quickstart"},{"title":"Using QUIC","href":"/protocols/using-quic"},{"title":"Build a chat app","href":"/examples/chat"},{"title":"Add a relay","href":"/add-a-relay"},{"title":"Deploying to enterprise networks","href":"/configuring-networks"}]},{"group":"How it works","expanded":false,"pages":[{"title":"Endpoints","href":"/concepts/endpoints"},{"title":"Tickets","href":"/concepts/tickets"},{"title":"Address Lookup","href":"/concepts/address-lookup"},{"title":"Relays","href":"/concepts/relays"},{"title":"NAT Traversal","href":"/concepts/nat-traversal"},{"title":"Protocols","href":"/concepts/protocols"},{"title":"Security \u0026 Privacy","href":"/concepts/security-privacy"}]},{"group":"Creating Connections","expanded":false,"pages":[{"title":"Creating an Endpoint","href":"/connecting/creating-endpoint"},{"title":"DNS","href":"/connecting/dns-address-lookup"},{"title":"DHT","href":"/connecting/dht-address-lookup"},{"title":"mDNS","href":"/connecting/local-address-lookup"},{"title":"Gossip Broadcast","href":"/connecting/gossip"},{"title":"Observing \u0026 Rejecting Connections","href":"/connecting/endpoint-hooks"}]},{"group":"Sending Data","expanded":false,"pages":[{"title":"Blobs","href":"/protocols/blobs"},{"title":"RPC","href":"/protocols/rpc"},{"title":"Automerge","href":"/protocols/automerge"},{"title":"Streaming","href":"/protocols/streaming"},{"title":"Documents","href":"/protocols/documents"},{"title":"Write your own Protocol","href":"/protocols/writing-a-protocol"}]},{"group":"Transports","expanded":false,"pages":[{"title":"Tor","href":"/transports/tor"},{"title":"Nym","href":"/transports/nym"},{"title":"Bluetooth (BLE)","href":"/transports/bluetooth"}]},{"group":"Relays","expanded":false,"pages":[{"title":"Overview","href":"/deployment/dedicated-infrastructure"},{"title":"Public Relays","href":"/iroh-services/relays/public"},{"title":"Shared Relays","href":"/iroh-services/relays/shared"},{"title":"Dedicated Hosting","href":"/iroh-services/relays/managed"},{"title":"Self-hosted","description":"Run your own relay","href":"/iroh-services/relays/self-hosted"},{"title":"Rate Limiting","href":"/relays/rate-limiting"}]},{"group":"Observability","expanded":false,"pages":[{"title":"Overview","description":"Monitor your network with comprehensive metrics collection","href":"/iroh-services/metrics/index"},{"title":"API Keys","href":"/iroh-services/access"},{"title":"Network Diagnostics","href":"/iroh-services/net-diagnostics/usage"},{"title":"How Metrics Work","href":"/iroh-services/metrics/how-it-works"},{"title":"Endpoint Metrics","href":"/iroh-services/metrics/endpoint"},{"title":"Metrics Glossary","href":"/iroh-services/metrics/glossary"},{"title":"Custom Metrics","href":"/deployment/metrics"}]},{"group":"About","expanded":false,"pages":[{"title":"Changelog","url":"https://iroh.computer/changelog","href":"/about/changelog"},{"title":"Roadmap","url":"https://iroh.computer/roadmap","href":"/about/roadmap"},{"title":"Release \u0026 Support Policies","href":"/about/release-policy"},{"group":"Services Billing","expanded":false,"pages":[{"title":"Overview","href":"/iroh-services/billing/index"},{"title":"Manage Your Subscription","href":"/iroh-services/billing/manage-subscription"},{"title":"Control Your Costs","href":"/iroh-services/billing/control-costs"},{"title":"Billing FAQ","href":"/iroh-services/billing/faq"}]}]},{"group":"API References","expanded":false,"pages":[{"title":"Rust API docs","url":"https://docs.rs/iroh","href":"/rust-api"},{"title":"Python API docs","url":"https://n0-computer.github.io/iroh-ffi/python/","href":"/python-api"},{"title":"Swift API docs","url":"https://n0-computer.github.io/iroh-ffi/swift/documentation/irohlib/","href":"/swift-api"},{"title":"Kotlin API docs","url":"https://n0-computer.github.io/iroh-ffi/kotlin/","href":"/kotlin-api"},{"title":"JavaScript API docs","url":"https://n0-computer.github.io/iroh-ffi/js/","href":"/js-api"}]},{"title":"Examples","href":"/examples"},{"title":"Troubleshooting","href":"/troubleshooting"},{"title":"Support","href":"/iroh-services/support"},{"title":"FAQ","href":"/about/faq"}]}]},"basePath":"","title":"Rate Limiting - iroh","deploymentId":"dpl_4dgnk6TA5fUgboKHTvWWyeqm3idh","buildId":"dpl_4dgnk6TA5fUgboKHTvWWyeqm3idh","dynamics":[],"chunks":[]}