I'm fairly new to SQL Server but generally well versed in RDBMS and network topics. I'm trying to wrap my head around AlwaysOn Availability Groups. I've read a handful of articles on MSDN and Googled liberally.
I think I understand that the AAG listener appears like a service on the network, it has a hostname and/or IP address and a port number. And if you create it using SQL Server Management Studio (at least), you create it "in" the server instance which hosts the primary replica.
What I don't understand is what happens under the covers. Is the listener a thread in the server instance which hosts the primary replica? Is it a separate process? If so, does it run on the same server or elsewhere in the WFC? If it runs on the same server as the primary instance, how does the listener survive failure of that node? (The data may well be replicated to a synchronous secondary, but if I can't reach the listner, I can't be redirected to that data.)