Traefik 2.x support for kvs atomic configs?

Traefik 1.x KVS config backend had the " traefik.alias " key that could be use to make atomic updates to the whole configuration (instead of whatching the whole prefix, only the traefik.alias key is watched and then the target used as config). I'm having a hard time finding the same functionality in the 2.x versions.

Is there a similar way to achieve full atomic config updates in 2.x? If not, what is the suggested way to achieve something like that (won't traefik watches trigger an update for every key update having intermediate, wrong, configuration?).


In Traefik v1, the traefik/alias key was used to dynamically get a prefix, from my point of view it's not a way to do an atomic update.

In Traefik v2, the KV system has been changed: Traefik gets all the configuration in one call instead of one call by key like in v1. This reduces a lot the number of calls to get a full configuration and allows us to speed up the provider.

Thanks. How does that is supposed to work then?
Since the client is the one that is creating/deleting/changing entries and is in control when the whole set/configuration is "stable", that set of changes are not really going to be atomic from somebody that is just watching? So each change is going to trigger the traefik watch? Traefik will be getting all the configuration in one call, that it won't be the final one...
How do I achieve that (full configuration "atomicity") using v2?

v1 and v2 are not different on that point: when a change occurs the configuration is updated.
v1 does not provide more warranty on the "atomicity".
The atomicity is handled by the KV it-self and the way that you interact with it.


I think this is the key difference in behavior:

" Once the /traefik/alias key is updated, the new /traefik_configurations/2 configuration becomes active atomically." and
"Traefik will not watch for key changes in the /traefik_configurations prefix . It will only watch for changes in the /traefik/alias ."

That is the full config atomicity I'm looking for, i.e: the client writes the whole config, at its own pace, and it is only read when the /traefik/alias is changed to the new "path"...

To be honest, I couldn't remember this behavior.
The substance of what I said remains true (it is the KVs that produce atomicity)

The Etcd and Consul backends do not support updating multiple keys atomically.

I think that you can open about the /traefik/alias feature.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.