Udemy

Realtime Backend System Design with WebSockets

Enroll Now
  • 2,845 Students
  • Updated 9/2025
4.7
(117 Ratings)
CTgoodjobs selects quality courses to enhance professionals' competitiveness. By purchasing courses through links on our site, we may receive an affiliate commission.

Course Information

Registration period
Year-round Recruitment
Course Level
Study Mode
Duration
11 Hour(s) 30 Minute(s)
Language
English
Taught by
Hussein Nasser
Rating
4.7
(117 Ratings)

Course Overview

Realtime Backend System Design with WebSockets

Advanced WebSockets internals for Building scalable Real-Time bidirectional gaming and chatting backends

Engineering efficient and scalable backends is such an enjoyable design activity. Understanding the frontend workflows, designing the APIs, picking the right protocols and databases for the task, and determining the communication patterns—whether the workload is CPU- or I/O-intensive—are all part of the fun.

However, what’s truly more challenging is designing real-time backend applications that support unfettered and ad-hoc bidirectional communication. The workloads of gaming, chatting, and even mission-critical real-time applications are unique in that they require a “push” nature to function effectively.

I spent a few months designing this course, and I chose the WebSockets protocol as the foundation for this work. WebSockets is by far the most widely available bidirectional protocol, supported across all clients—from browsers and command-line apps to runtimes like Node and Bun, and even other languages like C and Go.

While there is the newer WebTransport protocol, it isn’t yet as widely supported or battle-tested as WebSockets. Perhaps I’ll refresh this course in a few years when WebTransport matures.

This course is divided into three main sections:

1. WebSockets Internals – A deep dive into the inner workings of the protocol: the handshake, keepalive mechanisms, frame headers, and how it behaves over TLS. We’ll also discuss limitations—because I believe understanding limitations helps us build better applications. Each lecture will include a coding session and a quiz at the end of the section.

2. Scaling WebSockets – Taking your WebSocket knowledge to the maximum: how to scale this protocol over HTTP/1.1, HTTP/2, and HTTP/3. We’ll cover implementation with proxies in both stream mode (Layer 4) and application mode (Layer 7), along with their pros and cons. Each lecture will include a coding session and a quiz at the end of the section.

3. Building Real-Time System Designs – Putting everything into practice by designing two systems: an I/O-intensive chat system and a CPU-intensive game. I’ll propose multiple designs for each and choose one to implement.


Prerequisite: Fundamentals of Backend Engineering.

I hope you enjoy the course.

Course Content

  • 7 section(s)
  • 31 lecture(s)
  • Section 1 Introduction
  • Section 2 Foundations of Web Communications
  • Section 3 WebSockets Internals
  • Section 4 Scaling WebSockets Backends
  • Section 5 Real-Time Systems - Building Scalable IO Intensive Chatting Backend
  • Section 6 Real-World System - Scalable CPU Intensive Gaming Backend
  • Section 7 Conclusion

What You’ll Learn

  • System Design for Real-Time backend scaling
  • The Internals of WebSockets
  • How WebSockets Work
  • WebSockets on Secure TLS
  • Scaling WebSockets with Layer 4 Proxying
  • Scaling WebSockets with Layer 7 Proxying
  • WebSockets on HTTP/2 and HTTP/3
  • Building a Real-time Group Chatting App (IO Intensive)
  • Building a Real-time Game App (CPU Intensive)


Reviews

  • R
    Rohit Khandal
    5.0

    Good

  • S
    Saranya Maity
    3.5

    excellent theory explanations & design discussions. I was excited about the last project of the game, and ohh man it disappointed me so bad. a proper code explanation and deploying the game with a level 7 load balancer, was what I was expecting. I love theory plus good practicals , if theres any other course which covers this fundamental of deployment of this kind of distributed system + teach how to test a distributed system like this locally to make sure, when it goes to production its in perfect condition. Thank you for the course.

  • C
    Chandler Pan
    4.0

    Really nice lecture give a lot of useful background to beginners not form the network engineering.

  • S
    Salvatore Olivieri
    5.0

    Hussein is my teacher. I learned so much from him! It's also incredible be exposed to these informations looking at him with his big passion. Thank you so much!

Start FollowingSee all

We use cookies to enhance your experience on our website. Please read and confirm your agreement to our Privacy Policy and Terms and Conditions before continue to browse our website.

Read and Agreed