Amr Ashraf
Amr Ashraf

Reputation: 431

Proxy TCP and UDP traffic to multiple servers in backend at the same time

I am tring to forward traffic of tcp and udp into multiple servers at the same time. What i found is only load balance it in Nginx. Does there a feature in Nginx can handle this type of forwarding/proxing?

Upvotes: 2

Views: 1050

Answers (1)

anemyte
anemyte

Reputation: 20196

I know it's not TCP/UDP but for HTTP there is NGINX mirror module:

The ngx_http_mirror_module module (1.13.4) implements mirroring of an original request by creating background mirror subrequests. Responses to mirror subrequests are ignored.

Example Configuration

location / {
    mirror /mirror;
    proxy_pass http://backend;
}

location = /mirror {
    internal;
    proxy_pass http://test_backend$request_uri;
}

Upvotes: 1

Related Questions