Open nickdoikov opened 7 years ago
backup is not a backend but more is a routing on disaster logic. we need use multiple backup hosts in list sequentially, not in parallel. because list of backup servers in most cases will be point to server frontend of different gobetween in nearest geo location , second backup farest away from first and so on.
Proposed config and simple rules:
[servers.sample]
...
[servers.sample.backup]
healthcheck_min_backends = 2
servers_list = [
"foo.bar:8000",
"foo.bar.cn:8000"
]
healthcheck_min_backends
backends left aliveOnly one backup server will be used -- first that have passed healthcheck mechanism should not be dependable to health checks possible race conditions.
i think we should made a check optional for backup servers and not dependable to server checks (separate on/of for the backup sedvers)
[servers.sample]
...
[servers.sample.backup]
healthcheck_min_backends = 2
healthcheck_enable=true|false
servers_list = [
"foo.bar:8000",
"foo.bar.cn:8000"
]
What will happen if there's more than one backup server with heatlhchecks turned off, and first of them fails? How should gobetween decide to route traffic to the second one?
need to take first one. rest other will be ignored .
[servers.sample]
...
[servers.sample.backup]
servers_list = [
"foo.bar:8000",
"foo.bar.cn:8000"
]
[servers.sample.backup.healthcheck]
enabled=true|false
min_backends = 2
#other options similar to usual backend healthcheck
This feature would be very helpful if it gets implemented.
I am planning to implement this using weight + priority and some additional configuration
Need to implement backup server functionality. When all backends for server failed - use separate single host for backup connections. This will dramatically increase redundancy in big geo distributed infrastructures.