We may earn an affiliate commission when you visit our partners.
Hussein Nasser

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

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.

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.

Enroll now

What's inside

Learning objectives

  • Learn the fundamentals of backend engineering
  • Backend communication design patterns
  • Understand how backend communication protocols work
  • Comprehend how os kernel communicate with backend applications
  • Operating system fundamentals (thread, process, async io in linux)
  • Learn http/1.1, http/2, http/3
  • Learn grpc, webrtc, websockets
  • Learn tls 1.2, tls 1.3, quic 0rtt

Syllabus

Repro: https://github.com/hnasr/backend-course-code


Learning a common design patterns for a solid backend architecture
Backend Communication Design Patterns Intro
Read more
Introduction
Welcome
Who is this course for?
Course Outline
Course Notes
Request Response
Synchronous vs Asynchronous workloads

We explain what Push is, how does it work, its pros and cons, and then we build a web socket chatting application using Push model

Polling
Long Polling

In this lecture we discuss Server Sent Events pattern and show an example in NodeJS

In this lecture I talk about the publish subscribe pattern, its pros and cons and show an example with RabbitMQ

Multiplexing vs Demultiplexing (h2 proxying vs Connection Pooling)
Stateful vs Stateless
Sidecar Pattern
Popular protocols choice for backend communications and how they work
Protocols Intro

What to take into account when designing a protocol?

Open Systems Interconnection model - this lecture is taken from my networking course.



This is a collection of lectures specific to IP protocol taken from my fundamentals of network engineering course merged into one lecture.

User Datagram Protocol - This is a collection of lectures specific to UDP protocol taken from my fundamentals of network engineering course merged into one lecture.



Transmission Control Protocol - This is a collection of lectures specific to TCP protocol taken from my fundamentals of network engineering course merged into one lecture.



Transport Layer Security - This is a collection of lectures specific to TLS protocol taken from my fundamentals of network engineering course merged into one lecture.






HTTP/1.1
WebSockets
HTTP/2
HTTP/3
gRPC
WebRTC
How each HTTPS method affect latency
HTTPS Communication Basics Intro
HTTPS over TCP with TLS 1.2
HTTPS over TCP with TLS 1.3
HTTPS over QUIC (HTTP/3)
HTTPS over TFO with TLS 1.3
HTTPS over TCP with TLS 1.3 and 0RTT
HTTPS over QUIC with 0RTT
How Backends accept, dispatch and execute requests
Backend Execution Patterns Intro
The Process and The Thread and how they compete for CPU time

In this lecture we explain the SYN and ACCEPT queues in the OS and how the backend reads from them

In this lecture we explain the Receive and Sender queues in the OS and how the backend reads and writes to them

The Listener, The Acceptor and the Reader
Single Listener, Acceptor and Reader Thread Execution Pattern
Single Listener, Acceptor and Multiple Readers Thread Execution Pattern
Single Listener, Acceptor, Reader with Message Load Balancing Execution Pattern
Multiple Accepter Threads on a Single Socket Execution Pattern
Multiple Listeners, Acceptors and Readers with Socket Sharding Execution Pattern
Backend Idempotency
Nagle's Algorithm
When do you use threads?
Core of backend engineering
Proxy vs Reverse Proxy
Layer 4 vs Layer 7 Load Balancers
Extras

This is a video from my YouTube channel that I thought it's useful to add it here.


Code https://github.com/hnasr/javascript_playground/tree/master/chatgpt-twochats

How I design software
The Journey of a Request to the Backend
The Journey of a Request to the Backend (Video)
JSON Web Token (JWT), its Pros and Cons
SELECT COUNT (*) can impact your Backend Application performance, here is why
Answering Your Questions
How does the Kernel manage backend connections?
Running out of TCP Ports

Save this course

Save Fundamentals of Backend Engineering to your list so you can find it easily later:
Save

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in Fundamentals of Backend Engineering with these activities:
Review TCP/IP Fundamentals
Solidify your understanding of TCP/IP, which is crucial for understanding how backend systems communicate.
Browse courses on TCP/IP
Show steps
  • Review the OSI model and the role of each layer.
  • Study the TCP handshake process.
  • Understand IP addressing and routing.
Read 'High Performance Browser Networking'
Learn how network protocols impact backend performance and how to optimize your systems for web applications.
Show steps
  • Read the chapters on TCP and TLS.
  • Study the sections on HTTP/2 and QUIC.
  • Experiment with different network configurations to measure performance.
