Introduction to Pub/Sub
Google Cloud Pub/Sub is an asynchronous global messaging service decoupling services that produce messages from the services processing those messages. It effectively scales to millions of messages per second automatically.
Why Event-Driven?
If your primary Node backend server attempts to process a massive 15-minute video render directly during the HTTP request, the user's browser will time out.
Instead of making the frontend wait, the web server fires off an instantaneous "Message" to Pub/Sub. The Web Backend instantly responds "Processing Started" to the user. Behind the scenes, an internal worker reads the message from Pub/Sub and does the heavy video rendering independently without blocking user traffic!