add host_backup middleware, which will try to connect to another host if provided one is unreachable