https://github.com/codeexpress/tcpmirror
Mirror TCP traffic on one port to multiple ports/destinations
https://github.com/codeexpress/tcpmirror
ab-testing golang mirror-tcp-traffic port-mirroring qa streams tcp-proxy
Last synced: about 1 month ago
JSON representation
Mirror TCP traffic on one port to multiple ports/destinations
- Host: GitHub
- URL: https://github.com/codeexpress/tcpmirror
- Owner: codeexpress
- License: mit
- Created: 2020-05-06T22:58:52.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-07T00:08:27.000Z (almost 6 years ago)
- Last Synced: 2024-06-19T01:59:48.458Z (over 1 year ago)
- Topics: ab-testing, golang, mirror-tcp-traffic, port-mirroring, qa, streams, tcp-proxy
- Language: Go
- Size: 3.91 KB
- Stars: 21
- Watchers: 3
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TCP Mirror
`tcpmirror` duplicates TCP traffic received on a port to more than one destination ports.
One of the destination is the primary server (port) which responds
to the incoming TCP traffic. Other streams are duplicate streams and
any response from the respective servers is discarded.
## Why
This is helpful in the following scenarios:
- To test a Dev/QA/secondary server with the same requests, traffic
and load that the primary production server handles.
- To do performance testing of candidate servers against the existing
production server.
- To re-write the server in another language and make sure that the
new server responds the same as existing server for same requests.
## Install
### Download from the releases pages
Download pre-built binary from the release page.
### Use `go get`
If you have `golang` tools installed, you can download and build the source code
locally as follows:
```
$ go get github.com/codeexpress/tcpmirror
```
The `tcpmirror` binary is now available in your `$GOPATH/bin` directory
### Compile from source
```
$ git clone https://github.com/codeexpress/tcpmirror.git
$ cd tcpmirror; go run tcpmirror.go
```
## Sample use case