SlackMahendran VasagamProblem & solution
From SSH to REST: A Security-Driven Modernization of Slack’s EMR Data Pipelines
Summary
Slack's data platform accumulated over 700 SSH-based Airflow operators executing jobs directly on AWS Elastic MapReduce clusters, creating broad security surfaces and operational instability. Stateful SSH connections frequently failed when Kubernetes pods restarted, leaving orphaned zombie processes and preventing infrastructure modernization such as migrating EMR clusters to child accounts. To eliminate SSH access, Slack adopted a REST-based architecture using Quarry, a gateway providing unified REST APIs and token authentication across compute engines. For non-Hadoop CLI workloads, Slack leveraged YARN Distributed Shell to execute arbitrary shell scripts stored in Amazon S3 within managed, isolated YARN containers. The phased migration achieved zero downtime across eight data regions, unlocking reliable monitoring, simplified onboarding, and future initiatives like Spark on Kubernetes.
Context
Slack's data platform accumulated over 700 SSH-based Airflow operators to execute jobs directly on production AWS EMR clusters. This pattern created security risks, key distribution overhead, and poor audit granularity. Operationally, commands ran on master nodes, and pod restarts severed SSH connections, causing orphaned zombie jobs or unverified job statuses. It also blocked modernization efforts like Spark on Kubernetes, EMR on EKS, and Slack's Whitecastle initiative to migrate EMR clusters to child accounts.
Approach / What changed
Slack migrated all jobs to a REST-based architecture using Quarry, an internal job submission gateway providing unified REST APIs, service-to-service token authentication, and server-side lifecycle tracking. For non-Hadoop workloads and arbitrary CLI commands, Slack leveraged YARN Distributed Shell to run scripts uploaded to Amazon S3 within isolated YARN containers with explicit resource limits. Migrations rolled out progressively across Dev, GovDev/CommDev, and Production environments by operator type.
Takeaways
YARN Distributed Shell enabled Slack to run arbitrary shell scripts uploaded to S3 in isolated YARN containers via standard YARN REST APIs without custom execution infrastructure.
Migrating to REST-based job submission decoupled Airflow workers from cluster nodes, allowing jobs to persist and be queried even when client orchestrator pods restart.
Phased rollout across environments (Dev, CommDev/GovDev, Prod) and progressive deprecation per operator type prevented downtime across eight data regions.
Source and freshness
- Source
- slack.engineering
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.