lyft / presto-gateway

A load balancer / proxy / gateway for prestodb
Apache License 2.0
358 stars 156 forks source link

QueueBasedRouting: Use Running Count as fallback logic #173

Closed akhurana001 closed 2 years ago

akhurana001 commented 2 years ago

Changes:

akhurana001 commented 2 years ago

shall we udpate getEligibleBackEnd function to make use of the new function? Also, can we apply the same strategy for the fall back function provideAdhocBackend, if there is no routing group provided

@charlessong-lyft The change here would generate the weights using running-counts if the queueLen is the same and getEligibleBackEnd already uses those weights to route so there shouldn't be any other change required : https://github.com/lyft/presto-gateway/blob/master/gateway-ha/src/main/java/com/lyft/data/gateway/ha/router/PrestoQueueLengthRoutingTable.java#L261 .

Same for provideAdhocBackend which already uses getEligibleBackEnd.

charlessong-lyft commented 2 years ago

chatted offline, LGTM now!