SQL Server – Synchronizing Replication vs AlwaysOn High Availability

high-availabilitysql-server-2016transactional-replication

Just wondering if SQL Server use different technology for Transactional Replication and Alwayson High Availability or is it same behind the scene.
Basically I need to know if SQL Server use same or different technology(protocol/process) for Replication and Synchronizing the secondary replicas in High Availability in SQL Server 2016.
Thanks in advance.

Best Answer

Transactional Replication uses the TDS protocol and applies changes using SQL. The connections are established from the Distributor for Push Subscriptions, and from the Subscriber for Pull Subscriptions.

AlwaysOn Availability groups use TCP/IP connection between the replicas using the Database Mirroring Endpoint. The connections are established from the instances hosting the Secondary replicas to the instance hosting the Primary replica. But as the Primary replica can move, every server hosting a replica needs to be able to connect to every other one.