tezvyn:

Slash Your Cloud Bill by Taming Data Egress Costs

AI-drafted, machine-checkedSource: cloud.google.comadvanced
Slash Your Cloud Bill by Taming Data Egress Costs

Data egress is the tax for moving data out of a cloud provider's network, a common cost in MLOps when moving models or datasets. To save money, keep compute and data in the same region. The footgun is forgetting that traffic between regions also counts.

WHY IT EXISTS: Cloud providers want to keep data and compute within their ecosystem. They charge little to nothing for data ingress (moving data in) but charge fees for data egress (moving data out) to incentivize customers to stay. This becomes a major operational cost for data-heavy workloads like machine learning.

THE MENTAL MODEL: Think of data egress as shipping fees. Moving boxes within your own warehouse (e.g., within the same availability zone) is cheap or free. Shipping to another warehouse in a different city (another region) costs more. Shipping to a customer across the country (the public internet) is the most expensive. Your goal is to minimize these shipping costs by keeping data and the computers that process it as close together as possible.

HOW IT WORKS: Cloud providers track network traffic leaving their defined network boundaries. These boundaries can be an availability zone (AZ), a region, or the provider's entire global network. Costs are typically calculated per gigabyte or terabyte transferred. For example, moving a 1TB model from a training environment in us-east-1 to an inference server in eu-west-1 will incur egress charges from us-east-1.

WHEN TO USE IT: You should actively optimize egress costs when you frequently move large artifacts. This is common in MLOps for three main reasons: first, distributing large training datasets to clusters across zones or regions; second, deploying multi-gigabyte models from a central registry to inference endpoints globally; and third, replicating data for disaster recovery.

WHEN NOT TO USE IT: For small-scale projects with infrequent model deployments and small datasets, the engineering effort to optimize egress might outweigh the savings. If your total egress cost is a tiny fraction of your cloud bill, focus on bigger cost centers like compute or storage first.

ONE CANONICAL EXAMPLE: A team trains a 50GB computer vision model in AWS us-east-1. They need to deploy it to inference servers in 10 different regions worldwide. Without optimization, they would pay egress costs 10 times to transfer the 50GB model out of us-east-1. A better strategy is to use a content delivery network (CDN). They pay egress once to move the model to the CDN's edge locations, and subsequent downloads by regional servers are served from the CDN, often at a lower data transfer cost.

Read the original → cloud.google.com

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.