Answer the question
In order to leave comments, you need to log in
How to implement data transfer on two different ports?
I can't figure out how to duplicate incoming connections to two ports at once. Now with this configuration:
stream
{
upstream backend
{
server IP:PORT_1;
server IP:PORT_2;
}
server
{
listen 2000;
proxy_pass backend;
}
}
events {
worker_connections 1024;
}
Answer the question
In order to leave comments, you need to log in
nginx.org/en/docs/http/ngx_http_mirror_module.html
A duplicate request is created - but keep in mind that only the main thread response will be returned to the client, the duplicate response will go to /dev/null
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question