Web / Traefik Interview questions
Why is dynamic configuration preferred over static configuration for routing rules?
Static configuration in Traefik covers things that must exist before Traefik starts, like entrypoints and providers, and changing it requires a full restart.
Dynamic configuration, by contrast, covers routers, services, and middlewares, and can be updated live by a provider (Docker labels, Kubernetes objects, a watched file) without any downtime, which matters in environments where containers scale up and down constantly.
Routing rules belong in dynamic configuration specifically because they need to track a moving target: new service instances appear and disappear far more often than the network ports Traefik listens on, so tying routing to a restart-required static file would fight against the whole point of running in a containerized environment.
More Related questions...