Is it possible to have a different domain/subdomain for websockets connection?

Hey guys! Is it possible to have a different domain/subdomain for websockets connection beside one for the API and/or site? By rebuilding my website with LiveView and deploying it behind Cloudflare as a proxy, I can say that it’s really slow. I mean Cloudflare supports websockets but if you want it to be fast or support a lot of connection you have to pay. I removed my site which was hosted on a subdomain on Clouflare (even though I’m still using Cloudflare to manage my DNS) and it just feels faster to navigate around, like almost instantly. Now I’m getting almost the same experience I was getting with Next.js. That’s why I was wondering if it was possible to serve the websockets through a different domain and have the main site/api on cloudflare. Thanks!

Hi @jgb-solutions you could create a second endpoint and then assign it to a different hostname

@ceolinrenato hey there! Can you provide some snippet so I can follow? I really appreciate you take the time to reply. Thanks!

Did you ever manage to solve this? I’m looking at doing something similar.