Skip to main content

Fundamentals of Backend Engineering

16h 53m 4s
English
Paid

Backend engineering is an art. Throughout my 18-year career of working with and building backend applications, I've discovered that certain communication design patterns consistently emerge. While there might be several ways for clients to communicate with backend applications, I believe the patterns discussed in this course are the most prevalent. These patterns include request-response, publish-subscribe, short and long polling, and push mechanisms.

Communication Design Patterns in Backend Engineering

Based on these communication design patterns, engineers can utilize numerous protocols for effective communication. Although core transport vehicles are limited to either TCP or UDP, a variety of industry-specific protocols have been developed atop these to address particular problems and use cases. Examples of these high-level protocols include HTTP/1.1, HTTP/2, HTTP/3, gRPC, WebRTC, and many others. For instance, the QUIC protocol, which was built on UDP, aims to enhance HTTP/2 streaming at the transport level. Each protocol comes with its own advantages and disadvantages, making it suitable for specific scenarios. In this course, I explore the most common protocols, offering examples and demonstrations where applicable.

Connection Establishment in Backend Applications

Before a client can send a request, it must establish a connection to the backend. It's crucial to understand how this connection is established, which parts of the connection process are managed by the kernel, and which are handled by the backend application process. Understanding how the backend application accepts connections speedily is vital to prevent the kernel queue from filling up, which would prevent further client connections.

Request Handling in Backend Applications

After the connection is established, the client sends a request. But what happens exactly within the backend application to process this request? Understanding what constitutes a request and the cost of parsing it based on the protocol equips engineers with better tools for troubleshooting performance issues or bugs. Appreciating the work involved in parsing requests is crucial for effective backend engineering.

Execution Styles in Backend Development

Once the request reaches the backend, the application must execute it. There is a wide array of design choices available regarding execution styles, including the use of processes, threads, multi-processing, and multi-threading. The choice of execution style should consider the number of CPU cores or hardware threads. Understanding these differences is essential for selecting the right execution pattern, although one can always innovate new patterns tailored to specific needs.

Course Requirements and Recommendations

This course is designed for engineers who have experience building backend applications. It is an intermediate to advanced level course, requiring certain programming and networking knowledge. If you lack the necessary networking skills, I recommend taking my "Fundamentals of Network Engineering" course before embarking on this one. I hope you find this course enjoyable and beneficial. 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 53 lessons

This is a demo lesson (10:00 remaining)

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

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

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

Learn more about subscription