2

I have multiple servers running nginx reverse proxies pointing to the same ip adress because I need to keep 100% uptime and my service relies on them to hide real ip from malicious attackers and not only.

I was wondering if there is a dns technique or some other sort of magic I could use in order to be able to point a single ip adress or domain name to different ip adress (one of my reverse proxy servers) in case one of them goes down.

I want the user to be able to access my service through one static ip or domain which would then point him to currently working reverse proxy of my choice.

In essence it needs to be able to redirect user to a different ip I would chose and update real fast because if one server goes down he needs to get his traffic to a different one instantly (in perfect scenario). It needs to be DDoS proof because otherwise that'd be pointless to start with.

Im clueless about networking please dont go hard on me, and thanks for any advice

3
  • 1
    oh I forgot to add its mixed tcp/udp traffic on various ports
    – 3031b920e8
    Jan 25, 2018 at 10:45
  • Amazon route53 DNS with a health check would allow you to do this. However it would only work when accessing via a domain name
    – Drifter104
    Jan 25, 2018 at 10:46
  • wow that looks really nice and affordable too but prehaps there's some way to achieve this without a third party service?
    – 3031b920e8
    Jan 25, 2018 at 10:55

3 Answers 3

1

I'd install keepalive on those servers. That way, only one of them would have the "real" IP address, if it goes down, one of the colleagues would take over.

1

In general what you are looking for is a VIP (Virtual IP). This can be done by some routers. You may get higher availability with redundant routers

You can provide the functionality with a proxy listening single IP address. An application like haproxy can do this for you.

In any case you will need a health check to test the state of the servers. This is what will trigger switching to a different server. If the proxy goes down you will loose access, but you can use redundant proxies in an active passive pair. A keepalive process can be used to automate activating the passive server if the active server fails.

Either option allows you to spread the load across multiple servers. A proxy server can use different servers for different contexts (paths). Some routers can also do context based routing.

0

Another option to be aware of is round robin DNS, where you just specify multiple IPs for the same hostname.

There are limitations though:

  • how the client handles these multiple IPs depends on the client. I think browsers tend to try them in succession
  • this doesn't clear the failing IP from the list if it goes down.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .