{"id":2769,"date":"2019-10-23T12:13:20","date_gmt":"2019-10-23T04:13:20","guid":{"rendered":"https:\/\/www.mondoze.com\/guide\/?post_type=kb&#038;p=2769"},"modified":"2022-10-05T08:01:48","modified_gmt":"2022-10-05T00:01:48","slug":"can-i-use-cloudflare-with-websockets","status":"publish","type":"kb","link":"https:\/\/www.mondoze.com\/guide\/kb\/can-i-use-cloudflare-with-websockets","title":{"rendered":"Can I use Cloudflare with WebSockets?"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"2769\" class=\"elementor elementor-2769\" data-elementor-settings=\"[]\">\n\t\t\t\t\t\t<div class=\"elementor-inner\">\n\t\t\t\t\t\t\t<div class=\"elementor-section-wrap\">\n\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-48f39452 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"48f39452\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-2a2cd139\" data-id=\"2a2cd139\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-4a53564 elementor-widget elementor-widget-heading\" data-id=\"4a53564\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Can I Use Cloudflare with WebSockets<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-21284d6c elementor-widget elementor-widget-text-editor\" data-id=\"21284d6c\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-text-editor elementor-clearfix\">\n\t\t\t\t<p><em>WebSockets are available for all Cloudflare customers, with concurrent connections allocated by plan.<\/em><\/p><p>WebSockets are open connections sustained between the client and the origin server. Inside a WebSockets connection, the client and the origin can pass data back and forth without having to reestablish sessions. This makes exchanging data within a WebSockets connection fast. WebSockets are often use for real-time applications such as live chat and gaming.<\/p><p>Learn more about\u00a0<a href=\"https:\/\/www.cloudflare.com\/websockets\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"broken_link\">WebSockets<\/a>\u00a0and the most common uses of the protocol.<\/p><hr \/><h4><strong>What plan do I need for WebSockets support on my site?<\/strong><\/h4><table><tbody><tr><td><strong>Cloudflare plan<\/strong><\/td><td><strong>Volume of<br \/>concurrent connections<\/strong><\/td><td><strong>Example use case<\/strong><\/td><\/tr><tr><td>Free<\/td><td>Low<\/td><td>Hobby or demonstration site<\/td><\/tr><tr><td>Pro<\/td><td>Medium<\/td><td>Project or small business<\/td><\/tr><tr><td>Business<\/td><td>High<\/td><td>Important to your operations<\/td><\/tr><tr><td>Enterprise<\/td><td>Custom<\/td><td>Mission critical and significant volume<\/td><\/tr><\/tbody><\/table><hr \/><h4><strong>How can I use WebSockets with Cloudflare?<\/strong><\/h4><p>No additional configuration is required to send WebSockets traffic through Cloudflare. Cloudflare will immediately begin proxying your WebSockets through to your origin.<\/p><hr \/><h4><strong>Why are these volume limits not specific numbers?<\/strong><\/h4><p>Cloudflare powers several high-volume, mission critical WebSockets applications for Enterprise customers.<\/p><p>Since introducing WebSockets support in 2014, Cloudflare has nearly triple its network map, going from 28 locations to over 150 (as mid-2018). In all locations, we&#8217;ve add compute resources and multiple Tier 1 bandwidth providers.<\/p><p>We&#8217;re confident in our ability to offer WebSockets to all our customers now, but we&#8217;re also thoughtful about allocating resources \u2013 including WebSockets connections \u2013 by plan level. So, we&#8217;re starting with guidelines, and we&#8217;ll learn from our customers&#8217; adoption.<\/p><p>We enable modern technologies which make the Internet better. The best way to do that is let customers play, grow, and thrive.<\/p><hr \/><h4><strong>Can I use WebSockets over SSL?<\/strong><\/h4><p>Yes, Cloudflare SSL fully supports WebSockets traffic passing through our network.<\/p><hr \/><h4><strong>Do Cloudflare Workers support proxying WebSockets?<\/strong><\/h4><p>Yes, Cloudflare Workers support proxying WebSockets. However, it currently does not support:<\/p><ul><li>Acting as an endpoint (client or server) for a WebSocket session<\/li><li>Manipulating or modifying individual messages<\/li><\/ul><hr \/><h4><strong>Does the Cloudflare Web Application Firewall (WAF) work with WebSockets?<\/strong><\/h4><p>The initial HTTP 101 request is subject to the WAF, rate limiting, and other firewall features just like any any other WebSockets connection. However, once a connections have been establish the WAF does not perform any further inspections.<\/p><hr \/><h4><strong>What happens if my site exceeds the number of concurrent WebSockets connections that Cloudflare expects?<\/strong><\/h4><p>Immediately, nothing. Within reason, Cloudflare will allow occasional spikes in usage beyond our guidelines, and we will not apply unnecessary limits.<\/p><p>Repeated spikes or high continued usage will prompt a dialogue: we&#8217;ll reach out to learn more about your application. Barring abuse or attack, we will not impose limits errors for any application without contacting the customer.<\/p><p>Customers whose usage claims a disproportionate percentage of resources for their current plan level may be asked to upgrade to the plan level that matches their needs.<\/p><hr \/><h4><strong>Technical note<\/strong><\/h4><p>When Cloudflare releases new code to its global network, we may restart servers, which terminates WebSockets connections.<\/p>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Can I Use Cloudflare with WebSockets WebSockets are available for all Cloudflare customers, with concurrent connections allocated by plan. WebSockets are open connections sustained between the client and the origin server. Inside a WebSockets connection, the client and the origin can pass data back and forth without having to reestablish sessions. This makes exchanging data &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/www.mondoze.com\/guide\/kb\/can-i-use-cloudflare-with-websockets\"> <span class=\"screen-reader-text\">Can I use Cloudflare with WebSockets?<\/span> Read More \u00bb<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}}},"kbtopic":[53],"kbtag":[110],"mkb_version":[],"_links":{"self":[{"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kb\/2769"}],"collection":[{"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kb"}],"about":[{"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/types\/kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/comments?post=2769"}],"version-history":[{"count":6,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kb\/2769\/revisions"}],"predecessor-version":[{"id":18830,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kb\/2769\/revisions\/18830"}],"wp:attachment":[{"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/media?parent=2769"}],"wp:term":[{"taxonomy":"kbtopic","embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kbtopic?post=2769"},{"taxonomy":"kbtag","embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kbtag?post=2769"},{"taxonomy":"mkb_version","embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/mkb_version?post=2769"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}