yacar
May 19, 2021, 9:14am
1
Hi,
I've been using traefik for a few days know, and I'm really amazed by what it can do.
However I can't find anywhere on the documentation how to use a fallback server on a service. What I mean about fallback, is that if a server is down (health check does not work or ping or...), I want to follow all the traffic to the fallback server.
There's an issue here:
opened 08:46AM - 31 Dec 16 UTC
kind/enhancement
priority/P2
### What version of Traefik are you using (`traefik version`)?
v1.1.2
### Wh… at is your environment & configuration (arguments, toml...)?
linux, simple file backend
```toml
[backends]
[backends.testing]
[backends.testing.servers.server1]
url = "http://primary:80"
weight = 1
[backends.testing.servers.server2]
url = "http://backup:80"
weight = 1
```
### What did you do?
I want to do load balancing simple active passive. however i want to use server only as backup ( in case of failure of network issues)
### What did you expect to see?
Wanted to see a simple case working where failover is supported instead of load-balancing
### What did you see instead?
Couldn't figure out how it will work by reading documentation N times.
The use case is simple i have 2 server in single backend, one primary and one backup. However i would like to sent traffic to backup only when primary is not working ( tcp connection could not be made).
I have tested some odd forms, where i add some abnormally high weight to primary and set retry to yes. In this case if primary is not responding, retry again chooses the primary instead of backup. So, retry should be skipping the primary server toactually retry. This is broken.
Can someone help me to configure such as a case ?
Here's what nginx has to offer for my usecase :
https://nginx.org/en/docs/http/ngx_http_upstream_module.html
What can I do to overcome this issue?
Best regards,
Hi @yacar ,
Thanks for your interest in Traefik,
You posted your question in the wrong forum section. For questions related to Traefik v2
, use the following section: https://community.traefik.io/c/traefik/traefik-v2 .
Regards