
Answer-first summary for fast verification
Answer: Batch the job into ten-second increments.
The correct option is **A. Batch the job into ten-second increments.** This approach minimizes backpressure by reducing the frequency of HTTP calls to the GUID generation service, allowing for the processing of data points in batches. This not only optimizes resource utilization but also enhances system performance by mitigating the risk of overwhelming the service with concurrent requests. **Why the other options are incorrect:** - **B. Call out to the service via HTTP:** Directly calling the service without batching can lead to excessive concurrent HTTP requests, increasing backpressure. - **C. Create the pipeline statically in the class definition:** This method does not inherently address backpressure as it lacks mechanisms for batching or rate control. - **D. Create a new object in the startBundle method of DoFn:** While this approach involves object creation within the processing logic, it does not directly tackle the issue of managing HTTP call frequency or batch processing.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
In a scenario where new website users require a globally unique identifier (GUID) generated by a service that processes tens of thousands of messages per second through HTTP calls in a multi-threaded environment, what pipeline design would effectively reduce system backpressure?
A
Batch the job into ten-second increments.
B
Call out to the service via HTTP.
C
Create the pipeline statically in the class definition.
D
Create a new object in the startBundle method of DoFn.