improved nginx failover