spring-cloud-commons icon indicating copy to clipboard operation
spring-cloud-commons copied to clipboard

feat: Multi-AZ Failover LoadBalancing

Open kworkbee opened this issue 2 years ago • 8 comments

Description

In a multi-AZ environment, a loadbalancer looks at ServiceInstances of the primary zone first, but when the instances of that are not connected correctly, then it looks at the instances of the secondary zones.

What's changed

spring.cloud.loadbalancer.configurations: multi-az-failover : It enables MultiAZFailoverServiceInstanceListSupplier. spring.cloud.loadbalancer.secondary-zones: A,B,C : Secondary Zones.

To use this feature, Caching must be needed to record ServiceInstances into a cache for remembering connection-failed instances. MultiAZFailoverServiceInstanceListSupplier will calculate available instances by comparing those in cache.

Issues

Related to #1203

kworkbee avatar Mar 07 '23 03:03 kworkbee

Any progress with this? @spencergibb

kworkbee avatar Mar 15 '23 00:03 kworkbee

No. Please be patient

spencergibb avatar Mar 15 '23 02:03 spencergibb

It's a big change. The earliest it would be merged would be when we start the 2023.0 release train (4.1.0 of spring cloud commons). We won't even start that until June.

spencergibb avatar Mar 15 '23 02:03 spencergibb

Thanks for your answer. I'll consider this, and if any corrections needed please feel free to mention me.

kworkbee avatar Mar 15 '23 08:03 kworkbee

Updated feature: Instances will be added into a cache only when connection fails or 5xx error occurs. 4xx Errors will not be triggered.

kworkbee avatar Mar 19 '23 04:03 kworkbee

Hi, @spencergibb @OlgaMaciaszek Still needs to be reviewed?

kworkbee avatar Jul 09 '24 15:07 kworkbee

Hi @kworkbee, sorry, this feature didn't make it to the planned backlog for 2023.0.x. Will consider it for 2024.0.x and get back to you.

OlgaMaciaszek avatar Jul 10 '24 15:07 OlgaMaciaszek

@OlgaMaciaszek Please review if there is anything I need to do about the part where CI failed.

kworkbee avatar Mar 24 '25 04:03 kworkbee