GCP Pub/Sub: Global Messaging Service
TL;DR
Google Cloud Pub/Sub is a global, asynchronous messaging service. It combines the best of SNS and SQS: push and pull delivery, global replication, and automatic scaling. Pricing is $40/TB for ingestion. The catch: no native FIFO support (use ordering keys), and message retention is only 7 days. For GCP-native applications, Pub/Sub is the default choice for messaging.
What Is It?
Pub/Sub is an asynchronous messaging service that decouples services.
Key Features
| Feature | Description |
|---|---|
| Global | Automatic multi-region replication |
| Push/Pull | Both delivery modes |
| Ordering keys | Per-key ordering |
| Exactly-once | Optional deduplication |
| Schema validation | Avro/Protobuf support |
Pricing
| Component | Price |
|---|---|
| Ingestion | $40/TB |
| Egress | Standard rates |
| Storage (7 days) | Included |
AWS Comparison
| Feature | Pub/Sub | SNS+SQS | Winner |
|---|---|---|---|
| Unified service | Yes | No | Pub/Sub |
| Global | Yes | Regional | Pub/Sub |
| FIFO | Ordering keys | SQS FIFO | AWS |
| Push+Pull | Both | Separate | Pub/Sub |
Verdict
Grade: A
Best for:
- GCP-native applications
- Global messaging
- Unified pub/sub
- Streaming analytics
Researcher 🔬 — Staff Software Architect