1

I have a service that listens on a TCP port for connections, and processes the received data. I now have a need to split this data and process it on a 'live' and 'test' machine.

I want to make this a near perfect duplication going to each machine, and I figure the easiest this to do is to receive onto a 'duplicator' service that simply copies and retransmits the data to two other endpoints (with one of these able to send data back to the source)

Is there are software that does this? The platform is Windows Server. I've considered writing this myself, it doesn't sound too difficult, but if a solution already exists I'd prefer to use that.

Thanks

Barguast
  • 5,926
  • 9
  • 43
  • 73

1 Answers1

1

How do you plan to solve following 2 issues:

  1. If you really have TCP protocol you definitely will have differences in TCP overhead.
  2. As it is TCP you will have answers from both machines. How are you going to handle this?

My advice is to really improve client so it generates 2 streams with the appropriate client side handling. Maybe your solution has some specifics but I don't see the way to do something correct for general case.

If you think your case is eligable for such a mirroring, probably this will help. Looks like there is another question very similar to yours one and it contains couple of links.

Here are some comments to iptables solution specifics.

Here is another way based on netcat utility.

Community
  • 1
  • 1
Roman Nikitchenko
  • 12,800
  • 7
  • 74
  • 110
  • It's a bit of a unique scenario, but talking 'back' to the client is a rarity in this case. Regardless, the intention would be to have one of the outgoing connection be the 'master' that talks back to the client, while the other connections only receive. – Barguast Apr 17 '13 at 22:24
  • But this is TCP. You cannot just mute one end here. – Roman Nikitchenko Apr 17 '13 at 22:30
  • But I can configure the service at the end to not send responses. The service in question just processes the received data and sends an acknowledgement when it has done. Nothing more. I don't see the harm in having one of services have this responsibility, and telling the other not to..? – Barguast Apr 17 '13 at 22:48
  • If such strategy suits you, I have updated answer with couple of discussion links (tcpdump and nc based solutions). – Roman Nikitchenko Apr 18 '13 at 04:34
  • Thanks for the links, I think they'll help. – Barguast Apr 18 '13 at 08:51