ztunnel icon indicating copy to clipboard operation
ztunnel copied to clipboard

Implement proper load balancing

Open PlatformLC opened this issue 2 years ago • 6 comments

Is there any option/config to support upstream selection while VIP upstream has many wordload endpoint?

PlatformLC avatar Nov 09 '22 05:11 PlatformLC

ztunnel is at a very early stage, so the answer is no

hzxuzhonghu avatar Nov 09 '22 06:11 hzxuzhonghu

ztunnel is at a very early stage, so the answer is no

Thanks for the information. Since outbound: pick random upstream instead of first has implemented a simple random solution. Is there any on going plan for load balance and how about its priority?

PlatformLC avatar Nov 11 '22 02:11 PlatformLC

I'd actually be fine deferring this beyond alpha.. Random is a proper load balancing algorithm -- although it may not be optimal, its at least a valid one. Initially we were always doing endpoints[0] which was obviously broken

@stevenctl I am going to move this out of Alpha blocker but feel free to move back if you disagree

howardjohn avatar Jan 06 '23 22:01 howardjohn

https://github.com/istio/ztunnel/pull/868 helps a bit

howardjohn avatar Apr 04 '24 20:04 howardjohn

Is still worth adding common LB, like rr, last-connection?

daixiang0 avatar Apr 11 '24 06:04 daixiang0

Maybe long term, but I don't think its a high priority currently. kube-proxy operates with "random" and for most cases its good enough.

If we introduce alternatives, we have a big hurdle of API design around this.

howardjohn avatar Apr 11 '24 16:04 howardjohn