Pinterest’s Moka: A Revolutionary Shift in Data Processing
In the fast-evolving world of data processing, Pinterest is making headlines with the launch of its new platform, Moka. In a recently published article, Pinterest offers an in-depth look at its ambitious blueprint for future data processing, designed to transition from legacy systems to a robust, cloud-native architecture.
The Shift from Hadoop to Kubernetes
For many organizations, choosing the right infrastructure for data processing can be daunting, particularly as the limitations of older systems become apparent. Pinterest’s internal Hadoop infrastructure, known as Monarch, was reaching its limits. Consequently, the Big Data Platform team, led by Soam Acharya, Rainie Li, William Tom, and Ang Zhang, embarked on a journey to find a next-generation platform capable of handling massive-scale data processing. The solution? A Kubernetes-based system running on Amazon EKS, with Apache Spark as its primary processing engine.
This move reflects a broader industry trend where major tech companies are adopting Kubernetes not just as a stateless service platform, but as a control plane for data. Moka’s design emphasizes the modern requirements of scalability, security, and cost-efficiency while accommodating multiple processing engines, making it a future-proof solution.
Key Features of Moka’s Infrastructure
The structure of Moka is designed with operational efficiency in mind. The team’s second blog post dives into the infrastructure-specific aspects, focusing on how to run Spark effectively at scale on Kubernetes. Pinterest engineers have implemented crucial logging, metrics, and job history services around Moka. This architecture allows engineers to debug and optimize jobs seamlessly, eliminating the need for intricate knowledge of the underlying cluster.
Standardizing log collection has been a pivotal effort, utilizing Fluent Bit for centralized logging and OpenTelemetry for uniform metrics. This provides a holistic view of system health, benefiting both application and infrastructure teams.
Reproducibility and Cost Efficiency
An essential aspect of Moka is its commitment to reproducibility through infrastructure-as-code methodologies. Pinterest leverages Terraform and Helm for creating and managing EKS clusters, configuring networking, and deploying critical components, including the Spark History Server.
Moreover, Pinterest is making strides to support various hardware architectures by developing multi-architecture images compatible with both Intel and ARM-based instances, including AWS Graviton. This initiative is not just about performance; it aligns with Pinterest’s goals of achieving cost efficiency at fleet scale.
Exploring Processing Engines
While Spark is the cornerstone of Moka, the development of this platform allows for greater flexibility in utilizing multiple processing engines. The Pinterest team has indicated that other use cases are emerging, with Apache Flink Batch already in production and plans to integrate Flink Streaming soon. This versatility caters to specific workflow requirements, reinforcing Moka’s role as a comprehensive data processing foundation rather than merely a Spark-centric platform.
Learning from the Migration Journey
The transition to Moka is not just about adopting new technologies but also about the broader process of dismantling legacy systems. Pinterest describes this migration as a continuous journey rather than a final destination. Through various proof-of-concepts, they gradually phased out Hadoop as their confidence in the new stack grew.
Acharya notes that, often, the most significant challenges arise at scale. This highlights the importance of observability, automation, and multi-engine support in ensuring a successful migration. Followers of Pinterest’s journey can glean valuable lessons on the complexities of uncoupling from legacy systems and fostering a culture of innovation and adaptation.
Industry Impact and Reference Architecture
The response to Moka has resonated within the tech community, positioning it as a reference architecture for modern cloud-native data systems. Observers have noted the practical implementation of EKS clusters, Fluent Bit logging, and OpenTelemetry metrics pipelines as benchmarks for organizations seeking to build scalable data infrastructures.
By sharing their experiences and insights, Pinterest not only illustrates its own path but also serves as a guide for other organizations looking to modernize their data processing capabilities. The combination of technical adeptness and the willingness to learn from experiences sets a compelling example for the industry at large.
Inspired by: Source

