spring-cloud / spring-cloud-gateway

An API Gateway built on Spring Framework and Spring Boot providing routing and more.
http://cloud.spring.io
Apache License 2.0
4.54k stars 3.33k forks source link

Add load balancing mechanism Peak EWMA for Spring-cloud-gateway for Kubernetes #2865

Open nightguide opened 1 year ago

nightguide commented 1 year ago

Describe the solution you'd like It would be great if Spring-cloud-gateway for Kubernetes supported the Peak EWMA (peak exponentially-weighted moving average) load balancing mechanism.

You can read about what Peak EWMA is here:

It would be great if spring-cloud-gateway for Kubernetes could track the response time of endpoints in Kubernetes services and could balance based on EWMA. This is very useful when the application is under high load.

Describe alternatives you've considered

load balance Ewma on Kubernetes Ingress Controller

Additional context

spencergibb commented 8 months ago

This scala will be easier to read than the lua https://github.com/twitter/finagle/blob/develop/finagle-core/src/main/scala/com/twitter/finagle/loadbalancer/PeakEwma.scala

@OlgaMaciaszek does this belong in spring-cloud-gateway?