I am trying to create a load balancer for SQL servers using Nginx (On my windows machine). To start with , I am testing, with my local system with port 12345 to another SQL Server.
To do that, I am creating a streat block on main node, and then forwarding in the server, after listening on port 12345.
events {
worker_connections 1024;
}
stream{
server {
listen 10.20.10.9:12345;
#TCP traffic will be forwarded to the "stream_backend" upstream group
proxy_pass SQLSERVERONLAN:1433 ;
proxy_bind 10.20.10.9:12345;
}
}
http {..../No Code for bravity}
I start Nginx and there are no error logs.
I checked all ports by netstat -a
and it's listening on port 12345.
But when I am using Management studio, not able to connect to the remote server after passing in the credentials.