Google Events Analysis
Pub/sub
- Scalability: Google Pub/Sub is designed to handle large volumes of messages and can scale to meet high-demand scenarios.
- Durability: Messages published to Pub/Sub are persisted and retained until acknowledged by subscribers.
- Ordering: Messages can be published and consumed in the order they were sent.
- At-least-once delivery: Pub/Sub ensures that messages are delivered at least once to subscribers.
Pricing:
https://cloud.google.com/products/calculator/
| Events size / Day | Total Subscribers | Amount / Month |
|---|---|---|
| 1 GB | 30 | $37.97 |
| 2 GB | 50 | $124.25 |
| 2 GB | 1000 | $2,381.74 |
Cloud Tasks
- Task execution: Cloud Tasks lets you define tasks with payloads and schedule them for execution.
- Retries and backoff: It supports automatic retries and configurable exponential backoff for failed tasks.
- Task queues: Cloud Tasks allows you to create task queues and control the rate at which tasks are processed.
Pricing:
https://cloud.google.com/tasks/pricing
| Billable operations / Month | Price / Million |
|---|---|
| First 1 million | Free |
| Up to 5 billion | $0.40 |
| More than 5 billion | Contact sales |
For pricing purposes, cloud tasks are chunked by size (32KB). For example, adding a task of 96KB to a queue produces 3 billable operations, so it is billed the same way as adding 3 separate tasks under 32KB each to the queue. This holds true for all other API calls and push delivery attempts.
Cloud Events
- Portability: Cloud Events promotes interoperability between different event-driven systems and simplifies integration.
- Standardization: It provides a consistent way to represent events across different services and platforms.
- Extensibility: Cloud Events allows you to extend the core event data with custom attributes.
Eventarc
Eventarc aims to deliver events from various Google, Google Cloud, and 3rd party event sources to Google Cloud event destinations.
Events are normalized to CloudEvents v1.0 format for cross-service interoperability. CloudEvents is a vendor-neutral open spec describing event data in common formats, enabling interoperability across services, platforms, and systems.

How Eventarc works:
- Event Ingestion: Event sources generate events based on specific actions or changes. These events are then published to Eventarc.
- Event Delivery: Eventarc routes the events to the appropriate triggers based on the defined relationships between event sources and targets.
- Trigger Execution: When an event matches the criteria defined in a trigger, the associated target service (Cloud Function, Cloud Run, or Cloud Workflow) is executed, and the event data is delivered to the specified destination.
**Eventarc vs PubSub: **
- Eventarc: Eventarc is a relatively new service from Google Cloud that allows you to build event-driven architectures by easily connecting different Google Cloud services with each other or with your custom applications. Eventarc is designed to be a trigger delivery service, which means it delivers events from various sources to Google Cloud Run, Cloud Functions, or Cloud Workflows. It's mainly focused on event sources within Google Cloud or CloudEvents-compliant sources.
when to use event arc?
- You want to create event-driven applications within Google Cloud.
- You need to respond to events from various Google Cloud services or CloudEvents-compliant sources.
- You want a serverless and easy-to-use solution for triggering serverless functions (Cloud Functions or Cloud Run) in response to events.
- Pub/Sub: Google Cloud Pub/Sub is a fully-managed messaging service that enables you to build event-driven systems where applications can communicate and exchange data asynchronously. It is more general-purpose and can be used as a messaging backbone for various types of applications and services.
when to use pub/sub?
- You require a messaging system for building decoupled and scalable applications.
- You need to process messages at scale and distribute them to multiple subscribers.
- You want to enable communication and data exchange between different components or services in your architecture.
In summary, Eventarc is more focused on triggering serverless functions in response to events within Google Cloud or CloudEvents-compliant sources, while Pub/Sub is a general-purpose messaging service that facilitates communication and event exchange between various components in your architecture. Depending on your specific use case and requirements, you might choose one or both services in your event-driven architecture. Always review the latest documentation and consider your project's specific needs when making a decision.