How Local Mode in Mesh Gateway Works?

I really want to understand how the local mode in mesh gateway config works?
Mesh Gateways between Datacenters | Consul | HashiCorp Developer)%3A-,none,-%2D%20(Default)%20No%20gateway

In the documentation, it states that this is the default mode and No gateway is used and a service mesh connect proxy makes its outbound connections directly to the destination services.
Basically in the mesh architecture diagram, it depicts that there is a flow that service A can connect with service B using mesh mode as local.
How does this work? Does it depend on clusterIPs? If so, these will not be accessible across Clusters and in this case, datacenters as well? Can someone shed some light on this?

Hi @abhiroop93,

Welcome to the HashiCorp forums!

It looks like you are mixing up the local and none mesh gateway modes. The default mesh gateway mode in Consul is none.

In a typical scenario, when you WAN federate two clusters wholly isolated from a network perspective, you should use local or remote (according to the network topology).

None mesh gateway mode can be used when you have two DCs that are WAN federated, still, the IPs are routable (for the whole cluster or a subset), and you want the clients to dial the upstream directly, bypassing the mesh gateway (two clusters in the same VPC and subnet, but WAN federated; may not be a common scenario).

The primary use-case of none is with the traditional WAN Federation (using Gossip), where no mesh gateways are involved.

I hope that answers your question.