Welcome! Log In Create A New Profile

Advanced

Re: TCP load balancing with domain name

Maxim Konovalov
June 21, 2018 04:40AM
Aravind,

On 21/06/2018 11:35, aRaviNd wrote:
> Hi All,
>
> I am trying to configure tcp load balancing with Nginx with below
> configuration.
>
> stream {
>     server {
>         listen 25;
>         resolver 1.1.1.1;
>         proxy_pass $host:25;
>     }
> }
>
> If I try to connect mx1.abc.com http://mx1.abc.com i would like to
> expand my variable $host to mx1.abc.com http://mx1.abc.com and
> internally it will resolve to servers who handles mail for that mx
> record.
>
> Please let me know is there any nginx variable in stream which
> supports hostname i am connecting.
>
This is simple not possible. TCP doesn't have any signs of the
original domain name that was used for connect(2) on the client side.

--
Maxim Konovalov
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

TCP load balancing with domain name

aRaviNd June 21, 2018 04:38AM

Re: TCP load balancing with domain name

Maxim Konovalov June 21, 2018 04:40AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 299
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready