WebSockets are notoriously hard to work with when it comes to ensuring their resilience during failures, connection interruptions, or simply when scaling. In this video, we're going to learn how one can use ping-pong heartbeats to detect connection failures, and fallbacks such as LocalStorage or Server-Sent Events, as well as learn how Sticky Sessions and Broadcasting would work in these scenarios.
======⚡⚡⚡======
Consider becoming a member of the channel by joining me ❤️
https://www.youtube.com/channel/UCqAL_b-jUOTPjrTSNl2SNaQ/join
☕ Buy me a coffee: https://www.buymeacoffee.com/softwaredeveloperdiaries
🙌 Become my Patreon and get exclusive perks: https://patreon.com/softdevdiaries
💼 Follow me on LinkedIn and drop me a message if you'd like: https://www.linkedin.com/in/gadirovgs/
💻 Also, let's connect on GitHub: https://github.com/gusgad
📚 Resources:
https://stackoverflow.com/questions/5195452/websockets-vs-server-sent-events-eventsource
Code: https://github.com/gusgad/youtube-tutorials/tree/scaling-websockets
Server-Sent Events: https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events
And don't forget to subscribe for more videos like this 😊