I wanted to finally start using traefik as there is a cool opportunity for me to test it.
I was struggling 3 days already with it and reading all documentation few times.
The problem is:
I have one service which is my instance of some important backend. It's free and I want to use it primarily. But there is a paid version, which I only want to use when my instance is down.
I tried 20+ different configurations already, still can't make the right one.
I want traefik to send all requests to one service, and only if it's unavailable redirect to other.
The most similar behaviour in documentation is CircuitBraker middleware, but you can't setup fallback service in there.
I have done this while moving a file provider service to a docker service. This may not end up being a solution for what you are asking for.
Create the same router rule for the service. But for your preferred service add a priority label.
While the Prioritsed container is running that is where the requests are routed.
I am sure the same thing should be possible with file provider only.
Hello, thank you! But I don't want to load balance between servers. Because backup server is paid API which I'm willing to pay only in case I have fault in my primary server.