Aaron Bassett

🐦 @aaronbassett

Reduce, Reuse, Recycle - Persisting WebSocket connections with SharedWorkers

Thursday 14:00-14:30 UTC+2 in Main hall

View on Youtube

When using WebSockets to communicate between your server and the client every new browser context–tab, window, iframe, and so on–is likely to create another WebSocket connection. All these open connections can quickly take a toll on your server resources, or if you’re using a PaaS which charges for each connection, it could quickly add up to a big bill.

In this talk, we’ll look at how you can use SharedWorkers to create a single persistent WebSocket which can be used by every browser context to communicate with your Django Channels WebSocket server