Skip to content

Conversation

@OlgaMaciaszek
Copy link
Collaborator

Make properties other than within @ConfigurationProperties work per-client, with the following global properties exclusions:

  • spring.cloud.loadbalancer.enabled
  • spring.cloud.loadbalancer.retry.enabled - if enabled, still possible to disable per-client only with properties
  • spring.cloud.loadbalancer.cache.enabled - if enabled, still possible to disable per-client with custom configuration
  • spring.cloud.loadbalancer.stats.micrometer.enabled

Fixes gh-1031.

…sed properties. Use per-client-property for RetryAwareServiceInstanceListSupplier conditionals.
…nt-based properties. Use per-client-property for property-set configurations, avoiding same instance on retry and service instance cookie for sticky session.
Copy link
Contributor

@ryanjbaxter ryanjbaxter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could probably use some unit tests of LoadBalancerEnvironmentPropertyUtils to make sure its behaving as expected

@OlgaMaciaszek
Copy link
Collaborator Author

Could probably use some unit tests of LoadBalancerEnvironmentPropertyUtils to make sure it's behaving as expected

Thanks :) I assumed it's sort of a self-tested feature that should be covered by pre-existing tests as we change the implementation without changing expected behaviour, but will add a few tests just for that class.

@OlgaMaciaszek OlgaMaciaszek merged commit f30afc1 into main Nov 2, 2021
@OlgaMaciaszek OlgaMaciaszek deleted the handle-conditionals-for-client-properties branch November 30, 2021 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LoadBalancer: add custom conditionals to work with per-client config

3 participants