GrabShi Kai NgProblem & solution
Safer deployment of streaming applications
Summary
Stateful stream processing frameworks like Apache Flink present unique deployment challenges because conventional canary and blue-green strategies can cause data inaccuracies or state divergence. Grab's real-time data platform team encountered risks of state loss, manual rollback overhead, and absent health checks in their Kubernetes and Spinnaker deployment pipeline. To resolve these operational issues, the team redesigned the deployment workflow around automated Flink savepointing and programmatic health monitoring. The new pipeline halts existing applications after capturing state snapshots and Kafka offsets, monitors target deployments via API health probes, and executes automated rollbacks using versioned ConfigMaps and replica metadata annotations. This automated process ensures state consistency during upgrades and eliminates manual intervention during deployment failures.
Context
Deploying stateful Flink streaming applications on Kubernetes at Grab was error-prone because existing CI/CD processes lacked automated health probes, risked losing application state, and required slow, manual rollbacks across interconnected streaming pipelines.
Approach / What changed
Grab built an automated Spinnaker deployment workflow that captures Flink savepoints via API before shutdown, deploys new versions with stored replica count annotations, conducts automated API health probes after a stabilisation period, and rolls back configuration and infrastructure upon failure.
Takeaways
Canary deployments are unsuitable for stateful Flink stream joins because splitting traffic across versions leads to incomplete data inputs and inaccurate processing.
Capturing a Flink savepoint before stopping an application preserves Kafka consumer offsets, ensuring consistent data replay and zero message loss if a rollback occurs.
Dynamic TaskManager replica counts from autoscaling are not tracked in standard Kubernetes deployment specs, necessitating custom metadata annotations for accurate cluster rollbacks.
Source and freshness
- Source
- engineering.grab.com
- 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.