Introducing Rubix: Kubernetes at Palantir

Palantir
6 min readadvanced
--
View Original

Overview

The article introduces Rubix, Palantir's initiative to rebuild its cloud architecture around Kubernetes, focusing on the challenges and solutions encountered in creating a secure and scalable scheduling engine for distributed compute frameworks like Apache Spark. It highlights the evolution of Palantir Foundry and the transition from Apache YARN to Kubernetes for improved performance and security.

What You'll Learn

1

How to leverage Kubernetes for deploying secure multi-tenant applications

2

Why predictable performance is crucial for operational decision making

3

How to implement dynamic cluster sizing for distributed compute frameworks

Key Questions Answered

What challenges did Palantir face when migrating to Kubernetes?
Palantir faced challenges in ensuring multi-tenant security and predictable performance while migrating to Kubernetes. They needed to adapt their deployment infrastructure to guarantee execution times with lower variance than their previous architecture, which was based on Apache YARN.
How does Kubernetes improve security for user-authored code?
Kubernetes enhances security for user-authored code through robust features like pod security contexts, which provide a consistent security approach across all types of code. This was a significant improvement over their previous reliance on Apache YARN, which had immature container support.
What is the significance of predictable performance in data processing?
Predictable performance is essential as customers expect consistent execution times for their jobs. For instance, if a job runs for 1 minute today, users expect it to run in a similar timeframe tomorrow, which necessitates a shift from static to dynamic resource allocation.
How does Rubix handle scheduling for Spark applications?
Rubix extends the Kubernetes scheduler to ensure predictable performance for Spark applications. This adaptation allows for dynamic resource allocation and improved execution times, addressing the needs of users who require consistent performance for their data processing tasks.

Key Statistics & Figures

Number of Spark jobs run daily
hundreds of thousands
This statistic illustrates the scale at which Kubernetes is operating within Palantir's production fleet.
Number of nodes utilized
thousands
This indicates the extensive infrastructure supporting the Rubix initiative and the capability to handle large-scale data processing.

Technologies & Tools

Some links below are affiliate links. We may earn a commission if you make a purchase.

Key Actionable Insights

1
Implementing Kubernetes can significantly enhance the security of user-authored code by utilizing its robust containerization features.
This is particularly important for organizations that manage multi-tenant environments, as it helps maintain a consistent security posture across various workloads.
2
Transitioning to a dynamic resource allocation model can lead to more predictable performance and cost savings in cloud environments.
By allowing Kubernetes to manage cluster sizes dynamically, organizations can ensure that they only pay for the resources they actually use, aligning costs with actual job execution times.
3
Understanding the limitations of previous architectures like Apache YARN can inform better design decisions when adopting Kubernetes.
Recognizing these limitations allows teams to avoid similar pitfalls and leverage Kubernetes' strengths effectively.

Common Pitfalls

1
Relying on static cluster sizes can lead to inefficient resource utilization and unpredictable performance.
This often results in users paying for more resources than they actually need, which can be avoided by adopting a dynamic scaling approach.

Related Concepts

Kubernetes Architecture
Distributed Computing Frameworks
Multi-tenant Security Models