How Brimble handles public HTTP traffic, upgraded connections, and HTTP/2 services.
Brimble exposes web services over HTTPS and forwards requests to the port your service listens on. Your service does not manage public certificates. It reads PORT, listens for HTTP traffic, and Brimble handles the public edge.
Public HTTPS
Every public Brimble URL serves over HTTPS:
Default project URLs, such as <project>.brimble.app.
Preview URLs.
Custom domains after DNS and certificate provisioning finish.
TLS terminates before the request reaches your container. Inside Brimble, your service receives plain HTTP on its assigned port. Use X-Forwarded-Proto if your framework needs to know the original request was HTTPS.
What your service should listen on
Your web service must listen on the port in the PORT environment variable:
const port = Number(process.env.PORT);app.listen(port, "0.0.0.0", () => { console.log(`listening on ${port}`);});
Do not hardcode a port. Brimble assigns one at runtime, and the gateway routes traffic to that port.Bind to 0.0.0.0, not localhost, so the gateway can reach your process from outside the container.
Supported public protocols
Protocol
Support
Notes
HTTP/1.1
Supported by default
Use this for normal websites, APIs, and webhooks.
HTTPS
Supported at the public edge
Your container still listens with plain HTTP.
WebSockets
Supported by default
Any request with a valid Upgrade: websocket header is proxied bidirectionally.
Server-Sent Events
Supported
Keep the response open and flush events from your framework.
HTTP/2 and gRPC
Available for HTTP/2-enabled projects
Your service must serve HTTP and gRPC on the same PORT.
HTTP/2 and gRPC services
Most projects should keep the default HTTP/1.1 behavior. Enable HTTP/2 only when your service needs gRPC or another HTTP/2-only protocol.For HTTP/2-enabled projects, Brimble expects your service to:
Listen on the same PORT as the rest of your web traffic.
Serve normal HTTP routes and gRPC routes from the same process.
Accept cleartext HTTP/2, also called h2c, behind the Brimble gateway.
Keep a lightweight HTTP health check route available, such as GET /healthz.
This single-port model lets one project handle both browser traffic and gRPC clients without exposing a second public port.
Do not configure your container to terminate public TLS for Brimble traffic. Brimble terminates public TLS at the edge. Your service should listen for HTTP on PORT, including h2c when HTTP/2 is enabled.
gRPC client behavior
External gRPC clients connect to your public Brimble hostname over TLS. Include :443 in the address:
Use the hostname and port as the dial target, not a path. The client should use normal gRPC over TLS. Inside Brimble, the gateway forwards the request to your service over the project transport selected for that deployment.If you test from inside the same Brimble workspace, use the internal service hostname and the protocol your service exposes internally. Internal hostnames are not public and do not use public TLS. See Internal networking.
Health checks
Brimble health checks for web services are HTTP GET requests. Even if your main API is gRPC, expose a simple HTTP endpoint for liveness:
GET /healthz HTTP/1.1
Return any 2xx or 3xx status when the service is ready to receive traffic. Keep this endpoint fast and independent of slow downstream services.
Common issues
The service works locally but returns 502 on Brimble.Check that it listens on process.env.PORT and binds to 0.0.0.0.The app redirects to http:// URLs.Your framework may not trust proxy headers. Configure it to respect X-Forwarded-Proto: https.gRPC requests fail but normal HTTP works.Confirm the project has HTTP/2 enabled, the client is dialing your-domain.com:443 over TLS, and the service accepts h2c on the same port as the HTTP server. A separate gRPC-only port is not exposed publicly.
Next steps
Request lifecycle, what happens before a request reaches your service.
502 errors, what to check when the gateway cannot reach your service.
Last modified on October 31, 2026
Was this page helpful?
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Brimble","description":"Brimble documentation. Deploy applications, manage domains, scale services, and ship without operating infrastructure.","colors":{"primary":"#006fff","light":"#006fff","dark":"#006fff"},"logo":{"light":"https://mintcdn.com/brimble-86/SR8fPQyZ_KbNTiea/logo/icon.png?fit=max\u0026auto=format\u0026n=SR8fPQyZ_KbNTiea\u0026q=85\u0026s=f4a01ce77637fe22d051f2c4fdb128e8","dark":"https://mintcdn.com/brimble-86/SR8fPQyZ_KbNTiea/logo/icon.png?fit=max\u0026auto=format\u0026n=SR8fPQyZ_KbNTiea\u0026q=85\u0026s=f4a01ce77637fe22d051f2c4fdb128e8"},"favicon":"https://mintcdn.com/brimble-86/SR8fPQyZ_KbNTiea/logo/icon.png?fit=max\u0026auto=format\u0026n=SR8fPQyZ_KbNTiea\u0026q=85\u0026s=f4a01ce77637fe22d051f2c4fdb128e8","background":{"color":{"light":"#ffffff","dark":"#1a1c1e"}},"navbar":{"links":[{"href":"https://app.brimble.io","label":"Dashboard"},{"href":"https://brimble.io/changelog","label":"Changelog"},{"href":"https://status.brimble.io","label":"Status"}],"primary":{"type":"button","label":"Sign up","href":"https://app.brimble.io/signup"}},"footer":{"socials":{"x":"https://x.com/brimblehq","github":"https://github.com/brimblehq"}},"seo":{"metatags":{"og:type":"website","og:site_name":"Brimble Docs","og:image":"https://brimble.io/og-image.png","twitter:card":"summary_large_image","twitter:site":"@brimblehq","twitter:creator":"@brimblehq","robots":"index, follow"},"indexing":"all"},"fonts":{"heading":{"family":"ABC Marfa","weight":700,"source":"fonts/ABCMarfaVariableVF-Trial.woff2","format":"woff2"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity"],"display":"header"},"metadata":{"timestamp":true},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"brimble-86","hasAudioNarration":false,"actualSubdomain":"brimble-86","customDomains":["paper.brimble.io"],"gitSource":{"type":"github","owner":"brimblehq","repo":"paper","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"issues":false,"agentFeedback":true,"edits":false},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6af8a91e5a8e334304f78c70","clientVersion":"0.0.4143","searchFilterCounts":[{"language":"default","tag":"Core API","count":129},{"language":"default","tag":"Documentation","count":107},{"language":"default","tag":"Projects","count":36},{"language":"default","tag":"Sandboxes","count":32},{"language":"default","tag":"Sandbox API","count":23},{"language":"default","tag":"Domains","count":22},{"language":"default","tag":"Environments","count":14},{"language":"default","tag":"Databases","count":12},{"language":"default","tag":"CLI","count":12},{"language":"default","tag":"CI Runners","count":10}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":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":"custom-rbac-roles","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":"workos-onboarding","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":"assistant-v5","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":"workos-sso-scim","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":"workos-signup","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":"workos-enabled","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":"sso-setup-deadline-banner","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":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"strong,b,em strong,strong em{font-family:\"ABC Marfa\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif;font-weight:700}:root.dark,html.dark,[data-theme=\"dark\"]{--bg-page-dark: #1a1c1e;--bg-elevated-dark: #202022;--bg-elevated-2-dark: #29292a;--bg-surface-dark: #222528;--text-strong-dark: #ffffff;--text-body-dark: #bdbcbc;--text-faded-dark: #9a9d9c;--text-extra-faded-dark: #8e9195;--border-dark: #454545}.dark body,[data-theme=\"dark\"] body{background-color:#1a1c1e;color:#bdbcbc}.dark h1,.dark h2,.dark h3,.dark h4,[data-theme=\"dark\"] h1,[data-theme=\"dark\"] h2,[data-theme=\"dark\"] h3,[data-theme=\"dark\"] h4{color:#ffffff}.dark .card,.dark [class*=\"callout\"],.dark [class*=\"Frame\"],.dark [class*=\"Note\"],.dark [class*=\"Info\"],.dark [class*=\"Tip\"],.dark [class*=\"Check\"],.dark [class*=\"Warning\"],.dark blockquote,[data-theme=\"dark\"] .card,[data-theme=\"dark\"] [class*=\"callout\"],[data-theme=\"dark\"] [class*=\"Frame\"],[data-theme=\"dark\"] blockquote{background-color:#202022;border-color:#454545}.dark code:not(pre code),[data-theme=\"dark\"] code:not(pre code){background-color:#29292a;color:#ffffff;border:0.5px solid #454545}.dark .code-block,[data-theme=\"dark\"] .code-block{border-color:#454545}html.dark .code-block [data-component-part=\"code-block-root\"],html.dark .code-block pre.shiki,html.dark .code-block pre code,.dark pre,.dark pre code,[data-theme=\"dark\"] .code-block [data-component-part=\"code-block-root\"],[data-theme=\"dark\"] pre,[data-theme=\"dark\"] pre code{background-color:#202022!important;border:0;box-shadow:none}.dark .code-block-fade-overlay,[data-theme=\"dark\"] .code-block-fade-overlay{--fade-color-dark: #202022 !important}.dark table,[data-theme=\"dark\"] table{border-collapse:separate;border-spacing:0;background-color:#202022;border:1px solid rgba(255, 255, 255, 0.08);border-radius:10px;overflow:hidden}.dark thead,[data-theme=\"dark\"] thead{background-color:#29292a}.dark th,[data-theme=\"dark\"] th{padding:10px 16px;color:#ffffff;font-size:0.8125rem;font-weight:600;border:0;border-bottom:1px solid rgba(255, 255, 255, 0.08)}.dark td,[data-theme=\"dark\"] td{padding:12px 16px;color:#bdbcbc;vertical-align:top;border:0;border-top:1px solid rgba(255, 255, 255, 0.06)}.dark tbody tr:first-child td,[data-theme=\"dark\"] tbody tr:first-child td{border-top:0}.dark tbody tr,[data-theme=\"dark\"] tbody tr{background-color:transparent;transition:background-color 120ms ease}.dark tbody tr:hover,[data-theme=\"dark\"] tbody tr:hover{background-color:rgba(255, 255, 255, 0.025)}.dark td strong,[data-theme=\"dark\"] td strong{color:#ffffff}.dark table:not(:has(th:not(:empty))) thead,[data-theme=\"dark\"] table:not(:has(th:not(:empty))) thead{display:none}.dark table:not(:has(th:not(:empty))) td:first-child,[data-theme=\"dark\"] table:not(:has(th:not(:empty))) td:first-child{width:30%;color:#ffffff}.dark aside,.dark nav,[data-theme=\"dark\"] aside,[data-theme=\"dark\"] nav{background-color:#1a1c1e;border-color:#454545}.dark aside a[aria-current=\"page\"],.dark aside a.active,[data-theme=\"dark\"] aside a[aria-current=\"page\"],[data-theme=\"dark\"] aside a.active{background-color:#29292a;color:#ffffff}.dark hr,[data-theme=\"dark\"] hr{border-color:#454545}.dark ::selection,[data-theme=\"dark\"] ::selection{background:rgba(255, 155, 0, 0.45);color:#fff6e8}*{scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0.18) transparent}.dark *,[data-theme=\"dark\"] *{scrollbar-color:rgba(255, 255, 255, 0.14) transparent}*::-webkit-scrollbar{width:8px;height:8px}*::-webkit-scrollbar-track{background:transparent}*::-webkit-scrollbar-thumb{background-color:rgba(0, 0, 0, 0.18);border-radius:999px;border:2px solid transparent;background-clip:padding-box}*::-webkit-scrollbar-thumb:hover{background-color:rgba(0, 0, 0, 0.28)}.dark *::-webkit-scrollbar-thumb,[data-theme=\"dark\"] *::-webkit-scrollbar-thumb{background-color:rgba(255, 255, 255, 0.14)}.dark *::-webkit-scrollbar-thumb:hover,[data-theme=\"dark\"] *::-webkit-scrollbar-thumb:hover{background-color:rgba(255, 255, 255, 0.22)}nav[aria-labelledby*=\"on-this-page\"i] ol,nav[aria-labelledby*=\"on-this-page\"i] ul,aside[aria-label*=\"on this page\"i] ol,aside[aria-label*=\"on this page\"i] ul,[id*=\"toc\"i] ol,[id*=\"toc\"i] ul{position:relative;padding-left:16px;margin-left:0;list-style:none}nav[aria-labelledby*=\"on-this-page\"i]>ol::before,nav[aria-labelledby*=\"on-this-page\"i]>ul::before,aside[aria-label*=\"on this page\"i]>ol::before,aside[aria-label*=\"on this page\"i]>ul::before,[id*=\"toc\"i]>ol::before,[id*=\"toc\"i]>ul::before{content:\"\";position:absolute;left:5px;top:0;bottom:0;width:1.5px;background-color:rgba(0, 0, 0, 0.10);border-radius:999px}.dark nav[aria-labelledby*=\"on-this-page\"i]>ol::before,.dark nav[aria-labelledby*=\"on-this-page\"i]>ul::before,.dark aside[aria-label*=\"on this page\"i]>ol::before,.dark aside[aria-label*=\"on this page\"i]>ul::before,.dark [id*=\"toc\"i]>ol::before,.dark [id*=\"toc\"i]>ul::before,[data-theme=\"dark\"] nav[aria-labelledby*=\"on-this-page\"i]>ol::before,[data-theme=\"dark\"] [id*=\"toc\"i]>ul::before{background-color:rgba(255, 255, 255, 0.10)}nav[aria-labelledby*=\"on-this-page\"i] li,aside[aria-label*=\"on this page\"i] li,[id*=\"toc\"i] li{position:relative}nav[aria-labelledby*=\"on-this-page\"i] li:has(>a[aria-current=\"true\"])::before,nav[aria-labelledby*=\"on-this-page\"i] li:has(>a[aria-current=\"page\"])::before,nav[aria-labelledby*=\"on-this-page\"i] li:has(>a[data-active=\"true\"])::before,nav[aria-labelledby*=\"on-this-page\"i] li:has(>a.active)::before,aside[aria-label*=\"on this page\"i] li:has(>a[aria-current=\"true\"])::before,aside[aria-label*=\"on this page\"i] li:has(>a[aria-current=\"page\"])::before,aside[aria-label*=\"on this page\"i] li:has(>a.active)::before,[id*=\"toc\"i] li:has(>a[aria-current=\"true\"])::before,[id*=\"toc\"i] li:has(>a[aria-current=\"page\"])::before,[id*=\"toc\"i] li:has(>a.active)::before{content:\"\";position:absolute;left:1px;top:50%;width:9px;height:9px;border-radius:999px;background-color:#006fff;box-shadow:0 0 0 3px rgba(0, 111, 255, 0.18);transform:translateY(-50%);z-index:1}"}],"page":{"pagePath":"networking/http","slug":"/networking/http","pageMetadata":{"title":"HTTP, WebSockets, and gRPC","description":"How Brimble handles public HTTP traffic, upgraded connections, and HTTP/2 services.","og:image":"https://paper.brimble.io/og/networking/http.png ","twitter:image":"https://paper.brimble.io/og/networking/http.png ","href":"/networking/http"},"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 Brimble handles public HTTP traffic, upgraded connections, and HTTP/2 services.\"\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`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Brimble exposes web services over HTTPS and forwards requests to the port your service listens on. Your service does not manage public certificates. It reads `,_jsx(_components.code,{children:`PORT`}),`, listens for HTTP traffic, and Brimble handles the public edge.`]}),`\n`,_jsx(Heading,{level:`2`,id:`public-https`,children:`Public HTTPS`}),`\n`,_jsx(_components.p,{children:`Every public Brimble URL serves over HTTPS:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Default project URLs, such as `,_jsx(_components.code,{children:`\u003cproject>.brimble.app`}),`.`]}),`\n`,_jsx(_components.li,{children:`Preview URLs.`}),`\n`,_jsx(_components.li,{children:`Custom domains after DNS and certificate provisioning finish.`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`TLS terminates before the request reaches your container. Inside Brimble, your service receives plain HTTP on its assigned port. Use `,_jsx(_components.code,{children:`X-Forwarded-Proto`}),` if your framework needs to know the original request was HTTPS.`]}),`\n`,_jsx(Heading,{level:`2`,id:`what-your-service-should-listen-on`,children:`What your service should listen on`}),`\n`,_jsxs(_components.p,{children:[`Your web service must listen on the port in the `,_jsx(_components.code,{children:`PORT`}),` environment variable:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`javascript`,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:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` port`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Number`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`PORT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`app`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`listen`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`port`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0.0.0.0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_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:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`listening on \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`port`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Do not hardcode a port. Brimble assigns one at runtime, and the gateway routes traffic to that port.`}),`\n`,_jsxs(_components.p,{children:[`Bind to `,_jsx(_components.code,{children:`0.0.0.0`}),`, not `,_jsx(_components.code,{children:`localhost`}),`, so the gateway can reach your process from outside the container.`]}),`\n`,_jsx(Heading,{level:`2`,id:`supported-public-protocols`,children:`Supported public protocols`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Protocol`}),_jsx(_components.th,{children:`Support`}),_jsx(_components.th,{children:`Notes`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`HTTP/1.1`}),_jsx(_components.td,{children:`Supported by default`}),_jsx(_components.td,{children:`Use this for normal websites, APIs, and webhooks.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`HTTPS`}),_jsx(_components.td,{children:`Supported at the public edge`}),_jsx(_components.td,{children:`Your container still listens with plain HTTP.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`WebSockets`}),_jsx(_components.td,{children:`Supported by default`}),_jsxs(_components.td,{children:[`Any request with a valid `,_jsx(_components.code,{children:`Upgrade: websocket`}),` header is proxied bidirectionally.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Server-Sent Events`}),_jsx(_components.td,{children:`Supported`}),_jsx(_components.td,{children:`Keep the response open and flush events from your framework.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`HTTP/2 and gRPC`}),_jsx(_components.td,{children:`Available for HTTP/2-enabled projects`}),_jsxs(_components.td,{children:[`Your service must serve HTTP and gRPC on the same `,_jsx(_components.code,{children:`PORT`}),`.`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`http/2-and-grpc-services`,children:`HTTP/2 and gRPC services`}),`\n`,_jsx(_components.p,{children:`Most projects should keep the default HTTP/1.1 behavior. Enable HTTP/2 only when your service needs gRPC or another HTTP/2-only protocol.`}),`\n`,_jsx(_components.p,{children:`For HTTP/2-enabled projects, Brimble expects your service to:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Listen on the same `,_jsx(_components.code,{children:`PORT`}),` as the rest of your web traffic.`]}),`\n`,_jsx(_components.li,{children:`Serve normal HTTP routes and gRPC routes from the same process.`}),`\n`,_jsx(_components.li,{children:`Accept cleartext HTTP/2, also called h2c, behind the Brimble gateway.`}),`\n`,_jsxs(_components.li,{children:[`Keep a lightweight HTTP health check route available, such as `,_jsx(_components.code,{children:`GET /healthz`}),`.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`This single-port model lets one project handle both browser traffic and gRPC clients without exposing a second public port.`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Do not configure your container to terminate public TLS for Brimble traffic. Brimble terminates public TLS at the edge. Your service should listen for HTTP on `,_jsx(_components.code,{children:`PORT`}),`, including h2c when HTTP/2 is enabled.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`grpc-client-behavior`,children:`gRPC client behavior`}),`\n`,_jsxs(_components.p,{children:[`External gRPC clients connect to your public Brimble hostname over TLS. Include `,_jsx(_components.code,{children:`:443`}),` in the address:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,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:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`api.example.com:443`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`For example, in Go:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`go`,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:`go`,children:_jsxs(_components.code,{language:`go`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`conn`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`err`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` grpc`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Dial`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"api.example.com:443\"`}),_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:` grpc`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`WithTransportCredentials`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`credentials`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`NewTLS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`nil`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Use the hostname and port as the dial target, not a path. The client should use normal gRPC over TLS. Inside Brimble, the gateway forwards the request to your service over the project transport selected for that deployment.`}),`\n`,_jsxs(_components.p,{children:[`If you test from inside the same Brimble workspace, use the internal service hostname and the protocol your service exposes internally. Internal hostnames are not public and do not use public TLS. See `,_jsx(_components.a,{href:`/networking/internal-services`,children:`Internal networking`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`health-checks`,children:`Health checks`}),`\n`,_jsx(_components.p,{children:`Brimble health checks for web services are HTTP GET requests. Even if your main API is gRPC, expose a simple HTTP endpoint for liveness:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`http`,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:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`GET`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /healthz `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`HTTP`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`/`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1.1`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Return any 2xx or 3xx status when the service is ready to receive traffic. Keep this endpoint fast and independent of slow downstream services.`}),`\n`,_jsx(Heading,{level:`2`,id:`common-issues`,children:`Common issues`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`The service works locally but returns 502 on Brimble.`})}),`\n`,_jsxs(_components.p,{children:[`Check that it listens on `,_jsx(_components.code,{children:`process.env.PORT`}),` and binds to `,_jsx(_components.code,{children:`0.0.0.0`}),`.`]}),`\n`,_jsx(_components.p,{children:_jsxs(_components.strong,{children:[`The app redirects to `,_jsx(_components.code,{children:`http://`}),` URLs.`]})}),`\n`,_jsxs(_components.p,{children:[`Your framework may not trust proxy headers. Configure it to respect `,_jsx(_components.code,{children:`X-Forwarded-Proto: https`}),`.`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`gRPC requests fail but normal HTTP works.`})}),`\n`,_jsxs(_components.p,{children:[`Confirm the project has HTTP/2 enabled, the client is dialing `,_jsx(_components.code,{children:`your-domain.com:443`}),` over TLS, and the service accepts h2c on the same port as the HTTP server. A separate gRPC-only port is not exposed publicly.`]}),`\n`,_jsx(Heading,{level:`2`,id:`next-steps`,children:`Next steps`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/networking/request-lifecycle`,children:`Request lifecycle`}),`, what happens before a request reaches your service.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/networking/internal-services`,children:`Internal networking`}),`, private service-to-service calls.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/troubleshooting/502-errors`,children:`502 errors`}),`, what to check when the gateway cannot reach your service.`]}),`\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":"HTTP, WebSockets, and gRPC","description":"How Brimble handles public HTTP traffic, upgraded connections, and HTTP/2 services.","og:image":"https://paper.brimble.io/og/networking/http.png ","twitter:image":"https://paper.brimble.io/og/networking/http.png ","href":"/networking/http"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Public HTTPS","slug":"public-https","depth":2,"children":[]},{"title":"What your service should listen on","slug":"what-your-service-should-listen-on","depth":2,"children":[]},{"title":"Supported public protocols","slug":"supported-public-protocols","depth":2,"children":[]},{"title":"HTTP/2 and gRPC services","slug":"http/2-and-grpc-services","depth":2,"children":[]},{"title":"gRPC client behavior","slug":"grpc-client-behavior","depth":2,"children":[]},{"title":"Health checks","slug":"health-checks","depth":2,"children":[]},{"title":"Common issues","slug":"common-issues","depth":2,"children":[]},{"title":"Next steps","slug":"next-steps","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"brimble-86","siteName":"Brimble","title":"HTTP, WebSockets, and gRPC - Brimble","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-07-05T12:05:45.816Z","gitLastModified":"2026-10-31T07:52:44.000Z","originalFileLocation":"networking/http.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 Brimble handles public HTTP traffic, upgraded connections, and HTTP/2 services.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Brimble\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003cmeta data-mint-head name=\"robots\" content=\"index, follow\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/brimble-86/LFcyxdNu5eilxs2I/_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/brimble-86/LFcyxdNu5eilxs2I/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/brimble-86/LFcyxdNu5eilxs2I/_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/brimble-86/LFcyxdNu5eilxs2I/_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/brimble-86/LFcyxdNu5eilxs2I/_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/brimble-86/LFcyxdNu5eilxs2I/_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/brimble-86/LFcyxdNu5eilxs2I/_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/brimble-86/LFcyxdNu5eilxs2I/_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/brimble-86/LFcyxdNu5eilxs2I/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"HTTP, WebSockets, and gRPC - Brimble\">\u003cmeta data-mint-head property=\"og:description\" content=\"How Brimble handles public HTTP traffic, upgraded connections, and HTTP/2 services.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Brimble Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://paper.brimble.io/networking/http\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://paper.brimble.io/og/networking/http.png \">\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=\"HTTP, WebSockets, and gRPC - Brimble\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"How Brimble handles public HTTP traffic, upgraded connections, and HTTP/2 services.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://paper.brimble.io/og/networking/http.png \">\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/brimble-86/LFcyxdNu5eilxs2I/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Brimble\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#006fff\">\u003cmeta data-mint-head name=\"twitter:creator\" content=\"@brimblehq\">\u003clink data-mint-head rel=\"canonical\" href=\"https://paper.brimble.io/networking/http\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/networking/http.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://paper.brimble.io/#organization\",\"name\":\"Brimble\",\"url\":\"https://paper.brimble.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/brimble-86/SR8fPQyZ_KbNTiea/logo/icon.png?fit=max\u0026auto=format\u0026n=SR8fPQyZ_KbNTiea\u0026q=85\u0026s=f4a01ce77637fe22d051f2c4fdb128e8\"}},{\"@type\":\"WebSite\",\"@id\":\"https://paper.brimble.io#website\",\"name\":\"Brimble\",\"url\":\"https://paper.brimble.io\",\"publisher\":{\"@id\":\"https://paper.brimble.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://paper.brimble.io/networking/http#webpage\",\"url\":\"https://paper.brimble.io/networking/http\",\"name\":\"HTTP, WebSockets, and gRPC\",\"description\":\"How Brimble handles public HTTP traffic, upgraded connections, and HTTP/2 services.\",\"dateModified\":\"2026-10-31T07:52:44.000Z\",\"isPartOf\":{\"@id\":\"https://paper.brimble.io#website\"},\"breadcrumb\":{\"@id\":\"https://paper.brimble.io/networking/http#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://paper.brimble.io/networking/http#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Networking\",\"item\":\"https://paper.brimble.io/networking/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"HTTP, WebSockets, and gRPC\",\"item\":\"https://paper.brimble.io/networking/http\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://paper.brimble.io/networking/http#article\",\"headline\":\"HTTP, WebSockets, and gRPC\",\"name\":\"HTTP, WebSockets, and gRPC\",\"description\":\"How Brimble handles public HTTP traffic, upgraded connections, and HTTP/2 services.\",\"url\":\"https://paper.brimble.io/networking/http\",\"mainEntityOfPage\":{\"@id\":\"https://paper.brimble.io/networking/http#webpage\"},\"image\":\"https://paper.brimble.io/og/networking/http.png\",\"dateModified\":\"2026-10-31T07:52:44.000Z\",\"publisher\":{\"@id\":\"https://paper.brimble.io/#organization\"},\"isPartOf\":{\"@id\":\"https://paper.brimble.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Brimble\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Brimble\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/networking/http.md","siteName":"Brimble","nav":{"global":null,"tabs":[{"tab":"Documentation","groups":[{"group":"Getting started","public":true,"icon":"rocket","pages":[{"title":"Brimble Documentation","href":""},{"title":"What is Brimble? Platform overview","sidebarTitle":"What is Brimble","href":"/getting-started/introduction"},{"title":"Quickstart: deploy your first app","sidebarTitle":"Quickstart","href":"/getting-started/quickstart"}]},{"group":"Brimble Agent","public":true,"icon":"sparkles","pages":[{"title":"Brimble Agent: AI assistant for deployments","sidebarTitle":"Brimble Agent","href":"/agent/overview"},{"title":"Use Brimble Agent in the dashboard","sidebarTitle":"Using the agent","href":"/agent/using-the-agent"},{"title":"What Brimble Agent can do","sidebarTitle":"What it can do","href":"/agent/what-it-can-do"},{"title":"Brimble Agent plans, limits, and API keys","sidebarTitle":"Keys and limits","href":"/agent/keys-and-limits"}]},{"group":"Brimble MCP","public":true,"icon":"robot","pages":[{"title":"Brimble MCP server","sidebarTitle":"Brimble MCP","href":"/mcp/overview"},{"title":"Connect an agent to Brimble MCP","href":"/mcp/connect"}]},{"group":"CLI","public":true,"icon":"terminal","pages":[{"title":"Install and set up the Brimble CLI","sidebarTitle":"Brimble CLI","href":"/cli/overview"},{"title":"Deploy from the CLI","href":"/cli/deploy"},{"title":"Manage projects from the CLI","href":"/cli/projects"},{"title":"Manage brimble.toml from the CLI","sidebarTitle":"Config as code","href":"/cli/config"},{"title":"Logs from the CLI","href":"/cli/logs"},{"title":"Open a terminal from the CLI","href":"/cli/ssh"},{"title":"Environment variables from the CLI","href":"/cli/environment-variables"},{"title":"Manage database backups and point-in-time recovery from the CLI","sidebarTitle":"Databases","href":"/cli/databases"},{"title":"Domains, environments, and teams","href":"/cli/domains-and-teams"},{"title":"Connect coding agents","href":"/cli/agents"},{"title":"Use the CLI in CI","href":"/cli/ci"},{"title":"Manage CI runners from the CLI","href":"/cli/ci-runners"}]},{"group":"Projects","public":true,"icon":"cube","pages":[{"title":"Projects and services","href":"/projects/overview"},{"title":"Service types: web, static, worker, database","sidebarTitle":"Service types","href":"/projects/service-types"},{"title":"Frameworks supported","href":"/projects/frameworks"},{"title":"Regions and datacenter locations","sidebarTitle":"Regions","href":"/projects/regions"},{"title":"How builds work on Brimble","sidebarTitle":"Builds","href":"/projects/builds"},{"title":"Inside the Brimble Builder","href":"/projects/build-system"},{"title":"Deployments and deployment history","sidebarTitle":"Deployments","href":"/projects/deployments"},{"title":"Quick start: configure a project with brimble.toml","sidebarTitle":"Configure projects with brimble.toml","href":"/projects/brimble-toml"},{"title":"Git integrations: GitHub, GitLab, Bitbucket","sidebarTitle":"Git integrations","href":"/projects/git-integrations"},{"title":"Deploy a background worker","sidebarTitle":"Deploy a worker","href":"/projects/deploy-a-worker"},{"title":"Deploy a Rust app on Brimble","sidebarTitle":"Deploy a Rust app","href":"/projects/deploy-rust"},{"title":"Deploy WordPress on Brimble","sidebarTitle":"Deploy WordPress","href":"/projects/deploy-wordpress"},{"title":"Deploy an MCP server","href":"/projects/deploy-an-mcp-server"},{"title":"Deploy from a Docker image","href":"/projects/deploy-from-docker-image"},{"title":"Discover and deploy MCP servers","href":"/projects/discover-mcp-servers"},{"title":"Persistent disk for projects","sidebarTitle":"Persistent disk","href":"/projects/persistent-disk"},{"title":"Mount config and secret files","sidebarTitle":"Files","href":"/projects/files"},{"title":"Roll back a deployment","href":"/projects/rollback-a-deployment"},{"title":"Site password protection","href":"/projects/password-protect"},{"title":"Preview collaboration","href":"/projects/preview-collaboration"}]},{"group":"Databases","public":true,"icon":"database","pages":[{"title":"Deploy a managed database","sidebarTitle":"Deploy a database","href":"/databases/deploy-a-database"},{"title":"High availability databases","href":"/databases/high-availability"},{"title":"Point-in-time recovery for Postgres and MySQL","href":"/databases/point-in-time-recovery"}]},{"group":"Config as code","public":true,"icon":"file-code","pages":[{"title":"Configure projects with brimble.toml","href":"/config-as-code/brimble-toml"},{"title":"brimble.toml reference","href":"/config-as-code/reference"}]},{"group":"Sandboxes","public":true,"icon":"box","pages":[{"title":"Sandboxes: isolated compute on demand","sidebarTitle":"Sandboxes","href":"/sandboxes/overview"},{"title":"Sandbox SDKs for TypeScript, Python, and Go","sidebarTitle":"SDKs","href":"/sandboxes/sdks"},{"title":"Sandbox quickstart with the SDK","sidebarTitle":"Sandbox quickstart","href":"/sandboxes/quickstart"},{"title":"Sandbox snapshots","sidebarTitle":"Snapshots","href":"/sandboxes/snapshots"},{"title":"Sandbox pricing","sidebarTitle":"Pricing","href":"/sandboxes/pricing"},{"title":"CI runners","sidebarTitle":"CI runners","href":"/sandboxes/ci-runners"},{"title":"Inside the Brimble Sandbox runtime","href":"/sandboxes/sandbox-system"},{"group":"Cookbook","public":true,"icon":"utensils","pages":[{"title":"Run untrusted code in a sandbox","sidebarTitle":"Run untrusted code","href":"/sandboxes/cookbook/untrusted-code"},{"title":"Run an AI coding agent","href":"/sandboxes/cookbook/ai-coding-agent"},{"title":"Run Docker inside a sandbox","href":"/sandboxes/cookbook/docker-in-sandbox"},{"title":"A persistent dev environment","href":"/sandboxes/cookbook/persistent-dev-env"}]}]},{"group":"Volumes","public":true,"icon":"hard-drive","pages":[{"title":"Volumes: persistent disks","sidebarTitle":"Volumes","href":"/volumes/overview"}]},{"group":"Object storage","public":true,"icon":"database","pages":[{"title":"S3-compatible object storage","sidebarTitle":"Object storage","href":"/object-storage/overview"},{"title":"Create and manage storage buckets","sidebarTitle":"Buckets","href":"/object-storage/buckets"},{"title":"Working with objects","href":"/object-storage/objects"},{"title":"S3 storage credentials and access keys","sidebarTitle":"Storage credentials","href":"/object-storage/credentials"},{"title":"Migrate from another provider","href":"/object-storage/migrate"}]},{"group":"Domains","public":true,"icon":"globe","pages":[{"title":"Add a custom domain to your project","sidebarTitle":"Add a custom domain","href":"/domains/custom-domains"},{"title":"Buy a domain through Brimble","href":"/domains/buy-a-domain"},{"title":"Transfer a domain to or from Brimble","sidebarTitle":"Transfer a domain","href":"/domains/transfer-a-domain"},{"title":"Manage DNS records","href":"/domains/manage-dns-records"},{"title":"Redirect a domain to another URL","sidebarTitle":"Redirect a domain","href":"/domains/redirect-a-domain"},{"title":"Wildcard domains and subdomains","sidebarTitle":"Wildcard domains","href":"/domains/wildcard-domains"},{"title":"Supported DNS record types","sidebarTitle":"DNS record types","href":"/domains/dns-records"},{"title":"Email forwarding for your domain","sidebarTitle":"Email forwarding","href":"/domains/email-forwarding"}]},{"group":"Environments","public":true,"icon":"layer-group","pages":[{"title":"Project environments","sidebarTitle":"Environments","href":"/environments/overview"},{"title":"Manage environment variables","href":"/environments/environment-variables"},{"title":"Reference shared and cross-project variables","href":"/environments/env-references"}]},{"group":"Networking","public":true,"icon":"network-wired","pages":[{"title":"Networking and the edge","description":"Every request to a Brimble project goes through the edge: routing, TLS, injected and stripped headers, WebSockets and gRPC, rate limits, and body size.","href":"/networking/overview"},{"title":"HTTP, WebSockets, and gRPC","href":"/networking/http"},{"title":"Request lifecycle on Brimble's edge","sidebarTitle":"Request lifecycle","description":"What happens between a user typing your URL and your service returning a response.","href":"/networking/request-lifecycle"},{"title":"Internal networking between services","sidebarTitle":"Internal networking","href":"/networking/internal-services"},{"title":"Static outbound IPs","href":"/networking/static-outbound-ips"},{"title":"Rate limits for traffic and builds","sidebarTitle":"Rate limits","href":"/networking/rate-limits"}]},{"group":"Scaling","public":true,"icon":"arrows-up-down","pages":[{"title":"Configure horizontal scaling","sidebarTitle":"Configure scaling","href":"/scaling/overview"}]},{"group":"Observability","public":true,"icon":"gauge","pages":[{"title":"Project metrics: CPU, memory, and latency","sidebarTitle":"Project metrics","href":"/observability/metrics"},{"title":"Application and request logs","sidebarTitle":"Logs","href":"/observability/logs"}]},{"group":"Analytics","public":true,"icon":"chart-line","pages":[{"title":"Web analytics for deployed sites","sidebarTitle":"Web analytics","href":"/analytics/web-analytics"}]},{"group":"Workspaces and teams","public":true,"icon":"users","pages":[{"title":"Create a team workspace","sidebarTitle":"Create a workspace","href":"/workspaces-and-teams/create-a-workspace"},{"title":"Manage teams and members","sidebarTitle":"Manage teams","href":"/workspaces-and-teams/manage-teams"},{"title":"Roles and permissions","href":"/workspaces-and-teams/roles-and-permissions"},{"title":"Single sign-on (SSO) and Directory Sync","sidebarTitle":"SSO and Directory Sync","href":"/workspaces-and-teams/sso"}]},{"group":"Security","public":true,"icon":"shield-halved","pages":[{"title":"Brimble API keys","sidebarTitle":"API keys","href":"/security/api-keys"},{"title":"Two-factor authentication","href":"/security/two-factor-authentication"}]},{"group":"Billing","public":true,"icon":"receipt","pages":[{"title":"How Brimble billing works","sidebarTitle":"How billing works","href":"/billing/plans"},{"title":"Wallet and card payments","sidebarTitle":"Wallet","href":"/billing/wallet"},{"title":"Compute pricing: CPU and memory rates","sidebarTitle":"Compute pricing","href":"/billing/compute"},{"title":"Build minutes and top-ups","sidebarTitle":"Build minutes","href":"/billing/build-minutes"},{"title":"Brimble referral program","sidebarTitle":"Referrals","href":"/billing/referrals"},{"title":"Export your costs in FOCUS format","sidebarTitle":"Cost export","href":"/billing/cost-export"}]},{"group":"Notifications","public":true,"icon":"bell","pages":[{"title":"Notifications: dashboard, email, and push","sidebarTitle":"Notifications","href":"/notifications/overview"}]},{"group":"Webhooks","public":true,"icon":"bolt","pages":[{"title":"Webhooks for platform events","sidebarTitle":"Webhooks","href":"/webhooks/overview"},{"title":"Webhook events reference","href":"/webhooks/events"}]},{"group":"Log Drains","public":true,"icon":"file-export","pages":[{"title":"Log drains: forward logs to HTTPS or S3","sidebarTitle":"Log Drains","href":"/drains/overview"}]},{"group":"Troubleshooting","public":true,"icon":"wrench","pages":[{"title":"Fix failed builds","sidebarTitle":"Build failures","href":"/troubleshooting/build-failures"},{"title":"Application failed to respond","href":"/troubleshooting/application-failed-to-respond"},{"title":"Fix 502 Bad Gateway errors","sidebarTitle":"502 Bad Gateway","href":"/troubleshooting/502-errors"},{"title":"Fix DNS issues","sidebarTitle":"DNS issues","href":"/troubleshooting/dns"},{"title":"Fix TLS certificate errors","sidebarTitle":"TLS certificate issues","href":"/troubleshooting/tls"},{"title":"Fix a stuck deployment","sidebarTitle":"Deployment is stuck","href":"/troubleshooting/deployment-stuck"}]},{"group":"Reference","public":true,"icon":"book","pages":[{"title":"Glossary of Brimble terms","sidebarTitle":"Glossary","href":"/glossary"}]}]},{"tab":"Core API","pages":[{"title":"Core API","href":"/api-reference/core/introduction"}]},{"tab":"Sandbox API","pages":[{"title":"Sandbox API","href":"/api-reference/sandboxes/templates-list"}]}]},"basePath":"","title":"HTTP, WebSockets, and gRPC - Brimble","buildId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","deploymentId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","dynamics":[],"chunks":[]}