views:

21

answers:

1

I have a web app which relies on a number of back end services, and I would like to be able to dynamically switch between different instances of these services. So the thinking was to create an intermediate app which listens on some ports and redirects traffic as required.

If I was dealing with pure HTTP I would look at doing this with Apache and proxy_pass, which would be ideal (fast, reconfigureable with no down time), but it's not just HTTP traffic, which is why I'm stuck

Any nudges in the right direction would be appreciated.

Thanks,

Rob

+1  A: 

Why don't you use a software (e.g. Vyatta, pfSense, etc.) or hardware router and put some NAT rules in places?

A pretty neat open source app I sometimes use when I quickly need to forward some ports, etc. to do some testing is TcpTunnel: http://www.vakuumverpackt.de/tcptunnel/

Tom Frey
Getting new hardware into this environment is going to take too long and be too expensive to justify. If that was the only route, we'd have to carry on manually changing config files and restarting services as we do at the moment.
reasonableKeith
As I mentioned you can just use a free software router like Vyatta and run it on a VM, that's not gonna cost you anything and takes an hour to set up.Alternatively you could easily script TcpTunnel to change port forwards, etc.
Tom Frey