Is there way to put server node down for maintenance over API?

unfortunately i don't see it in documentation - is there way how to say one of my backend servers are down for maintenance and i want to put it proactively down using API or CLI?

From that time on Traefik would not send any new requests to this server and i could start maintenance of my server

Or is there any other better way how to manage state of servers?

How do you inform Traefik about your services? Configuration discovery or dynamic config file?

In our application we have a switch to disable new incoming requests. We wait a bit for ongoing connections to finish, then terminate the container and begin maintenance.

1 Like

currently we don't use Traefik at all - I try to research it since we use F5 and HAProxy where disabling pool node (member) is possible (F5 with rest API and HAProxy with socket/command)

We have quite fixed environment where one reverse proxy is dealing with 5 nodes where traffic is being sent to based on some URL matching rules. We want to do maintenance of (for example) 2 nodes and this is the time when i need some mechanism to inform Traefik that those will not receive any more requests as you @bluepuma77 are mentioning. Its not application which can do it since Traeffik would be first one receiving requests from browsers/clients

Config file would be generated once Traefik container is being build - our environment doesnt change

Is there some way to control those nodes in Traefik?

If you have a fixed environment you can use a dynamic config file via provider.file and watch for changes, so you can update the config file and remove targets.

There are other providers, you could also keep the config in Redis, see list.

1 Like

Thank you very much for your time and help - that sounds like a great solution!

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