If I set up this kind of configuration, does it serve the purpose of HA ?
and
Synchronous Commit, Automatic Failover.
Yes, it serves the purpose. Whether or not the cluster can maintain quorum in the event of a node loss is another story. Make sure there is a cluster witness resource.