Allow Polling Multiple TaskRun
s in One PollTaskRequest
#1086
Labels
clients
Affects all LH clients and the public API. May be used in conjunction with `server`.
controversial
Requires discussion from the community. For proposals, API changes, and big features.
feature
Issue that denotes a new feature, request, or performance improvement.
server
Affects the core LH Server code.
@eduwercamacaro did fantastic work on performance testing in LittleHorse. He found out that throughput was bottlenecked by the round trip time of the following cycle in the Task Worker:
PollTaskRequest
is sent by the client and received by the server.TaskClaimEvent
to Kafka, then reads it back, and processes itScheduledTask
to the client.Right now, only one
TaskRun
can be in that loop at a time for a single worker thread (PollThread
in Java, and connection to the LH Server in Python and Go).We can improve task worker throughput by parallelizing this. One way is thorugh #1084 which allows multiple loops to go on at once.
Another way is to allow one processing loop (i.e. one
PollTaskRequest
) to retrieve multipleScheduledTask
s.Both ways are useful, especially when combined together. The specific benefit of this ticket is that it will reduce the number of network requests and traffic, thereby reducing the load on the server.
We can even take it a step further and allow the
TaskClaimEvent
internal command to support claiming multipleTaskAttempt
s at one time, which would further reduce the load we send to Kafka.The text was updated successfully, but these errors were encountered: