istio / ztunnel

The `ztunnel` component of ambient mesh
Apache License 2.0
307 stars 101 forks source link

Implement proper load balancing #64

Open PlatformLC opened 2 years ago

PlatformLC commented 2 years ago

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

hzxuzhonghu commented 2 years ago

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

PlatformLC commented 2 years ago

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?

howardjohn commented 1 year ago

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 commented 7 months ago

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

daixiang0 commented 7 months ago

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

howardjohn commented 7 months ago

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.