> For the complete documentation index, see [llms.txt](https://docs.console.zenlayer.com/welcome/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.console.zenlayer.com/welcome/elastic-compute/networking/bandwidth/06a-instance-to-instance-traffic.md).

# Instance-to-Instance Traffic and Billing

When two instances on the platform talk to each other, whether public network charges apply depends on the destination address. Traffic to the peer's private IP stays on Zenlayer's private network and isn't billed as public traffic. Traffic to the peer's EIP leaves the platform's public network edge and comes back, so it's billed as public traffic — even when both instances are in the same region and the same VPC.

## At a Glance

| How instances connect                                 | Traffic path                                                                 | Public network charges                                                        | Other charges                                                                                                               |
| ----------------------------------------------------- | ---------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| Same region, to the peer's private IP                 | Directly between compute nodes                                               | None                                                                          | None                                                                                                                        |
| Across regions (Global VPC), to the peer's private IP | Over Zenlayer's cross-region private network                                 | None                                                                          | [Cross-Region Bandwidth](/welcome/elastic-compute/networking/cross-region/03-region-links.md), billed hourly at a flat rate |
| Any region, to the peer's EIP                         | Out through the public gateway and border routers, back in over the internet | Billed: counts as egress on the source EIP and ingress on the destination EIP | None                                                                                                                        |

> **Recommendation**: For service traffic between instances on the platform (databases, caches, internal APIs), connect to private IPs or private domain names, not EIPs.

## Private IP Path

When an instance reaches another instance in the same VPC by private IP, the traffic stays on Zenlayer's private network. It doesn't pass through the public gateway and doesn't use any EIP's bandwidth.

![Private-IP traffic stays on Zenlayer's network; free within a region](https://3201622183-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9X3FDdkCL2HzhbPpPMFt%2Fuploads%2Fgit-blob-e4de4b425a319cec8322c9d932653d9ee70fb9c2%2Finstance-private-ip-paths.svg?alt=media)

1. **Same node**: Both instances run on the same compute node, and traffic is forwarded within the node.
2. **Same region, different nodes**: Traffic goes through a private tunnel straight from the source compute node to the destination compute node, without passing through any gateway.
3. **Across regions**: The instances are in different regions of the same Global VPC. Traffic passes through the cross-region gateways at both ends and Zenlayer's cross-region private network, and its throughput is capped by the Cross-Region Bandwidth you purchased.

## EIP Path

When an instance reaches another instance's EIP, the platform treats the traffic as public traffic: it leaves the platform's public network edge, and upstream networks route it back over the internet. There is no internal shortcut for the platform's own EIPs, even when both instances are in the same region and the same VPC.

![Traffic to another instance's EIP leaves the platform and returns; both EIPs meter it](https://3201622183-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9X3FDdkCL2HzhbPpPMFt%2Fuploads%2Fgit-blob-2dc670f87fec1744eb8df3f044bc96f8d7f9f716%2Finstance-eip-path.svg?alt=media)

1. Traffic from Instance 1 to EIP2 reaches the public gateway, where its source address is translated to EIP1. It counts as **EIP1 egress**.
2. The traffic leaves the platform through a border router, and upstream networks route it back to the border router that announces EIP2.
3. The public gateway translates the destination EIP2 to Instance 2's private IP, counts the traffic as **EIP2 ingress**, and delivers it to Instance 2.
4. Instance 2's replies take the reverse path and count as EIP2 egress and EIP1 ingress.

[Standard EIPs, Bypass EIPs](/welcome/elastic-compute/networking/standard-vs-bypass-eip.md), and public IPv6 addresses follow the same path and are metered the same way.

## Billing

Public network billing meters only traffic that passes through an EIP (the public network exit). Any traffic whose destination is an EIP is billed as public traffic, even if the peer is also on the Zenlayer platform. Traffic between private IPs is never billed as public traffic.

| Billing method                                                                           | Metered direction                            | How EIP1 → EIP2 traffic is counted                                                            |
| ---------------------------------------------------------------------------------------- | -------------------------------------------- | --------------------------------------------------------------------------------------------- |
| [Flat Rate](/welcome/elastic-compute/networking/bandwidth/04-flat-rate.md)               | Egress only                                  | Uses EIP1's egress bandwidth; billed hourly by bandwidth cap, with no separate traffic charge |
| [Data Transfer](/welcome/elastic-compute/networking/bandwidth/03-data-transfer.md)       | Egress only                                  | Counts toward the egress traffic (GB) of EIP1's instance; EIP2 ingress isn't billed           |
| [Bandwidth Cluster](/welcome/elastic-compute/networking/bandwidth/05-aggregated-95th.md) | Larger of the ingress and egress 95th values | Counts as both EIP1 egress and EIP2 ingress                                                   |

For the metered direction of each billing method, see [Billing Direction](/welcome/elastic-compute/networking/bandwidth/06-billing-direction.md).

Private traffic is billed as follows:

* Private IP traffic within a region: free.
* Private IP traffic across regions (Global VPC): no public network charges. You purchase [Cross-Region Bandwidth](/welcome/elastic-compute/networking/cross-region/03-region-links.md), billed hourly at a flat rate. Each Global VPC includes 10 Kbps of free bandwidth for connectivity testing.

## FAQ

**Two instances are in the same VPC. Is traffic between them over EIPs still billed?**

Yes. An EIP is a public address. Traffic to an EIP is forwarded by public routing and crosses the platform's public network edge, regardless of whether the instances share a VPC or a region.

**With EIP-to-EIP traffic, which side is charged?**

Usually only the sender. Data Transfer and Flat Rate meter egress only: traffic from Instance 1 to EIP2 counts as EIP1 egress and is charged to EIP1, while EIP2 isn't charged for receiving it. Replies work the same way: Instance 2's replies count as EIP2 egress and are charged to EIP2.

If the EIPs are in a Bandwidth Cluster, the billable value is the larger of ingress and egress, so the traffic EIP2 receives can also be charged.

**How can I tell whether my workloads talk to each other over EIPs?**

Check whether the peer addresses your applications use (connection strings, configuration files, DNS results) are EIPs. You can also check EIP traffic monitoring in the console: if a workload only talks to other instances on the platform but its EIP still shows significant traffic, internal calls are usually going through the EIP.

**For cross-region traffic, what's the difference between using EIPs and private IPs?**

With EIPs, traffic crosses the internet, is billed as public traffic, and its quality depends on public links. With private IPs, you place the instances in the same Global VPC and purchase [Cross-Region Bandwidth](/welcome/elastic-compute/networking/cross-region/03-region-links.md); traffic stays on Zenlayer's private network and is billed as Cross-Region Bandwidth.

**An instance reaches the internet through a NAT gateway. Is traffic from it to another instance's EIP billed the same way?**

Yes. The traffic leaves through the NAT gateway's EIP and counts as egress on that EIP and ingress on the destination EIP.
