Using Nginx for TCP Mirroring

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Using Nginx for TCP Mirroring

wld75
Hi,

Can any one help in using Nginx for TCP mirroring.  i.e We want to send 1
TCP request to 2 servers.

There is a module ngx_http_mirror_module,
http://nginx.org/en/docs/http/ngx_http_mirror_module.html which can do http
mirroring, but we want to do for TCP mirroring.  

Thanks,
Ankit Chopra

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,280895,280895#msg-280895

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: Using Nginx for TCP Mirroring

Roman Arutyunyan
Hi,

On Thu, Aug 16, 2018 at 08:56:22AM -0400, ankitschopra wrote:
> Hi,
>
> Can any one help in using Nginx for TCP mirroring.  i.e We want to send 1
> TCP request to 2 servers.

There's no such module in nginx.  The stream (TCP) module has no information
about the underlying protocol.  This means that it's not aware what is a request
and where it ends.

However, it is really interesting to know your use case.  You want to mirror
the request (let's assume we have information about the protocol), but what
about the response?

> There is a module ngx_http_mirror_module,
> http://nginx.org/en/docs/http/ngx_http_mirror_module.html which can do http
> mirroring, but we want to do for TCP mirroring.  

The HTTP mirror module is in fact way more generic than that.  It just creates
a background subrequest, which may proxy the request to a remote server and do a
bunch of other things.

--
Roman Arutyunyan
_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx