Operation

Building resilient and scalable systems with Google Cloud Pub/Sub

Imagine a person trying to play all the instruments in a musical ensemble simultaneously. While this image is amusing, it illustrates a significant problem in software architecture: systems that lack scalability. Much like a solo musician cannot simply incorporate new instruments, take a break, or perform complex compositions, tightly coupled software systems face challenges when adapting and expanding.

This is precisely where Google Cloud Pub/Sub comes into play. It enables the construction of resilient and scalable systems by decoupling services and facilitating asynchronous communication. In this blog post, we examine the challenges of traditional architectures and how Pub/Sub provides a suitable solution.

The Challenges of Traditional Architectures

Traditional monolithic or client-server architectures often struggle with scalability, flexibility, and maintainability. These architectures, where components are tightly coupled, can lead to bottlenecks as user demand increases. Their centralised nature creates single points of failure and increases the risk of outages. Furthermore, modifying a monolithic system often requires the complete redeployment of the application, making updates complex and time-consuming.

Whilst microservices improve scalability by distributing workloads, they introduce new challenges, such as increased network latency, inter-service communication overhead, and data consistency issues in high-concurrency environments. As the number of services grows, improper load management or inefficient service orchestration can lead to performance degradation. Ensuring synchronisation across multiple distributed components remains a central challenge, particularly in scenarios with high-frequency updates.

Event-Driven Architecture as a Solution

Event-driven architecture (EDA) offers an alternative approach. In an EDA, microservices communicate via events, such as “order dispatched” or “product price changed”. This decoupling, enabled by a messaging platform like Google Cloud Pub/Sub, allows services to operate independently and respond to events as soon as they occur.

Key benefits of EDA include:

  • Loose Coupling: Services are independent and can be updated or scaled without affecting others.

  • Improved Agility: New services can be easily added, and existing ones modified or replaced.

  • Asynchronous Eventing: Events are processed asynchronously, which improves performance and responsiveness.

  • Fault Tolerance: If one service fails, the others continue to function.

Google Cloud Pub/Sub: The Power of Decoupling

Google Cloud Pub/Sub is a scalable, flexible, and reliable messaging service that facilitates communication between different applications and services using asynchronous messaging. It follows the principles of event-driven architecture, which promotes loose coupling between software components. This decoupling is achieved by separating services that generate messages (publishers) from those that consume them (subscribers). Publishers send messages to Pub/Sub topics without knowing which subscribers will receive them. Conversely, subscribers express interest in specific topics and receive messages from those topics without knowing which publishers sent them.

Key features of Google Cloud Pub/Sub include:

  • Topics and Subscriptions: Publishers send messages to topics, and subscribers create subscriptions to topics to receive messages.

  • Push and Pull Delivery: Subscribers can either retrieve messages from Pub/Sub (pull) or have them delivered by Pub/Sub (push), depending on your architecture.

  • Filtering: Subscribers can filter messages based on attributes to receive only the messages they are interested in.

  • Retry: Messages can be resent to subscribers for a configured period of time.

  • Dead-Letter Topics: Undeliverable messages can be sent to a dead-letter topic for further analysis.

  • Exactly-Once Delivery: Pub/Sub can guarantee that messages are delivered to subscribers exactly once, in addition to conventional at-least-once delivery.

Overall, Google Cloud Pub/Sub is a powerful tool for building event-driven architectures and enabling communication between loosely coupled services. Its scalability, flexibility, and reliability make it a popular choice for a wide variety of applications.

Practical Use Cases

Pub/Sub is used in a wide variety of applications, including:

  • Data Streaming: Ingesting user interactions and server events for analysis.

  • Real-Time Systems: Distributing events for real-time processing.

  • Cross-Service Communication: Enabling communication between microservices in large-scale applications.

For example, a customer behavioural data platform could use Pub/Sub to collect and process user interaction events in real time, enabling personalised experiences and business insights.

Case Study: Customer Behavioural Data Platform

This case study centres on building a customer behavioural data platform. The challenge was to handle a massive influx of data: billions of events, millions of users, and terabytes of data. To address this, we developed “Avalanche”, a customer behavioural data platform based on Google Cloud Pub/Sub.

Challenges:

  • Scalability: Processing billions of events, millions of users, and terabytes of data.

  • Real-Time Processing: The need for data ingestion and processing in real time.

  • GDPR Compliance: Ensuring data privacy and compliance with GDPR regulations.

  • Cost Efficiency: Keeping costs low whilst operating a large-scale platform.

  • Data Quality: Maintaining high-quality customer data.

Implementation Details

The following components are used:

  • Data Ingestion: To capture user interaction events (e.g. page visits)

  • Stream Processing: To enrich and process the events in real time.

  • Google Cloud Pub/Sub: To enable event-driven communication and event streaming between the various components

  • Data Warehousing: Processed data is delivered to GCP BigQuery for further enrichment and distributed to dashboards  

Key Results:

Following the implementation of “Avalanche”, our behavioural data platform, with our client, we observed remarkable progress in data processing efficiency and business results. In particular, the following significant results were documented in December 2024:

  • 100k Monthly Users: The platform processes data for a substantial user base.

  • 8 Million Monthly Events: 500 events per minute during peak times

  • 56 GB Ingested Data: The platform scales to gigabytes of data and can handle even more

  • <150ms Latency: Real-time platform from data ingestion to the warehouse 

  • ~£5/€5 Pub/Sub Cost: The cost of Pub/Sub usage was relatively low.

Key Learnings:

  • Understanding the Customer: The importance of thoroughly understanding your customers.

  • Architecture and Design: Choosing the right architecture and design patterns.

  • Tool Proficiency: Proficiency in working with the chosen tools (Google Cloud Pub/Sub and related services).

Avalanche is a real-world example of how Google Cloud Pub/Sub can be leveraged to build a scalable, real-time data processing system. It highlights the advantages of Pub/Sub in handling large volumes of data, ensuring low latencies, and maintaining cost efficiency.

Summary

Google Cloud Pub/Sub offers a robust solution for overcoming the limitations of traditional architectures, enabling the development of resilient, scalable, and event-driven systems. By decoupling services and supporting asynchronous communication, Pub/Sub facilitates real-time data streaming, efficient cross-service communication, and compliance with data regulations. Its versatility and scalability make it a valuable tool for modern cloud-based applications.

Would you like to learn more about what we offer? Visit our website at https://www.happtiq.com/avalanche 

Further insights

Ready for the future? Let's talk!

Send us your enquiry and together we'll take your business to the cloud!

Our Partner Ecosystem

© 2026 happtiq. All rights reserved.

Ready for the future? Let's talk!

Send us your enquiry and together we'll take your business to the cloud!

Our Partner Ecosystem

© 2026 happtiq. All rights reserved.

Ready for the future? Let's talk!

Send us your enquiry and together we'll take your business to the cloud!

Our Partner Ecosystem

© 2026 happtiq. All rights reserved.