Glossary

Egress and Ingress

Ingress is network traffic coming into a network, server or cloud account from outside, and egress is traffic leaving it. The two directions shape how firewalls are set up and how cloud providers bill for data transfer.

Chandan KumarUpdated November 10, 2026Founder of Geekflare
At a glance
Ingress
Traffic coming in, such as a visitor loading your site
Egress
Traffic going out, such as your server calling an API
Also called
Inbound and outbound traffic
Where you meet them
Firewall rules, cloud bills and Kubernetes
Cost of data coming in
Usually free
Cost of data going out
$0.09 per GB on AWS after 100 GB a month free, US East

In plain words

Think of a building with one front door. Ingress is everyone walking in, and egress is everyone walking out. Security usually watches the people coming in, but a careful building also checks what leaves.

In computing, the door is a network boundary and the edge of your home network, a company's firewall, a cloud account or a Kubernetes cluster. Data entering through that boundary is ingress, and data leaving is egress.

The direction always depends on whose side you're on. When your server calls an API, the request is egress for you and ingress for the API provider. The response travels back the other way, so it's egress for the provider and ingress for you.

How they differ

Same boundary, two directions
Ingress, traffic coming in
Internet
At the edge
Load balancerFirewallIngress controller
Your network
  • A visitor opens your site
  • A webhook reaches your API
  • A customer uploads a file
Egress, traffic going out
Internet
At the edge
NAT gatewayEgress firewallProxy
Your network
  • Your server calls a third-party API
  • A visitor downloads a file
  • Logs go to a monitoring service
Ingress and egress are named from your side of the boundary. A response from an API you call is egress for that provider and ingress for you.
IngressEgress
DirectionInto your networkOut of your network
Everyday examplesPage requests, API calls to you, uploads, incoming webhooksResponses and downloads, calls to other APIs, backups, logs
Main security worryKeeping attackers outStopping data theft and compromised servers reaching out
Typical controlsFirewalls, load balancers, rate limits, web application firewallsEgress firewalls, NAT gateways, proxies, allow lists
Cloud billingUsually freeUsually charged per GB
In KubernetesIngress and Gateway API resources, NetworkPolicy ingress rulesNetworkPolicy egress rules, egress gateways

Ingress and egress in security

Most attention goes to ingress by blocking unwanted connections and only opening the ports a service needs. Egress tends to be left open. Kubernetes is a common example. By default, a pod accepts all incoming connections and can make any outgoing one, until a NetworkPolicy that names Ingress or Egress isolates it.

Leaving egress can be risky too. A compromised server can send stolen data out, which MITRE ATT&CK lists as its own stage of an attack, called exfiltration. It can also connect to an attacker's server for instructions. Egress filtering limits a server to the destinations it actually needs, so both become harder.

Egress also becomes important to secure for servers that fetch URLs for users, such as webhooks, link previews, scrapers and file importers. Without limits, a user can point them at internal addresses, like the cloud metadata service at 169.254.169.254. This is called server-side request forgery, or SSRF. The usual defence blocks private and internal address ranges on the way out, checked against the address the hostname resolves to, not only the text of the URL.

Egress fees in the cloud

What moving 1 GB costs on AWS
  • In from the internet$0
    Requests and uploads to you
  • Between zones in one region$0.02
    $0.01 at each end
  • To another AWS region$0.02
    Most routes from US East
  • Out to the internet$0.09
    After 100 GB a month free
  • Out through a NAT gateway$0.135
    $0.09 plus $0.045 processing
Per GB in US East (N. Virginia), first 10 TB a month, November 2026. Internet transfer falls to $0.05 per GB above 150 TB a month. Source: Amazon EC2 and Amazon VPC pricing.

Cloud providers charge nothing for data coming in, and charge for most data going out. Moving data between zones and regions costs less than sending it to the internet, but it adds up for chatty services. A NAT gateway, which lets private servers reach the internet, adds its own charge per GB on top.

Egress fees became a competition issue because they make leaving expensive:

  • Google Cloud in January 2024, then AWS in March 2024, stopped charging customers for data transferred out when they move to another provider. AWS gives credits for the move, and outside the EU now allows 180 days to complete it.
  • The EU Data Act allows providers to charge only their direct costs for switching until 12 January 2027, and bans switching charges, including egress for the switch, from that date.
  • The UK Competition and Markets Authority found in July 2025 that egress fees restrict switching and the use of more than one cloud. In March 2026, Amazon and Microsoft set out changes to their egress fees for UK customers, which the regulator is still reviewing.
  • Cloudflare R2 object storage charges nothing for egress.

These changes mostly cover leaving a provider.

Kubernetes Ingress

In Kubernetes, Ingress is also the name of an API object. It routes HTTP and HTTPS traffic from outside the cluster to services inside it, with rules based on hostnames and paths, and can handle TLS. It needs an Ingress controller running in the cluster to do the work.

Ways to reduce egress costs

  • Serve images, scripts and downloads through a CDN, so repeat requests are answered from its cache.
  • Compress responses with gzip or Brotli.
  • Keep services that talk to each other a lot in the same zone or region.
  • Reach cloud storage through private endpoints instead of a NAT gateway. On AWS, gateway endpoints for S3 and DynamoDB have no extra charge.
  • Fetch only what you need.
  • Watch the bill by destination.

Limitations

  • The labels depend on where you draw the boundary. The same traffic is egress for one team and ingress for another, which confuses reports and budgets.
  • Every connection carries traffic both ways. Stateless rules, such as network ACLs on AWS, need the replies allowed too, so blocking egress can break traffic that started as ingress.
  • Strict egress allow lists are hard to keep up to date when services call many third-party APIs whose addresses change.
  • Prices vary by provider, region and volume, so a rough estimate can be far off for a large or global workload.

Sources

  1. Amazon EC2 On-Demand Pricing, data transfer, AWS, 2026
  2. Amazon VPC pricing, AWS, 2026
  3. Gateway endpoints, AWS, 2026
  4. Free data transfer out to internet when moving out of AWS, AWS News Blog, 2024
  5. Cloud switching just got easier: Removing data transfer fees when moving off Google Cloud, Google Cloud, 2024
  6. R2 pricing, Cloudflare, 2026
  7. Regulation (EU) 2023/2854, the Data Act, EUR-Lex, 2023
  8. Cloud services market investigation, UK Competition and Markets Authority, 2025
  9. CMA announces package of actions on business software and cloud services, UK Competition and Markets Authority, 2026

Egress and Ingress, in short.

The questions people ask most about this one.

Browse the glossary

Ingress is traffic entering a network, server or cloud account. Egress is traffic leaving it. A visitor loading your website is ingress for the request and egress for the page you send back.

It depends on whose side you're on. When a visitor downloads a file from your server, the file is egress for you and ingress for the visitor. When your server downloads something, it's ingress for you.

The major clouds charge nothing to bring data in and charge per GB to send it out. Regulators in the UK and EU found that egress fees make it harder for customers to switch providers or use more than one, and both have pushed providers to cut them.

A firewall or network policy that limits where servers can send traffic. If a server is compromised, egress filtering makes it harder for an attacker to send data out or reach internal systems from it.

An API object that routes HTTP traffic from outside a Kubernetes cluster to the services inside it. It needs an Ingress controller to work. The Ingress API is frozen, and the Kubernetes project now recommends the Gateway API for new setups.

Put the concept to work.

500 free credits a month, no card, every endpoint unlocked. Your key is issued in under 30 seconds.