Bunny CDN supports Server-Sent Events. Learn how event streams behave on the edge network, and which limits apply to them.
Server-Sent Events (SSE) stream text from a server to a client over a standard HTTP response. Applications use them for live dashboards, progress updates, notifications, and AI token streams.Bunny CDN supports SSE, and there is no setting to enable. An event stream is an ordinary HTTP response with the text/event-stream content type, and the edge delivers each event as soon as your origin writes it.SSE works with every origin type:
Send Cache-Control: no-cache from your origin. An event stream is cached
like any other response. An origin that sends no Cache-Control gets the pull
zone’s default cache time of 1 month.
A cached stream is no longer a stream. Later clients receive a recording of the first client’s events, all at once, followed by the end of the response. The browser then reconnects, receives the same recording, and loops.Two settings cache a stream even when your origin asks for no caching:
Ignore Query Strings on the pull zone. The cache key is then the path alone, so a per-user stream selected by a query parameter is served to every user.
Request Coalescing joins simultaneous requests for the same URL into one origin request. This is correct for a shared feed, but not for a per-user stream. Give each client its own URL when you use it.
The edge closes a connection that carries no data for approximately two minutes. This is the only duration limit on an event stream, and the connection stays open as long as data flows.Send a heartbeat at least every 30 seconds when you have no events to deliver. An SSE comment line is sufficient, because the client ignores it and the bytes reset the timer:
: heartbeat
There is no guaranteed maximum duration. An edge server can close a stream at
any time, for example during maintenance. The client sees a connection error
and not a clean end of the response, so always let the client reconnect.
Give each event an id field. The client sends the last identifier back in the Last-Event-ID header when it reconnects, which lets your origin continue from that point.
Send the first event immediately. Nothing reaches the client before the first byte, and until it arrives a healthy stream looks the same as a failed connection. An event that carries the current state works well as the first event, and a comment line is sufficient when you have no state to send.
Send the response headers immediately. Bunny waits 60 seconds for your origin to start the response, and returns a 504 Gateway Timeout with error code 106 if nothing arrives. The limit applies only until the headers arrive, and not to the stream that follows. See 502 and 504 errors.
Flush each event. Output buffering in your framework or your web server holds events back, and the client receives them late or in one block.
Remove any request time limit on the origin route that serves the stream.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"bunny.net Documentation","colors":{"primary":"#EF6126","light":"#EF6126","dark":"#EF6126"},"logo":{"light":"https://mintcdn.com/bunnynet-cb9733c2/54-4KCQKoNVNuoyW/logo/bunny-logo-dark.svg?fit=max\u0026auto=format\u0026n=54-4KCQKoNVNuoyW\u0026q=85\u0026s=62c091ea1aaea93d0a981902b7783e37","dark":"https://mintcdn.com/bunnynet-cb9733c2/54-4KCQKoNVNuoyW/logo/bunny-logo-light.svg?fit=max\u0026auto=format\u0026n=54-4KCQKoNVNuoyW\u0026q=85\u0026s=3610e32d68a9fa458b0116ac58ca812a"},"favicon":"https://mintcdn.com/bunnynet-cb9733c2/1bTPx1eyQm8EK8W3/favicon.png?fit=max\u0026auto=format\u0026n=1bTPx1eyQm8EK8W3\u0026q=85\u0026s=85267b63e804fac7a4dd94599bb8c6e8","navbar":{"links":[{"href":"https://bunny.net/docs/api-reference","label":"API Reference"},{"href":"https://github.com/BunnyWay","label":"GitHub"}],"primary":{"type":"button","label":"Get Started","href":"https://dash.bunny.net/auth/register"}},"footer":{"socials":{"discord":"https://discord.gg/bunnynet","github":"https://github.com/BunnyWay","x":"https://x.com/BunnyCDN","bluesky":"https://bsky.app/profile/bunny.net","linkedin":"https://www.linkedin.com/company/bunnynet","facebook":"https://www.facebook.com/bunnycdn"}},"icons":{"library":"lucide"},"contextual":{"options":["copy","claude","chatgpt","cursor","view","vscode"],"display":"header"},"interaction":{"drilldown":false},"metadata":{"timestamp":true},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"bunnynet-cb9733c2","hasAudioNarration":false,"actualSubdomain":"bunnynet-cb9733c2","customDomains":["bunny.net"],"gitSource":{"type":"github","owner":"bunnyway","repo":"documentation","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae49f2d21d44d6b52dcfe35","collectionId":"5e262b87-ade9-45d8-9b63-06888c8d59a3","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae49f2d21d44d6b52dcfe35"},"feedback":{"thumbs":true,"contextualFeedback":{"allowEmail":true},"agentFeedback":true,"edits":true,"issues":false},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae534f2b9a26f131eb41834","clientVersion":"0.0.4043","searchFilterCounts":[{"language":"default","tag":"Documentation","count":752},{"language":"default","tag":"API Reference","count":318},{"language":"default","tag":"Core Platform API","count":109},{"language":"default","tag":"CDN","count":82},{"language":"default","tag":"Shield API","count":66},{"language":"default","tag":"Stream","count":66},{"language":"default","tag":"Magic Containers API","count":56},{"language":"default","tag":"Storage","count":54},{"language":"default","tag":"Guides","count":54},{"language":"default","tag":"Reference","count":52}],"searchSettings":{"isFiltersEnabled":true}},"assistantConfig":{"enableStarterQuestions":false,"deflection":{"enabled":true,"type":"link","email":"support@bunny.net","url":"https://bunny.net/contact","showHelpButton":true}},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"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":"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":"llms-txt-v2","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":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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}],"privacy":{"consentBanner":{"enabled":true}},"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".dark img[src*=\"/logo/frameworks/angular.svg\"],.dark img[src*=\"/logo/frameworks/eleventy.svg\"],.dark img[src*=\"/logo/frameworks/express.svg\"],.dark img[src*=\"/logo/frameworks/mariadb.svg\"],.dark img[src*=\"/logo/frameworks/nextjs.svg\"],.dark img[src*=\"/logo/frameworks/sphinx.svg\"]{filter:invert(1)}html:not(.dark) img[src*=\"/logo/frameworks/zola.svg\"]{filter:invert(1)}"}],"page":{"pagePath":"cdn/server-sent-events","slug":"/cdn/server-sent-events","pageMetadata":{"title":"Server-Sent Events (SSE)","sidebarTitle":"Server-Sent Events","description":"Bunny CDN supports Server-Sent Events. Learn how event streams behave on the edge network, and which limits apply to them.","href":"/cdn/server-sent-events"},"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: \"Bunny CDN supports Server-Sent Events. Learn how event streams behave on the edge network, and which limits apply to them.\"\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:[_jsx(_components.p,{children:`Server-Sent Events (SSE) stream text from a server to a client over a standard HTTP response. Applications use them for live dashboards, progress updates, notifications, and AI token streams.`}),`\n`,_jsxs(_components.p,{children:[`Bunny CDN supports SSE, and there is no setting to enable. An event stream is an ordinary HTTP response with the `,_jsx(_components.code,{children:`text/event-stream`}),` content type, and the edge delivers each event as soon as your origin writes it.`]}),`\n`,_jsx(_components.p,{children:`SSE works with every origin type:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Your own origin server.`}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/scripting/server-sent-events`,children:`Edge Scripting`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/magic-containers/endpoints#server-sent-events`,children:`Magic Containers`}),`, through a CDN endpoint.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`keep-the-stream-out-of-the-cache`,children:`Keep the stream out of the cache`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[`Send `,_jsx(_components.code,{children:`Cache-Control: no-cache`}),` from your origin.`]}),` An event stream is cached\nlike any other response. An origin that sends no `,_jsx(_components.code,{children:`Cache-Control`}),` gets the pull\nzone’s default cache time of 1 month.`]})}),`\n`,_jsx(_components.p,{children:`A cached stream is no longer a stream. Later clients receive a recording of the first client’s events, all at once, followed by the end of the response. The browser then reconnects, receives the same recording, and loops.`}),`\n`,_jsx(_components.p,{children:`Two settings cache a stream even when your origin asks for no caching:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`An `,_jsx(_components.a,{href:`/cdn/edge-rules/custom-cache-time`,children:`Override Cache Time`}),` Edge Rule that matches the path of the stream.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Ignore Query Strings`}),` on the pull zone. The cache key is then the path alone, so a per-user stream selected by a query parameter is served to every user.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.a,{href:`/cdn/request-coalescing`,children:`Request Coalescing`}),` joins simultaneous requests for the same URL into one origin request. This is correct for a shared feed, but not for a per-user stream. Give each client its own URL when you use it.`]}),`\n`,_jsx(Heading,{level:`2`,id:`keep-the-stream-active`,children:`Keep the stream active`}),`\n`,_jsx(_components.p,{children:`The edge closes a connection that carries no data for approximately two minutes. This is the only duration limit on an event stream, and the connection stays open as long as data flows.`}),`\n`,_jsx(_components.p,{children:`Send a heartbeat at least every 30 seconds when you have no events to deliver. An SSE comment line is sufficient, because the client ignores it and the bytes reset the timer:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,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:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`: heartbeat`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`There is no guaranteed maximum duration. An edge server can close a stream at\nany time, for example during maintenance. The client sees a connection error\nand not a clean end of the response, so always let the client reconnect.`})}),`\n`,_jsxs(_components.p,{children:[`Give each event an `,_jsx(_components.code,{children:`id`}),` field. The client sends the last identifier back in the `,_jsx(_components.code,{children:`Last-Event-ID`}),` header when it reconnects, which lets your origin continue from that point.`]}),`\n`,_jsx(Heading,{level:`2`,id:`origin-requirements`,children:`Origin requirements`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Send the first event immediately.`}),` Nothing reaches the client before the first byte, and until it arrives a healthy stream looks the same as a failed connection. An event that carries the current state works well as the first event, and a comment line is sufficient when you have no state to send.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Send the response headers immediately.`}),` Bunny waits 60 seconds for your origin to start the response, and returns a `,_jsx(_components.code,{children:`504 Gateway Timeout`}),` with error code `,_jsx(_components.code,{children:`106`}),` if nothing arrives. The limit applies only until the headers arrive, and not to the stream that follows. See `,_jsx(_components.a,{href:`/cdn/connectivity#502-and-504-errors`,children:`502 and 504 errors`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Flush each event.`}),` Output buffering in your framework or your web server holds events back, and the client receives them late or in one block.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Remove any request time limit`}),` on the origin route that serves the stream.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`pricing`,children:`Pricing`}),`\n`,_jsxs(_components.p,{children:[`An event stream is a standard HTTP request, and Bunny bills the data it transfers at the `,_jsx(_components.a,{href:`/cdn/pricing`,children:`normal CDN bandwidth rate`}),`. The `,_jsx(_components.a,{href:`/cdn/websockets#connection-limits`,children:`WebSocket connection limits`}),` and the WebSocket connection-time price do not apply.`]}),`\n`,_jsxs(_components.p,{children:[`An `,_jsx(_components.a,{href:`/scripting/server-sent-events`,children:`Edge Script`}),` that produces the stream also bills `,_jsx(_components.a,{href:`/scripting/pricing`,children:`CPU time and requests`}),`, and not the time the connection stays open.`]}),`\n`,_jsx(Heading,{level:`2`,id:`sse-or-websockets`,children:`SSE or WebSockets`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Use SSE when`}),_jsxs(_components.th,{children:[`Use `,_jsx(_components.a,{href:`/cdn/websockets`,children:`WebSockets`}),` when`]})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Only the server sends data.`}),_jsx(_components.td,{children:`The client and the server both send data.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Text events are sufficient.`}),_jsx(_components.td,{children:`You need binary frames.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`You want plain HTTP, with no setting to enable.`}),_jsx(_components.td,{children:`You accept a per-zone connection limit and a separate price.`})]})]})]})]})}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":"Server-Sent Events (SSE)","sidebarTitle":"Server-Sent Events","description":"Bunny CDN supports Server-Sent Events. Learn how event streams behave on the edge network, and which limits apply to them.","href":"/cdn/server-sent-events"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Keep the stream out of the cache","slug":"keep-the-stream-out-of-the-cache","depth":2,"children":[]},{"title":"Keep the stream active","slug":"keep-the-stream-active","depth":2,"children":[]},{"title":"Origin requirements","slug":"origin-requirements","depth":2,"children":[]},{"title":"Pricing","slug":"pricing","depth":2,"children":[]},{"title":"SSE or WebSockets","slug":"sse-or-websockets","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"bunnynet-cb9733c2","siteName":"bunny.net Documentation","title":"Server-Sent Events (SSE) - bunny.net Documentation","relatedPagesConfig":{"enabled":false,"limit":5,"mode":"automatic"},"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-31T11:55:15.785Z","gitLastModified":"2026-08-31T11:54:34.000Z","originalFileLocation":"cdn/server-sent-events.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=\"Bunny CDN supports Server-Sent Events. Learn how event streams behave on the edge network, and which limits apply to them.\">\u003cmeta data-mint-head name=\"application-name\" content=\"bunny.net Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/bunnynet-cb9733c2/Zv4NOenQlgPS3TXm/_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=\"/docs/mintlify-assets/_mintlify/favicons/bunnynet-cb9733c2/Zv4NOenQlgPS3TXm/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/bunnynet-cb9733c2/Zv4NOenQlgPS3TXm/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/bunnynet-cb9733c2/Zv4NOenQlgPS3TXm/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/bunnynet-cb9733c2/Zv4NOenQlgPS3TXm/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/bunnynet-cb9733c2/Zv4NOenQlgPS3TXm/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/bunnynet-cb9733c2/Zv4NOenQlgPS3TXm/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/bunnynet-cb9733c2/Zv4NOenQlgPS3TXm/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/bunnynet-cb9733c2/Zv4NOenQlgPS3TXm/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Server-Sent Events (SSE) - bunny.net Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Bunny CDN supports Server-Sent Events. Learn how event streams behave on the edge network, and which limits apply to them.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"bunny.net Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://bunny.net/docs/cdn/server-sent-events\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://bunnynet-cb9733c2.mintlify.app/_mintlify/api/og/v2?division=Reference\u0026amp;title=Server-Sent+Events+%28SSE%29\u0026amp;description=Bunny+CDN+supports+Server-Sent+Events.+Learn+how+event+streams+behave+on+the+edge+network%2C+and+which+limits+apply+to+them.\u0026amp;theme=3e3fa11ba94222b95e7f52d5\u0026amp;signature=6baaeaea71fe05f63336cfd58141579a5b7377f4e807d851206eee71c3fd12ab\">\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=\"Server-Sent Events (SSE) - bunny.net Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Bunny CDN supports Server-Sent Events. Learn how event streams behave on the edge network, and which limits apply to them.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://bunnynet-cb9733c2.mintlify.app/_mintlify/api/og/v2?division=Reference\u0026amp;title=Server-Sent+Events+%28SSE%29\u0026amp;description=Bunny+CDN+supports+Server-Sent+Events.+Learn+how+event+streams+behave+on+the+edge+network%2C+and+which+limits+apply+to+them.\u0026amp;theme=3e3fa11ba94222b95e7f52d5\u0026amp;signature=6baaeaea71fe05f63336cfd58141579a5b7377f4e807d851206eee71c3fd12ab\">\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=\"/docs/mintlify-assets/_mintlify/favicons/bunnynet-cb9733c2/Zv4NOenQlgPS3TXm/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"bunny.net Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#EF6126\">\u003clink data-mint-head rel=\"canonical\" href=\"https://bunny.net/docs/cdn/server-sent-events\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/cdn/server-sent-events.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://bunny.net/#organization\",\"name\":\"bunny.net Documentation\",\"url\":\"https://bunny.net\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/bunnynet-cb9733c2/54-4KCQKoNVNuoyW/logo/bunny-logo-dark.svg?fit=max\u0026auto=format\u0026n=54-4KCQKoNVNuoyW\u0026q=85\u0026s=62c091ea1aaea93d0a981902b7783e37\"}},{\"@type\":\"WebSite\",\"@id\":\"https://bunny.net/docs#website\",\"name\":\"bunny.net Documentation\",\"url\":\"https://bunny.net/docs\",\"publisher\":{\"@id\":\"https://bunny.net/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://bunny.net/docs/cdn/server-sent-events#webpage\",\"url\":\"https://bunny.net/docs/cdn/server-sent-events\",\"name\":\"Server-Sent Events (SSE)\",\"description\":\"Bunny CDN supports Server-Sent Events. Learn how event streams behave on the edge network, and which limits apply to them.\",\"dateModified\":\"2026-08-31T11:54:34.000Z\",\"isPartOf\":{\"@id\":\"https://bunny.net/docs#website\"},\"breadcrumb\":{\"@id\":\"https://bunny.net/docs/cdn/server-sent-events#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://bunny.net/docs/cdn/server-sent-events#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Reference\",\"item\":\"https://bunny.net/docs/cdn/request-headers-to-origin\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Server-Sent Events (SSE)\",\"item\":\"https://bunny.net/docs/cdn/server-sent-events\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://bunny.net/docs/cdn/server-sent-events#article\",\"headline\":\"Server-Sent Events (SSE)\",\"name\":\"Server-Sent Events (SSE)\",\"description\":\"Bunny CDN supports Server-Sent Events. Learn how event streams behave on the edge network, and which limits apply to them.\",\"url\":\"https://bunny.net/docs/cdn/server-sent-events\",\"mainEntityOfPage\":{\"@id\":\"https://bunny.net/docs/cdn/server-sent-events#webpage\"},\"dateModified\":\"2026-08-31T11:54:34.000Z\",\"publisher\":{\"@id\":\"https://bunny.net/#organization\"},\"isPartOf\":{\"@id\":\"https://bunny.net/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"bunny.net Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"bunny.net Documentation","nav":{"global":null,"products":[{"product":"Home","icon":"book-open","pages":[{"title":"Home","href":""}]},{"product":"CDN","icon":"zap","description":"Accelerate and protect your content globally","tabs":[{"tab":"Documentation","groups":[{"group":"Documentation","pages":[{"title":"Bunny CDN","sidebarTitle":"Introduction","mode":"wide","href":"/cdn"},{"title":"Quickstart","href":"/cdn/quickstart"},{"title":"Global Network Regions","sidebarTitle":"Regions","href":"/cdn/regions"},{"title":"Pricing","href":"/cdn/pricing"},{"title":"Bunny CDN Changelog","sidebarTitle":"Changelog","url":"/changelog?tags=CDN","href":"/cdn/changelog"},{"title":"CDN Limits and Defaults","sidebarTitle":"Limits","href":"/cdn/limits"},{"title":"Connectivity","sidebarTitle":"Connectivity","href":"/cdn/connectivity"},{"title":"IP Family Policy","sidebarTitle":"IP Family Policy","href":"/cdn/ip-family-policy"}]},{"group":"Usage","pages":[{"group":"Caching","pages":[{"title":"Smart Cache","href":"/cdn/smart-cache"},{"title":"Vary Cache","href":"/cdn/vary-cache"},{"title":"Query String Sort","href":"/cdn/query-string-sort"},{"title":"Perma-Cache","href":"/cdn/perma-cache"},{"title":"Request Coalescing","href":"/cdn/request-coalescing"},{"title":"Purge Cache","href":"/cdn/purge-cache"}]},{"group":"Edge Rules","pages":[{"title":"Edge Rules","sidebarTitle":"Overview","href":"/cdn/edge-rules/index"},{"title":"Trigger Path Setup","sidebarTitle":"Trigger Paths","href":"/cdn/edge-rules/trigger-path"},{"title":"Custom Cache Time for File Extensions","sidebarTitle":"Custom Cache Time","href":"/cdn/edge-rules/custom-cache-time"},{"title":"Redirect b-cdn.net to Custom Hostname","sidebarTitle":"Redirect Hostname","href":"/cdn/edge-rules/redirect-hostname"},{"title":"Direct IP Origin with Custom Hostname","sidebarTitle":"Direct IP Origin","href":"/cdn/edge-rules/ip-origin"},{"title":"Dynamic Variables","href":"/cdn/edge-rules/dynamic-variables"},{"title":"Variable Expansion","href":"/cdn/edge-rules/variable-expansion"},{"title":"Edge Rules Ordering","sidebarTitle":"Ordering \u0026 Execution","href":"/cdn/edge-rules/ordering"},{"title":"Pattern Matching in Edge Rules","href":"/cdn/edge-rules/pattern-matching"}]},{"group":"Load Balancer","pages":[{"title":"Load Balancer","sidebarTitle":"Overview","href":"/cdn/load-balancer/index"},{"title":"Origins and Origin Groups","href":"/cdn/load-balancer/origins"},{"title":"Routing Methods","href":"/cdn/load-balancer/routing"},{"title":"Sticky Sessions","href":"/cdn/load-balancer/sticky-sessions"},{"title":"Health and Failover","href":"/cdn/load-balancer/health-and-failover"},{"title":"Statistics","href":"/cdn/load-balancer/statistics"},{"title":"Load Balancer Pricing","sidebarTitle":"Pricing","href":"/cdn/load-balancer/pricing"}]},{"group":"Performance","pages":[{"title":"Performance","sidebarTitle":"Overview","href":"/cdn/performance/index"},{"title":"Origin Shield","href":"/cdn/performance/origin-shield"},{"title":"Smart Preloader","href":"/cdn/performance/smart-preloader"},{"title":"Routing Filters","href":"/cdn/performance/routing-filters"},{"title":"Network Limits","href":"/cdn/performance/network-limits"}]},{"group":"Security","pages":[{"title":"SSL","href":"/cdn/security/ssl"},{"title":"Hotlink Protection","href":"/cdn/security/hotlink-protection"},{"title":"Geographic Blocking","href":"/cdn/security/geographic-blocking"},{"group":"Token Authentication","pages":[{"title":"Token Authentication","sidebarTitle":"Overview","href":"/cdn/security/token-authentication/index"},{"title":"Basic Token Authentication","sidebarTitle":"Basic","href":"/cdn/security/token-authentication/basic"},{"title":"Advanced Token Authentication","sidebarTitle":"Advanced","href":"/cdn/security/token-authentication/advanced"}]},{"title":"JA4 Fingerprinting","href":"/cdn/security/ja4-fingerprinting"}]},{"group":"Logging","pages":[{"title":"Logging","sidebarTitle":"Overview","href":"/cdn/logging/index"},{"title":"Permanent Log Storage","href":"/cdn/logging/permanent-storage"},{"title":"Log Forwarding","href":"/cdn/logging/forwarding"},{"title":"Origin Errors","href":"/cdn/logging/origin-errors"}]}]},{"group":"Integrations","pages":[{"group":"CMS","pages":[{"title":"WordPress","url":"/integrations/wordpress","href":"/cdn/integrations/cms/wordpress"},{"title":"Typo3","href":"/cdn/integrations/cms/typo3"},{"title":"Joomla","href":"/cdn/integrations/cms/joomla"},{"title":"ExpressionEngine","href":"/cdn/integrations/cms/expressionengine"},{"title":"Shopware","href":"/cdn/integrations/cms/shopware"},{"title":"Drupal","href":"/cdn/integrations/cms/drupal"},{"title":"PrestaShop","href":"/cdn/integrations/cms/prestashop"},{"title":"Magento","href":"/cdn/integrations/cms/magento"},{"title":"Discourse","href":"/cdn/integrations/cms/discourse"}]},{"group":"Storage","pages":[{"title":"Microsoft Azure Storage Blobs","href":"/cdn/integrations/storage/azure-blob"},{"title":"Wasabi","href":"/cdn/integrations/storage/wasabi"},{"title":"Amazon S3","href":"/cdn/integrations/storage/amazon-s3"},{"title":"OVH Public Cloud","href":"/cdn/integrations/storage/ovh"},{"title":"Backblaze","href":"/cdn/integrations/storage/backblaze"},{"title":"DigitalOcean Spaces","href":"/cdn/integrations/storage/digitalocean-spaces"}]},{"group":"Frameworks","pages":[{"title":"Serve Astro from Bunny CDN with Bunny Optimizer","sidebarTitle":"Astro","href":"/cdn/integrations/frameworks/astro"},{"title":"Serve Next.js from Bunny CDN with Bunny Optimizer","sidebarTitle":"Next.js","href":"/cdn/integrations/frameworks/nextjs"}]}]},{"group":"Reference","pages":[{"title":"Request headers sent to your origin","sidebarTitle":"Request headers","href":"/cdn/request-headers-to-origin"},{"title":"Custom Hostname","href":"/cdn/custom-hostname"},{"title":"CDN Acceleration","href":"/cdn/cdn-acceleration"},{"title":"Verify your configuration","href":"/cdn/verify-configuration"},{"title":"SSL for Custom Domains","href":"/cdn/ssl-setup"},{"sidebarTitle":"Seamless Domain Migration","title":"How to Seamlessly Migrate Your Domain to bunny.net","href":"/cdn/seamless-migration"},{"title":"Custom 404 Page","href":"/cdn/custom-404-page"},{"title":"WebSockets","description":"bunny.net supports WebSockets to deliver low-latency, bidirectional communication between your applications and users across the globe. By combining WebSockets with our edge network, you can scale real-time features like chat, live updates, multiplayer games, or IoT data streaming with unmatched performance and reliability.","href":"/cdn/websockets"},{"title":"Server-Sent Events (SSE)","sidebarTitle":"Server-Sent Events","href":"/cdn/server-sent-events"},{"group":"Frequently Asked Questions","pages":[{"title":"Do you support ETag?","description":null,"href":"/cdn/frequently-asked-questions/etag-support"},{"title":"Do you support cache warming or preloading content onto the CDN?","href":"/cdn/frequently-asked-questions/cache-warming"},{"title":"Does BunnyCDN automatically detect when a file is changed?","href":"/cdn/frequently-asked-questions/updating-files"},{"title":"Do you support range requests?","href":"/cdn/frequently-asked-questions/range-requests"},{"title":"Do you support RTMP streaming?","href":"/cdn/frequently-asked-questions/rtmp-streaming"},{"title":"Is there a domain limit on pull zone configurations?","href":"/cdn/frequently-asked-questions/domain-limit"},{"title":"MIME Type Compression Support","href":"/cdn/frequently-asked-questions/mime-compression"},{"title":"Which PoP you are being routed to","href":"/cdn/frequently-asked-questions/pop-routing"}]},{"group":"Troubleshooting","pages":[{"title":"Find Your PoP and Run Diagnostics","href":"/cdn/troubleshooting/run-traceroute"},{"title":"Generate a HAR File","href":"/cdn/troubleshooting/generate-a-har-file"},{"title":"Website Still Slow","href":"/cdn/troubleshooting/still-slow"}]}]}]}]},{"product":"Magic Containers","icon":"box","description":"Deploy any app anywhere with Docker","pages":[{"title":"Magic Containers","href":"/magic-containers"}]},{"product":"Edge Scripting","icon":"code","description":"Deploy serverless code at the edge","pages":[{"title":"Edge Scripting","href":"/scripting"}]},{"product":"Stream","icon":"video","description":"Video streaming and delivery platform","pages":[{"title":"Stream","href":"/stream"}]},{"product":"Storage","icon":"hard-drive","description":"Global object storage","pages":[{"title":"Storage","href":"/storage"}]},{"product":"Shield","icon":"shield","description":"Stay protected and online no matter what","pages":[{"title":"Shield","href":"/shield"}]},{"product":"Optimizer","icon":"sparkles","description":"Automatic image and web optimization.","pages":[{"title":"Optimizer","href":"/optimizer"}]},{"product":"DNS","icon":"globe","description":"Unlock the true power of DNS with an ultra-fast scriptable platform","pages":[{"title":"DNS","href":"/dns"}]},{"product":"Database","icon":"database","description":"Serverless SQLite over HTTP","pages":[{"title":"Database","href":"/database"}]},{"product":"Integrations","icon":"puzzle","description":"Official and third-party plugins and integrations","pages":[{"title":"Integrations","href":"/integrations/wordpress"}]},{"product":"CLI","icon":"terminal","description":"Manage bunny.net from your terminal","pages":[{"title":"CLI","href":"/cli"}]},{"product":"API Reference","icon":"square-terminal","description":"Build \u0026 Integrate with the Platform API","pages":[{"title":"API Reference","href":"/api-reference"}]},{"product":"Partners","icon":"handshake","description":"Manage customers, pricing, and billing as a bunny.net partner","pages":[{"title":"Partners","href":"/partners"}]}]},"basePath":"","title":"Server-Sent Events (SSE) - bunny.net Documentation","buildId":"dpl_4RHMRqtvdHvKgaEfTTjFqjzja3B6","deploymentId":"dpl_4RHMRqtvdHvKgaEfTTjFqjzja3B6","dynamics":[],"chunks":[]}