Redirect TCP connections from one IP address and port to another
We’ve just performed a migration from one data centre to another and thus one IP range to another.
We wanted to minimise the amount of down time our clients had as we moved servers between data centres, and also wanted to ensure DNS for their domain names repointed to the new IP addresses in a timely manner.
To minimise the amount of downtime we decided to first repoint our clients’ domain names to their new IP addresses, and then proxy the requests to the old location of the servers. Then, a week later we would move the servers to the new data centre, give the servers their new IP addresses and then disable the redirection. This would mean that the downtime would be limited as much as possible.
All in all this worked very well and was very straightforward.
The only hurdle was finding a piece of software that we could install at the new data centre that would allow us to proxy all web traffic requests from one server to another keeping all headers intact.
Fortunately our friends at Firstserv recommended a command line tool called rinetd. It’s a great little tool that will allow you to redirect any TCP connections from one IP address and port to another IP address and port.
We did give Apache Reverse Proxy a go but it wasn’t easy to get SSL to redirect, and that’s where rinetd came and saved the day.
I hope this helps someone else!
Posted by Niklas Richardson on 14 Oct 2008
From our portfolio
| www.flickr.com |