Fundamentals of Backend Communications and Protocols

15h 35m 37s
English
Paid

Course description

Backend engineering is an art. During my 18 years career working with and building backend applications, I discovered that certain communication design patterns keep emerging. There are only handful of ways clients communicate with backend applications, although they might be more, I believe the patterns I discuss in this course are the most common. Examples of these patterns are request-response, publish-subscribe, short and long and push.

Read more about the course

Based on these communication design patterns, engineers may use a number of protocols for concrete communication. While core transport vehicles are limited to either TCP or UDP, tons of industry specific protocols are built on top of these two to address certain problems and use cases. Examples of these high level protocols are HTTP/1.1, HTTP/2, HTTP/3, gRPC, WebRTC and many more. Other transport protocols like QUIC was built on top of UDP to bring HTTP/2 streaming down at the transport level. Each protocol has its pros and cons and fits certain use cases. In the course, I discuss the top common protocols and provide examples and demos where applicable.

Before the client can send a request, it has to establish a connection to the backend. Understanding how the connection is established, and what parts of connection establishment is done at kernel and what parts are done at the backend application process is critical. How the connection is then accepted by the backend application and how it can accept connections as fast as possible so the kernel queue doesn’t get full otherwise clients can no longer connect.

After the connection is established the client sends the request, but what happens exactly in the backend application to read the request? What exactly is a request? Understanding the cost of parsing a request based on the protocol makes the engineer appreciate the work done and equip her with better tools to troubleshoot performance problems or bugs.

Once the request reaches the backend, the application has to execute the request. The backend has a buffet of design choices when it comes to the style of execution it can choose. Understanding the difference between a process and a thread, multi-process, multi-threaded and the correlation to the number of CPU cores or hardware threads is crucial to pick the right execution pattern. One does not have to stick with these patterns but can invent new ones that suits their needs.

This course is designed for engineers who have built backend applications, it is an intermediate — advance level course, certain programming and networking knowledge is required so I recommend taking my fundamentals of network engineering course before taking this course if you don’t have the networking skills. I hope you enjoy this course, and thank you so much for considering it.

Watch Online

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

Watch Online Fundamentals of Backend Communications and Protocols

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

Comments

0 comments

Want to join the conversation?

Sign in to comment

Similar courses

Building Full-Stack Apps with AI

Building Full-Stack Apps with AI

Sources: Mckay Wrigley (takeoff)
The course "Building Full-Stack Apps with AI" teaches how to create comprehensive applications using artificial intelligence, suitable for both beginners and...
8 hours 3 minutes 16 seconds
Complete ASP.NET MVC 5

Complete ASP.NET MVC 5

Sources: udemy
With over 40,000 happy students and 12,000+ positive reviews, this course is Udemy's most popular course for learning ASP.NET MVC! ASP.NET MVC is a server-side
7 hours 33 minutes 52 seconds
Clean Code: Writing Code for Humans

Clean Code: Writing Code for Humans

Sources: pluralsight
Anyone can write code a computer can understand, but professional developers write code *humans* can understand. Clean code is a reader-focused development styl
3 hours 10 minutes 36 seconds
PostgreSQL Replication, High Availability HA and Scalability

PostgreSQL Replication, High Availability HA and Scalability

Sources: udemy
PostgreSQL is one of the most powerful and user-friendly database management systems. It is actively supported by the community and receives new releases...
3 hours 9 minutes 35 seconds
Database Mastery: SQL to Prisma

Database Mastery: SQL to Prisma

Sources: jsmastery.pro, Adrian Hajdin
Master key technologies with a practical approach! You will gain applied knowledge, clear explanations, and all the necessary tools to confidently master...
16 minutes 3 seconds