Overview
Direct Answer
Pub/Sub is an asynchronous messaging architecture in which decoupled applications communicate through intermediary topics, with publishers sending messages to topics and subscribers receiving only those messages they have explicitly subscribed to. This pattern enables many-to-many communication without direct knowledge of recipient endpoints.
How It Works
A message broker or cloud service maintains named topics as central channels. Publishers post messages to these topics without knowledge of subscribers; the broker then routes messages to all subscribed consumers independently. Subscribers connect to topics of interest and receive messages either immediately or from a retained backlog, depending on the system's retention policy and subscription configuration.
Why It Matters
This pattern decouples application components, enabling independent scaling, deployment, and failure isolation—critical for microservices architectures. Asynchronous delivery reduces latency-sensitive dependencies and allows organisations to process high-volume event streams reliably whilst maintaining system resilience during traffic spikes or component failures.
Common Applications
Real-time analytics ingestion, where events from multiple sources flow into a single topic for parallel processing; event-driven notification systems that alert multiple teams; IoT sensor data distribution across analytics, logging, and alerting pipelines; and inventory or order management systems where multiple downstream services react to state changes.
Key Considerations
Exactly-once delivery semantics and message ordering guarantees vary significantly across implementations, requiring careful evaluation against application requirements. Late subscribers may miss historical messages unless retention or replay mechanisms are explicitly configured.
More in Cloud Computing
Multi-Cloud
Strategy & EconomicsA strategy using services from multiple cloud providers to avoid vendor lock-in and optimise capabilities.
Infrastructure as a Service
Service ModelsCloud computing model providing virtualised computing resources like servers, storage, and networking over the internet.
Cloud-Native Development
Service ModelsAn approach to building applications that fully exploit cloud computing advantages including microservices, containers, dynamic orchestration, and continuous delivery.
Green Cloud Computing
Service ModelsCloud computing practices that minimise environmental impact through renewable energy usage, efficient cooling, workload consolidation, and carbon-aware scheduling of compute tasks.
Software as a Service
Service ModelsCloud computing model that delivers software applications over the internet on a subscription basis.
Container
InfrastructureA lightweight, portable software package that bundles application code with all its dependencies for consistent execution.
Cloud Workload Protection
Strategy & EconomicsSecurity solutions designed to protect server workloads running in cloud environments, providing vulnerability management, runtime protection, and compliance monitoring.
Spot Instances
Service ModelsSpare cloud computing capacity offered at steep discounts compared to on-demand pricing, available when the provider has excess resources but subject to interruption.