1

I'm trying to get a clearer picture of how communication works with Availability Groups. I know the listener technically 'lives' in the sqlserver.exe process on the primary server. I also know that the primary server has 2 IP addresses when its the primary. One corresponding to the listener IP and one corresponding to the server itself.

My question is that, when an application connects through the listener, does all subsequent traffic get routed back through the listener? Or does the listener simply point the application to the correct server and it connects directly to the primary? Basically, does traffic take 2 hops back through the listener or is a connection made directly to the actual sql server?

  • You should be able to confirm this yourself using netstat.exe from a client who is connected to the server. – Max Vernon Feb 7 '17 at 17:54
  • @MaxVernon, I gave that a shot, I'm seeing connections to both the listener and the destination server. Is there additional filtering that I need to do? I ran netstat -a before opening a connection to SQL to verify there were no connections active to the AG. – Kris Gruttemeyer Feb 7 '17 at 18:05
  • I added the -n switch and see a connection on port 135 to the server itself and 1433 for the listener IP. Does that prove that traffic is actually routed through the listener? – Kris Gruttemeyer Feb 7 '17 at 18:08
  • well, if there's a connection on 1433 to the listener's IP, and not the other IP, then I'd say you've got the answer. You could check while query results are being returned if you really want to be certain. You could check the server's error log to see what IP address(es) it's listening on – Max Vernon Feb 7 '17 at 18:27
  • 1
    Just verified, it's through the listener. Thanks for the help Max! – Kris Gruttemeyer Feb 7 '17 at 18:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.