We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

You're on assignment part 1/2 for this lesson.

Learn Pub/Sub Architecture

Pub/Sub (publish/subscribe) is a pattern software systems can use to communicate. It enables architectures that can be more:

  • Scalable
  • Reliable
  • Maintainable

In this course, we'll be learning about the advantages and disadvantages of Pub/Sub systems and how to build backend architectures that use them.

for Windows Users

If you try to complete this course without WSL 2 installed on Windows, you're gonna have a bad time.

What Is Pub/Sub?

Click to play video

Pub/Sub systems are the opposite of point-to-point systems. In point-to-point systems, the sender is painfully aware of the receiver. For example, an HTTP request is point-to-point. The client sends a request directly to the server, and the server sends a response directly back to the client.

Pub/Sub is a messaging pattern where senders of messages (publishers) do not send messages directly to receivers (subscribers). Instead, they just publish to a single broker. The publisher doesn't need to worry about who all the subscribers are. The broker is responsible for delivering a copy of the message to any interested subscribers.

Twitter (X) works like a Pub/Sub system. When you tweet, you don't individually list all of the followers you want to send your tweet to. Instead, you just tweet, and Twitter's servers deliver your tweet to all of your followers.