QuestionQ97

VerifiedCost & Performance Optimisation

A Structured Streaming job deployed to production has produced higher-than-expected cloud storage costs. Currently, during normal operation, each data microbatch is processed in under 3 seconds; at least 12 times per minute, a microbatch containing 0 records is processed. The streaming write uses the default trigger settings. The production job is scheduled alongside many other Databricks jobs in a workspace where instance pools are provisioned to reduce startup time for batch-execution jobs.

Holding all other variables constant and assuming records must be processed in less than 10 minutes, which adjustment will satisfy the requirement?

Explanation

With no trigger explicitly configured, Structured Streaming runs as fast as possible, which can check cloud storage every few milliseconds and generate costly storage API calls. A processingTime trigger performs fixed-interval micro-batches; setting it to 10 minutes minimizes unnecessary source checks while maintaining the required processing interval. Databricks identifies processing-time triggers as the mechanism for balancing latency and cost.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!