Read 'Designing Data-Intensive Applications'
Gain a deeper understanding of the principles behind building robust and scalable backend systems.
View Secret Colors on Amazon
Show steps
  • Read the chapters on data storage and retrieval.
  • Study the sections on distributed systems and consensus.
  • Consider how the concepts apply to your own projects.
Four other activities
Expand to see all activities and additional details
Show all seven activities
Build a Simple REST API
Practice implementing the request-response pattern by building a REST API with a framework like Flask or Express.
Show steps
  • Choose a framework and set up a development environment.
  • Define API endpoints and data models.
  • Implement request handling and data persistence.
  • Test the API endpoints with tools like Postman.
Write a Blog Post on HTTP/3
Deepen your understanding of HTTP/3 by researching and writing a blog post explaining its features and benefits.
Show steps
  • Research the QUIC protocol and HTTP/3 specifications.
  • Outline the key features and advantages of HTTP/3.
  • Write a clear and concise blog post explaining the concepts.
  • Include diagrams and examples to illustrate the points.
Implement different backend execution patterns
Reinforce your understanding of backend execution patterns by implementing them in a programming language of your choice.
Show steps
  • Implement single-threaded, multi-threaded, and multi-process patterns.
  • Measure the performance of each pattern under different workloads.
  • Analyze the trade-offs between different patterns.
Contribute to an Open Source Backend Project
Gain practical experience by contributing to an open-source backend project, improving your understanding of real-world challenges.
Show steps
  • Find an open-source project that aligns with your interests.
  • Familiarize yourself with the project's codebase and contribution guidelines.
  • Identify a bug or feature to work on.
  • Submit a pull request with your changes.

Career center

Learners who complete Fundamentals of Backend Engineering will develop knowledge and skills that may be useful to these careers:
Backend Developer
A backend developer builds and maintains the server side logic and databases that power applications. This role involves designing, implementing, and testing robust and scalable APIs. Knowledge of backend communication design patterns, as covered in this course, is essential for crafting efficient and reliable systems. The 'Fundamentals of Backend Engineering' course helps one to understand request processing, execution patterns, and protocol choices such as HTTP/2, HTTP/3, and gRPC to optimize backend performance. The course's coverage of OS kernel communication and thread/process management directly applies to optimizing application performance.
API Developer
An API developer specializes in designing, building, and maintaining application programming interfaces that enable different software systems to communicate. The 'Fundamentals of Backend Engineering' course offers an understanding of backend communication patterns and protocols, essential for building efficient and reliable APIs. The course’s content on HTTP versions, gRPC, and request/response models will help an API developer make informed choices. Learning the protocols, such as WebRTC, WebSockets, and gRPC, are beneficial for building complex systems.
Software Architect
Software architects design the high level structure of software systems. This role requires a deep understanding of various architectural patterns and communication protocols. The 'Fundamentals of Backend Engineering' course offers insights into backend communication design patterns, helping a software architect make informed decisions about system design. The course's exploration of protocols like HTTP/2 and gRPC, along with topics like request-response and publish-subscribe, are relevant to designing scalable, efficient, and maintainable systems. An understanding of request processing and execution patterns is critical in software architecture.
Full-Stack Developer
Full stack developers are proficient in both front end and backend development. They are comfortable working with databases, servers, systems engineering, and clients. The 'Fundamentals of Backend Engineering' course enhances a full stack developer's backend development skills. In addition, the full stack developer will understand request processing, execution patterns, and protocol choices, such as HTTP/2, HTTP/3, and gRPC, to optimize backend performance. The course coverage of OS kernel communication and thread/process management directly applies to application performance.
Performance Engineer
Performance engineers analyze and optimize the performance of software systems to ensure they meet specified requirements. The 'Fundamentals of Backend Engineering' course is directly relevant to this role because it focuses on backend performance optimization. The course’s coverage of connection management, request parsing, and execution patterns is useful for identifying and addressing performance bottlenecks. The course’s material on OS kernel interaction and threading models may help a performance engineer fine-tune backend systems for optimal efficiency.
Site Reliability Engineer
Site reliability engineers focus on ensuring the reliability, availability, and performance of software systems in production. Understanding backend architecture and communication protocols is essential for troubleshooting issues. These include monitoring system performance, and implementing automation to prevent outages. The 'Fundamentals of Backend Engineering' course helps one understand backend communication design patterns and protocols, which are useful for identifying and addressing reliability issues. The course’s detail on communication protocols is relevant to ensure the backend is reliable and performant.
Solutions Architect
Solutions architects design and oversee the implementation of complex systems that solve business problems. A key aspect of this role is understanding how different components of a system interact, especially the backend. This 'Fundamentals of Backend Engineering' course is useful because it focuses on backend communication design patterns and protocols, which are critical for designing scalable solutions. The course content on connection management, request parsing, and execution patterns can aid a solutions architect in making informed decisions about system architecture. Knowledge of communication pattern topics like publish-subscribe is particularly relevant to integration architecture.
Technical Lead
Technical leads guide a team of developers, making technical decisions and ensuring the team follows best practices. In order to effectively lead a backend development team, a technical lead must understand backend architecture and communication protocols. The 'Fundamentals of Backend Engineering' course will help one understand backend communication design patterns and protocols. Furthermore, the coverage of topics like request processing, execution patterns, and kernel communication is useful for guiding technical decisions. It is also useful for a technical discussions.
DevOps Engineer
DevOps engineers automate and streamline the software development lifecycle, often focusing on deployment, monitoring, and infrastructure management. Understanding backend architecture and communication protocols is crucial for optimizing application performance and reliability. The 'Fundamentals of Backend Engineering' course provides in-depth knowledge of backend execution patterns, kernel communication, and protocols like HTTP/3 and gRPC, which are important for a DevOps engineer. The course covers essential concepts related to how backends accept, dispatch, and execute requests. Such knowledge assists a DevOps engineer in troubleshooting and optimizing the backend.
Cloud Engineer
Cloud engineers manage and maintain cloud computing infrastructure, ensuring scalability, reliability, and performance. The 'Fundamentals of Backend Engineering' course enhances a cloud engineer's knowledge of backend systems. This knowledge may improve the ability implement and manage backend services in the cloud. The course highlights backend execution patterns, kernel communication, and various protocols such as HTTP/3 and gRPC. This helps cloud engineers optimize backend application performance and resource utilization.
Systems Engineer
Systems engineers are responsible for the design, implementation, and management of an organization's IT infrastructure. This often includes servers, networks, and storage systems. To ensure smooth operations, a systems engineer greatly benefits from knowing how backend applications function and communicate. The 'Fundamentals of Backend Engineering' course provides a comprehensive overview of backend communication patterns, protocols, and execution models. The course material on connection establishment, request parsing, and OS kernel interaction is particularly useful for this role. Understanding how the kernel manages connections and resources, as taught in the course, can help a systems engineer optimize system performance and reliability.
Application Security Engineer
Application security engineers focus on identifying and mitigating security vulnerabilities in software applications. This role requires knowledge of backend architecture, communication protocols, and common attack vectors. The 'Fundamentals of Backend Engineering' course can contribute to the understanding of backend communication protocols. This is essential for securing backend applications. Knowledge of TLS and HTTPS are key for this role. Additionally, knowledge of communication patterns are beneficial for designing secure systems.
Network Engineer
Network Engineers design, implement, and manage an organization's network infrastructure. The 'Fundamentals of Backend Engineering' course provides a detailed look into backend systems. This background may be valuable for optimizing network performance for backend applications. This course improves the troubleshooting ability of the Network Engineer. Ultimately, a Network Engineer uses their skills to provide a more secure and robust network for their backend systems to communicate on.
Security Architect
Security architects design and implement security measures to protect computer systems, networks, and data. A good understanding of backend systems and their communication protocols are critical for identifying and mitigating potential security vulnerabilities. The 'Fundamentals of Backend Engineering' course may improve a security architect's understanding of common backend protocols, such as TLS and HTTPS. Additionally, it covers connection management, which is useful for securing backend applications. The course strengthens the ability of a security architect to secure the backend.
Database Administrator
Database administrators manage and maintain databases, ensuring their integrity, security, and performance. Knowledge of how backend applications interact with databases is essential for optimizing database performance and troubleshooting issues. The 'Fundamentals of Backend Engineering' course may help a database administrator understand how backend applications send requests, process data, and manage connections. This course is useful because it covers concepts relevant to database interactions. This improves the ability of database administrators.

Reading list

We've selected two books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Fundamentals of Backend Engineering.
Provides a comprehensive overview of the challenges and solutions involved in building scalable and reliable backend systems. It covers topics such as data storage, data processing, and distributed systems. It valuable resource for understanding the complexities of modern backend architectures. This book is often used as a reference by industry professionals.
Dives deep into the underlying protocols and mechanisms that affect web performance. It covers topics such as TCP, TLS, HTTP/2, and QUIC. It valuable resource for understanding how to optimize backend systems for web applications. This book is particularly helpful for understanding the nuances of network protocols and their impact on application performance.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Similar courses are unavailable at this time. Please try again later.
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser