Skip to main content

Fundamentals of Backend Communications and Protocols

15h 35m 37s
English
Paid

Explore the art of backend engineering as you dive into communication design patterns that frequently emerge in the field. With my 18 years of experience in building backend applications, I've identified key patterns such as request-response, publish-subscribe, short and long polling, and push methods. These are among the most prevalent ways clients interact with backend systems.

Understanding Backend Communication Protocols

Building upon these communication design patterns, engineers utilize various protocols to facilitate concrete communication. Although the foundational transport mechanisms are limited to TCP or UDP, numerous industry-specific protocols have been developed to address specific needs. Notable examples include HTTP/1.1, HTTP/2, HTTP/3, gRPC, and WebRTC. Additionally, protocols like QUIC, built on UDP, help integrate HTTP/2 streaming at the transport level. Each protocol offers unique advantages and is best suited for certain scenarios. Throughout this course, I will delve into the most commonly used protocols, providing examples and demonstrations where applicable.

Connection Establishment and Management

Before a client can send a request, it must first establish a connection with the backend. Understanding the nuances of connection establishment, including what occurs at the kernel level versus the backend application process, is critical. You'll learn how connections are accepted efficiently by the backend application to prevent the kernel queue from becoming full, which would block clients from connecting.

Request Handling in Backend Applications

Once a connection is established, the client sends a request. But what exactly transpires within the backend application to process this request? Discover what constitutes a request and understand the implications of parsing it, based on the chosen protocol. This knowledge equips engineers with the tools to troubleshoot performance issues and identify bugs efficiently.

Backend Execution Patterns

After receiving a request, the backend must execute it. A variety of design choices are available for execution styles. Understanding the differences between processes and threads, multi-process, multi-threaded models, and their relationship to CPU cores and hardware threads is pivotal in selecting the appropriate pattern. While traditional patterns are effective, engineers can always innovate new patterns tailored to specific requirements.

Course Prerequisites and Audience

This course is tailored for engineers with prior experience in building backend applications. It is categorized as an intermediate to advanced-level course. Familiarity with programming and networking is a prerequisite. If you lack networking skills, I suggest completing my foundational network engineering course first. I hope you find this course both informative and enjoyable, and I sincerely thank you for considering it.

About the Author: udemy

udemy thumbnail
By connecting students all over the world to the best instructors, Udemy is helping individuals reach their goals and pursue their dreams. Udemy is the leading global marketplace for teaching and learning, connecting millions of students to the skills they need to succeed. Udemy helps organizations of all kinds prepare for the ever-evolving future of work. Our curated collection of top-rated business and technical courses gives companies, governments, and nonprofits the power to develop in-house expertise and satisfy employees’ hunger for learning and development.

Watch Online 49 lessons

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 49 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: Welcome
All Course Lessons (49)
#Lesson TitleDurationAccess
1
Welcome Demo
05:48
2
Who is this course for?
03:02
3
Course Outline
10:48
4
Backend Communication Design Patterns Intro
02:03
5
Request Response
27:38
6
Synchronous vs Asynchronous workloads
42:31
7
Push
20:00
8
Polling
14:14
9
Long Polling
10:12
10
Server Sent Events
13:19
11
Publish Subscribe (Pub/Sub)
16:38
12
Multiplexing vs Demultiplexing (h2 proxying vs Connection Pooling)
14:53
13
Stateful vs Stateless
22:43
14
Sidecar Pattern
21:34
15
Protocols Intro
01:09
16
Protocol Properties
10:48
17
OSI Model
47:30
18
Internet Protocol
01:07:13
19
UDP
48:23
20
TCP
55:12
21
TLS
27:00
22
HTTP/1.1
31:12
23
WebSockets
21:22
24
HTTP/2
17:04
25
HTTP/3
27:59
26
gRPC
49:11
27
WebRTC
01:07:45
28
HTTPS Communication Basics Intro
03:15
29
HTTPS over TCP with TLS 1.2
05:48
30
HTTPS over TCP with TLS 1.3
03:55
31
HTTPS over QUIC (HTTP/3)
02:24
32
HTTPS over TFO with TLS 1.3
01:56
33
HTTPS over TCP with TLS 1.3 and 0RTT
02:07
34
HTTPS over QUIC with 0RTT
01:47
35
Backend Execution Patterns Intro
04:49
36
The Process and The Thread and how they compete for CPU time
27:47
37
How The Backend Accepts Connections
29:31
38
Reading and Sending Socket Data
21:24
39
The Listener, The Acceptor and the Reader
02:07
40
Single Listener, Acceptor and Reader Thread Execution Pattern
03:08
41
Single Listener, Acceptor and Multiple Readers Thread Execution Pattern
05:32
42
Single Listener, Acceptor, Reader with Message Load Balancing Execution Pattern
03:28
43
Multiple Accepter Threads on a Single Socket Execution Pattern
01:59
44
Multiple Listeners, Acceptors and Readers with Socket Sharding Execution Pattern
06:49
45
Backend Idempotency
06:25
46
Nagle's Algorithm
12:09
47
Proxy vs Reverse Proxy
20:06
48
Layer 4 vs Layer 7 Load Balancers
27:52
49
How ChatGPT uses Server Sent Events
44:08
Unlock unlimited learning

Get instant access to all 48 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription