gcp Google Cloud Blog ·

Sharded Hub-and-Spoke Architecture for Multi-Tenant Data Platforms

blogdatainfragcpengineergcp-bigquerygcp-cloud-storagegcp-pubsubgcp-dataflow
announcement

This article introduces a sharded hub-and-spoke architecture to mitigate the 'noisy neighbor' problem in multi-tenant data platforms, where a single tenant's performance issues can impact others. By decoupling processing into isolated 'spokes' managed by a central 'hub', this pattern enhances fault tolerance and allows for independent scaling. The approach uses Pub/Sub for buffering and Dataflow for isolated execution, benefiting SaaS providers and enterprises by ensuring SLA stability and reducing resource waste.

  • Solution: Sharded Hub-and-Spoke Architecture
  • Problem: Monolithic Architecture Bottlenecks in Shared Data Platforms
  • Benefits of Hub-and-Spoke vs. Monolithic Architecture
  • Implementation Pro-Tips for Sharded Architecture
  • Conclusion: Improved Resilience and Scalability
Features (1)
  • Solution: Sharded Hub-and-Spoke Architecture

    The proposed solution decouples processing into a 'hub' for routing and 'spokes' for isolated execution. This pattern utilizes a lightweight Dataflow job as a router, Pub/Sub topics for durable buffering, and multiple, smaller Dataflow instances categorized by workload (e.g., high-priority, shared, domain-specific) for isolated processing.

Enhancements (2)
  • Benefits of Hub-and-Spoke vs. Monolithic Architecture

    The sharded architecture offers isolated fault tolerance, with failures contained to a specific spoke rather than affecting the entire platform. It enables independent scaling per tenant load, independent domain updates without global impact, and reduces the blast radius of failures significantly compared to monolithic designs.

  • Implementation Pro-Tips for Sharded Architecture

    Key optimizations include implementing Dead Letter Queues (DLQs) for failed records, using strict connection pooling with low MaximumPoolSize per worker to avoid database exhaustion, and leveraging asynchronous I/O with transforms like GroupIntoBatches to buffer writes and reduce connection overhead.

Notes (2)
  • Problem: Monolithic Architecture Bottlenecks in Shared Data Platforms

    Legacy monolithic architectures process data for all tenants through a single, unified stream. A performance issue with one database tenant can create back pressure, degrading performance for every other tenant and leading to 100% blast radius, inefficient scaling, and SLA instability.

  • Conclusion: Improved Resilience and Scalability

    Adopting a sharded hub-and-spoke approach provides the necessary isolation to protect multi-tenant platforms from 'noisy neighbors'. This architecture ensures strict SLAs, allows for independent scaling, and facilitates safer deployments.

Read the original announcement →

https://cloud.google.com/blog/products/data-analytics/solving-the-noisy-neighbor-with-sharded-architecture/

Related releases