Pub/Sub (Publish-Subscribe)
A messaging pattern where publishers broadcast messages to topics without knowledge of subscribers, and subscribers receive messages from topics they have registered interest in, enabling loose coupling.
Pub/Sub decouples message producers from consumers through an intermediary topic. Publishers send messages to a named topic without knowing who will consume them. Subscribers register interest in specific topics and receive all messages published to those topics. Multiple subscribers can independently consume the same messages, each processing them differently.
Unlike point-to-point message queues where each message is consumed by exactly one consumer, pub/sub delivers each message to all subscribers of a topic. This fan-out pattern is ideal for broadcasting events that multiple systems need to process: a user signup event might simultaneously trigger a welcome email, analytics tracking, CRM update, and onboarding workflow.
For AI and growth systems, pub/sub enables real-time event processing at scale. User behavior events published to a topic can simultaneously feed a real-time feature pipeline, an analytics aggregation service, a recommendation model update, and a fraud detection system. Google Cloud Pub/Sub, AWS SNS, and Apache Kafka all support this pattern with different trade-offs in delivery guarantees and throughput.
Related Terms
A/B Testing
A controlled experiment comparing two or more variants to determine which performs better on a defined metric, using statistical methods to ensure reliable results.
Feature Flag
A software mechanism that enables or disables features at runtime without deploying new code, used for gradual rollouts, A/B testing, and targeting specific user segments.
MLOps
The set of practices combining machine learning, DevOps, and data engineering to reliably deploy, monitor, and maintain ML models in production.
Model Serving
The infrastructure and systems that host trained ML models and handle inference requests in production, optimizing for latency, throughput, and cost.
Semantic Search
Search that understands the meaning and intent behind a query rather than just matching keywords, typically powered by embedding-based similarity comparison.
CI/CD (Continuous Integration / Continuous Deployment)
An automated software practice where code changes are continuously integrated into a shared repository, tested, and deployed to production, reducing manual intervention and accelerating delivery cycles.