Whether you are a multi-tenant SaaS provider, a large enterprise managing internal data platforms, or a company handling mixed-workload data processing, managing a shared infrastructure environment means facing a common threat: the ‘noisy neighbor’. A single tenant with a massive data burst or a failing database instance can bring down the entire neighborhood, manifesting as significant backlog accumulation and global Service Level Agreement (SLA) violations across critical data pipelines
Here is how to transition from a monolithic architecture to a sharded hub-and-spoke pattern to ensure platform resilience.
The problem: The monolithic bottleneck
A typical legacy architecture processes data for all tenants and business domains through a single, massive stream. Because the pipeline is unified, a performance issue with one specific database tenant instance creates back pressure that degrades performance for every other tenant on the platform.
Painful effects:
-
100% Blast radius: One database failure can stop all processing.
-
Inefficient scaling: Resources often have to be scaled for the “worst-case” tenant, leading to significant wasted spend.
-
SLA instability: Maintaining a global SLA is nearly impossible when one high-volume tenant can lag the entire system.
The solution: sharded hub-and-spoke architecture
To solve this, processing is decoupled into a “hub” for routing and “spokes” for isolated execution.

1. The hub: The router pipeline
The Hub is a lightweight Dataflow job that acts as a traffic controller. It reads from unified source topics, parses the Tenant ID or Business Domain, and fans the data out into isolated buffers. This keeps the entry point simple and robust.
2. The buffer: Durable isolation
Pub/Sub topics are introduced between the Hub and the Spokes. These act as a durable shock absorber, preventing a slow downstream sink from backing up the original source.
3. The spokes: Isolated execution
Instead of one giant pipeline, multiple, smaller Dataflow instances are deployed and categorized by workload:
-
Tier 1 (high-priority): Dedicated pipelines with high resource allocation for critical tenants.
-
Shared tiers: Grouped pipelines for smaller tenants to optimize costs.
-
Domain specific: Specialized pipelines for complex logic (e.g., separating distinct business domains) to isolate code complexity.
Comparative Benefits at a Glance
|
Feature |
Monolithic (legacy) |
Hub-and-spoke |
|
Fault tolerance |
One failing DB stops everything |
Failures isolated to specific spoke |
|
Blast radius |
100% |
< 5% (Isolated to one spoke) |
|
Resource scaling |
Scaled for “worst-case” |
Independent scaling per tenant load |
|
Maintenance |
Global updates affect everyone |
Update one domain without touching others |
Pro-Tips for Implementation
Moving to this architecture is more than just shifting boxes on a diagram. Additional “Spoke” level optimizations are recommended for maximum stability:
-
Implement Dead Letter Queues (DLQ): Do not let a single SQL exception stall the pipeline. Route failed records to storage (like BigQuery or Google Cloud Storage) for later investigation.
-
Strict connection pooling: Databases have connection limits. Use a thread-safe singleton pattern and set a low MaximumPoolSize (e.g., 1-2) per worker to avoid exhausting the database during autoscaling.
-
Asynchronous I/O: Use the GroupIntoBatches transform to buffer writes, which reduces the connection overhead that often triggers database-induced latency.
Conclusion
By adopting a sharded approach, platforms can guarantee that a “noisy neighbor” is no longer a threat to the neighborhood. This architecture provides the isolation needed to maintain strict SLAs while allowing for independent scaling and safer deployments
To learn more about implementing a sharded hub-and-spoke architecture, explore the Dataflow documentation.



