Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am just wondering if the following scenario is possible and how to implement this.

Suppose there are 2 DNS records from one of the Domain Services. Both records point to two different servers HTTP servers. Recently I had to replace those servers very often, every replacement involves changing IP address. Therefore first I had to create new server, change DNS record pointing to the new server, wait for few days when the old servers stopped receiving traffic and then deleted the old server.

I think to create the third server (something similar to haproxy by functionality) and point all DNS record to this new server and maybe distinct the traffic by ports. This third server based on port will decide where to send the traffic to. So the next time when I will have to change server I will change it only on my third server and delete the old one. That's all.

I assume haproxy is not the right tool use for this. I mentioned it because I am familiar with it and use it in inner network.

The question is what I need to use for the third server in order to navigate the traffic.

Thanks!

share|improve this question
    
You forgot to tell what protocols are running on your server. Is it a web server, FTP server, email server...? –  Khaled May 9 '12 at 8:11
    
@Khaled sorry, of course, there are http servers. –  com May 9 '12 at 8:13

2 Answers 2

up vote 3 down vote accepted

Haproxy is a very great tool for load balancing web servers. If I understand you well, you want to direct all traffic to haproxy node which you can control it easily to change the real servers IP and configuration.

Yes, this can be done using haproxy and it is a good to hide your real web servers. You can add the needed servers and remove them simply by modifying the configuration file and reloading haproxy process.

share|improve this answer
    
Thanks a lot, but I am not sure that haproxy is a proper tool for my purpose. Actually I don't need load balancing, I just need some kind of switch from 2 outside streams to two inside streams –  com May 9 '12 at 8:38
    
@com: haproxy provides both of these two for you. It has the big advantage of understanding HTTP requests. So, you can direct the traffic in many different ways and not necessarily based on IP and ports. –  Khaled May 9 '12 at 9:01

If you want to forward traffic based on port, I suggest just using IPtables.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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