Pay for compute when the workload uses it
An extraction job runs for 25 minutes each night and keeps its output in object storage. Analysts also run interactive transformations throughout business hours. How should you evaluate cluster lifetime?
Pay for compute when the workload uses it
Compare cost per successful completed job under the required deadline. For a daily 20-minute job, idle hours can dominate the bill. For consecutive jobs, cluster startup and repeated initialization can dominate instead. Keep durable results outside disposable compute.
In the recording
Keep Spark data in Cloud Storage and delete short-lived clusters between runs. Keep a cluster running for steady interactive work.
Work through the decision
An extraction job runs for 25 minutes each night and keeps its output in object storage. Analysts also run interactive transformations throughout business hours. How should you evaluate cluster lifetime?
Check your reasoning
Separate the two demand profiles. A job-scoped cluster can eliminate long idle intervals if startup fits the batch deadline. Interactive use may justify a persistent warm environment. Measure end-to-end delay, minimum capacity and cost per successful run.
Decisions and tradeoffs
- Ephemeral cluster
- Create compute for a bounded job and release it after durable output is written. Include startup time in the service target.
- Persistent cluster
- Keep a warm environment for sustained demand or a strict start-latency target. Monitor idle resources.
- Capacity baseline
- Reserve or provision enough capacity for the measured critical load and validate the limit under peak conditions.
- Lifecycle policy
- Transition or expire stored objects according to retention and access needs independently of compute lifetime.
Practice the guide skills
- Estimate cost per successful job including startup.
- Size the minimum available capacity for critical work.
- Compare a warm and job-based Spark cluster against the deadline.
Official objectives for this lesson
Related lesson · Choose retention and expiration at the correct boundary
Pay for compute when the workload uses it quiz
Answer 3 questions. Check each answer for an explanation.