What is a pub-sub system?

Publish-subscribe messaging, often known as pub-sub messaging, is an asynchronous service-to-service communication method that’s popular in serverless and microservices architectures. Messages can be sent asynchronously to different subsystems of a system using the pub-sub system. All the services subscribed to the pub-sub model receive the message that’s pushed into the system.

For example, when Cristiano Ronaldo, a famous athlete, posts on Instagram or shares a Tweet, all of his followers are updated. Here, Cristiano Ronaldo is the publisher, his post or Tweet is the message, and all of his followers are subscribers.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.