0

Ok, so here is all that I'm trying to accomplish.

Back Ground I have multiple IIS web servers, each running multiple web sites each with their own IP address. Each IIS "Web Site" through programming and host headers runs hundreds of web sites. I want to insert a reverse proxy server for each web server that I have.

Here is what I want Reverse Proxy to Accept all traffic on a given IP address (1.2.3.4), and pass traffic to IIS site (1.2.3.104) - This I can accomplish in nginx, or varnish.

The Reverse Proxy would have about 10 defined Listen IP addresses (1.2.3.4 - 1.2.3.14), each forwarding traffic to its own corresponding IIS site (1.2.3.104 - 1.2.3.114).

IT IS NOT A LOAD BALANCE, WE SPECIFIC ARE ROUTING IP TO SPECIFIC IP. I think this is possible in nginx or varnish.

Now the Interesting Part I want to create a new Backup IIS Server, which would have web sites and in this example have IP addresses of 1.2.3.204 - 1.2.3.214). I would want to Manually fail over traffic to this backup server. I will eventually configure ALL of my IIS servers to use this one backup server, which I will use for running updates on my web servers, and this is why I only want to use it as a Manual failover server.

I know I saw somewhere there was a 'command line' to failover to a backup server, but I can't find what product it was, but I thought it was nginx.

I don't need to cache anything, as we cache objects in IIS, and that is why I need to specifically send traffic from 1.2.3.4 to 1.2.3.104 and 1.2.3.5 to 1.2.3.105, etc.

2

If you're not caching or performing content switching (making "routing" decisions based on HTTP URL or headers) why would you need to use something that far up the stack.

Just use IPtables to NAT the connections.

6
  • Alright, it is all coming back to me... – bigd53027 Apr 21 '15 at 12:40
  • My thoughts with using nginx, was that I would have a production and failover config. I would have something like this: nginx.config.prod upstream server 1.2.3.104 listen 1.2.3.4:80 nginx.config.failover upstream server 1.2.3.204 listen 1.2.3.4:80 My running config would be nginx.conf, if I needed to fail over I would just: ** sudo cp nginx.conf.failover nginx.conf** ** sudo nginx -s reload** or worse case ** sudo service nginx restart** when done ** sudo cp nginx.conf.prod nginx.conf** ** sudo nginx -s reload** or worse case ** sudo service nginx restart** – bigd53027 Apr 21 '15 at 12:53
  • Yeah, that would work, but based on my quick Google search, the free version of Nginx only operates at Layer7, way higher than your needs. Varnish does have pipe mode, which turns into a TCP proxy, and Haproxy in TCP mode would do the same, but you can likely acheive what you want with shell scripts to control IPTables. The reasons I can see for not using Nginx/Varnish/HAproxy are that you're adding complication to the system where there need not be. IPTables can do what you want and it's baked in to the Kernel. – GregL Apr 21 '15 at 13:18
  • Can you do it with those other solutions; yes. Should you; well that's a whole other story. – GregL Apr 21 '15 at 13:19
  • I agree that it is way higher than what we need, and I love the idea of IPTables. I do need to keep this simple, with simple commands, as I'm the only person with any ( and very limited) Linux experience. That's why pre-configured files, with simple copy commands. I was investigating IPTables a little bit last night, I need to see if there is a way to do the same thing, copy a config, then apply it, and re-apply a different config when done. I really do not want to have to manually re-write rules every time we need to fail over 50 plus IP/websites. Thanks for the suggestion. – bigd53027 Apr 21 '15 at 13:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.