Abstract
In today's analytics-driven world, fully replicated isolated databases provide much-needed database availability and compute scalability but at the cost of storage scalability, an issue that is addressed by partially replicated isolated databases. However, a partially replicated database that is optimal at the time of design is soon made inefficient by changing business needs, products & services it offers, datasets and query workloads. To address this issue, we introduce the notion of migration cost as an additional factor that influences the design of a partially replicated databases. In this paper, we formalize the notion of migration cost and present a new cost-based objective function to partition and allocate data elements across available databases. Further, we discuss its implementation in the context of Uber and demonstrate its effectiveness based on a 10-week simulation study.
Introduction
In large-scale big data analytics, the traditional "gold standard" for reliability has been the fully replicated isolated database architecture. In this configuration, every node in a database cluster maintains a complete copy of the entire dataset. While this approach ensures high availability and simplifies compute scalability by allowing queries to be distributed across any node, it creates a significant bottleneck for storage scalability.
For organizations like Uber, which utilize analytic engines such as Vertica, full replication leads to escalating licensing fees and hardware constraints as data volumes grow. Partially replicated databases, where nodes hold only specific subsets of data, offer a path forward. However, these systems often suffer from "drift"—as business needs and query patterns evolve, a static data distribution quickly becomes suboptimal.
Methodology: Migration-Aware Optimization
The core contribution of this work is the formalization of "ephemeral" partially replicated databases. Unlike static models, this framework treats data placement as a dynamic optimization problem that accounts for four key factors: availability, compute scalability, storage scalability, and, crucially, migration cost.
The Objective Function
The authors propose a cost-based objective function designed to minimize a linear combination of three metrics:
- Storage Utilization: Balancing disk usage across nodes to ensure efficiency.
- Compute Utilization: Distributing query workloads based on the processing capacity of each node.
- Migration Cost: Specifically penalizing the expensive process of writing new data elements to a node during rebalancing (as writing is significantly more resource-intensive than deletion).
The "10% Rule" for Practical Implementation
To handle the computational complexity of optimizing thousands of tables, the researchers applied a Pareto-inspired heuristic. By identifying that the top 10% of tables by size account for approximately 90% of total data volume, they focused their Mixed Integer Linear Optimization solely on these "heavy hitters." The remaining 90% of smaller tables are fully replicated, as the storage gains from partitioning them are negligible compared to the overhead of managing their placement.
Evaluation and Results
The framework was tested through a 10-week simulation using actual historical query logs from Uber’s production infrastructure, involving five homogenous Vertica databases and roughly 500,000 queries per week.
The results demonstrated significant improvements over the baseline fully replicated model:
- Storage Efficiency: The system recovered nearly 40% of total disk space. Individual nodes achieved median disk savings between 58% and 62%.
- Managed Migration: Weekly migration costs were kept between 0.07 TB and 1.5 TB, well within the operational threshold of 5 TB.
- Load Balancing: Query loads were evenly distributed, with each database handling approximately 20% of the total volume.
- Reliability: The "dropped query" rate (queries that could not be satisfied by a single node) was statistically insignificant, with a maximum of only 11 failures out of 500,000 queries in the worst week.
Conclusion
By treating migration as a first-class citizen in database design, this research provides a scalable method for maintaining efficient partially replicated systems in volatile business environments. Future work will focus on addressing the "cold start" problem for new tables and exploring more fluid, real-time rebalancing strategies to handle sudden query spikes.
Summary updated