
Slashing costs and doubling speed by unifying fragmented data pipelines at Pinterest
This article explores Pinterest's comprehensive redesign of its user-sequence platform to optimize recommendation performance. It details the practical application of 'Configuration-as-Code' and Lambda Architecture to balance data freshness, consistency, and efficiency. It provides a blueprint for engineers building large-scale data engineering and ML infrastructure.
Highly recommended for engineers working on ranking and recommendation systems where real-time performance and data consistency are paramount. For data platform teams struggling with pipeline fragmentation, 'Configuration-as-Code' is a game-changer.
User-sequence data is critical for ranking and recommendation systems but is notoriously expensive and fragile to maintain at scale. Challenges included maintaining consistency between real-time serving and offline training, as well as the low productivity caused by needing bespoke pipelines for every new signal onboarding.
The platform was redesigned based on a 'One Definition, Many Runtimes' principle using Python-based Configuration-as-Code. Key implementations include a shared execution engine with pluggable executors, a lambda architecture for real-time and batch synchronization, and a columnar, time-partitioned storage layout for I/O efficiency.
The redesign led to significant reductions in infrastructure costs and dramatically improved developer productivity by speeding up signal onboarding. These technical improvements resulted in higher user engagement metrics on major surfaces while ensuring both data freshness and consistency.
Trade-off
Due to the nature of online systems, achieving a 100% data match with legacy systems was impossible, necessitating an acceptance of approximate consistency. Additionally, parallel operations of shadow pipelines during migration required temporary extra computing resources and operational overhead.
An ordered list of a user's recent actions combined with enriched signals like embeddings and metadata.
The practice of defining data filtering and enrichment logic as source code to be executed consistently across different runtimes.
A data-processing architecture that combines a real-time speed layer with a batch processing layer.




