You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Provide a flag to disable profiles. e.g., currently we always have a default profile appended, so typically we watch 4 paths for a normal application:
In our deployments we have 40+ data centers to support 150M users, we have so many requests to Consul that we have to keep it lean, and we want to remove the profile-specific paths and only keep two of them:
config/testApp/
config/application/
Describe the solution you'd like
After reading the source code it seems we can do it in ConsulPropertySources.generateAutomaticContexts(...) to skip the calls to addProfiles().
I propose to have a flag likespring.cloud.consul.config.profileEnabled, and default to true to keep it compatible with the current behavior. e.g.,
if (properties.isProfileEnabled()) {
for (String suffix : suffixes) {
addProfiles(contexts, defaultContext, profiles, suffix);
}
}
Describe alternatives you've considered
We can tune waitTime and delay to make our services have less pressure on Consul, but it sacrifices the latency, and we still want to detect changes fast enough. By removing the profiles we can get rid of 50% of unnecessary traffic to Consul, which sounds like a low-hanging fruit. If you agree with this option, I can raise a PR.
Additional context
N/A
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Provide a flag to disable profiles. e.g., currently we always have a default profile appended, so typically we watch 4 paths for a normal application:
In our deployments we have 40+ data centers to support 150M users, we have so many requests to Consul that we have to keep it lean, and we want to remove the profile-specific paths and only keep two of them:
Describe the solution you'd like
After reading the source code it seems we can do it in
ConsulPropertySources.generateAutomaticContexts(...)
to skip the calls toaddProfiles()
.I propose to have a flag like
spring.cloud.consul.config.profileEnabled
, and default to true to keep it compatible with the current behavior. e.g.,Describe alternatives you've considered
We can tune
waitTime
anddelay
to make our services have less pressure on Consul, but it sacrifices the latency, and we still want to detect changes fast enough. By removing the profiles we can get rid of 50% of unnecessary traffic to Consul, which sounds like a low-hanging fruit. If you agree with this option, I can raise a PR.Additional context
N/A
The text was updated successfully, but these errors were encountered: