Your Context Has Mass: Data Gravity and the Return of Move-Compute-to-Data
The Hadoop generation learned one lesson so thoroughly it became a reflex: moving data is expensive, so move the computation to the data. Every MapReduce scheduler, every HDFS block placement decision, every "data locality" dashboard existed to serve that principle. Then, somewhere between the rise of managed model APIs and the agent boom, we quietly inverted it — and nobody repriced the decision.
Look at what a modern agent loop actually does. It retrieves a stack of documents from a vector store, pulls a repo snapshot from object storage, collects tool results from half a dozen internal services, concatenates all of it into a context window, and ships the whole payload to a model endpoint that usually lives in a different VPC, often a different region, sometimes a different cloud. Then it does it again on the next turn. And the next. Your context has mass, and you are paying freight on every hop.
The numbers are not rounding errors. Egress charges already account for 10–25% of total cloud spend at organizations running high-traffic inference workloads, and agents amplify the problem structurally: an agent consumes roughly 4x the tokens of a single-shot chat, and multi-agent systems around 15x. Token counts are a decent proxy for bytes moved. Every one of those tokens was assembled somewhere, serialized, and pushed across a network boundary that someone is billing you for — even if the line item never says "AI."
The inversion nobody priced
The move-compute-to-data principle wasn't ideology; it was arithmetic. In a 2010-era Hadoop cluster, the network was the scarcest resource, so the scheduler dispatched each map task to the node that already held the data block. Cross-switch traffic was the failure mode you tuned against.
Managed LLM APIs broke that arithmetic in a specific way: the compute became non-negotiable. You cannot run a frontier model on the node where your data lives. The GPUs sit where the provider put them, and the interface is an HTTPS endpoint. So the industry defaulted to the only remaining option — move the data to the compute — and because the payloads started small (a prompt, a few hundred tokens), the cost was invisible.
Agents ended the era of small payloads. A single agent turn routinely carries megabytes: retrieved chunks, file contents, tool outputs, and the entire accumulated conversation history, which gets re-sent on every iteration. Analyses of production agent bills consistently find that re-sent context — not new input, not output — is the dominant cost line, often around 60% of total token spend. The same dynamic plays out at the network layer. What was a chatty protocol with small messages is now a chatty protocol with heavy messages, and chatty-plus-heavy is exactly the traffic pattern egress pricing punishes hardest.
Data gravity — Dave McCrory's old observation that large datasets attract applications toward them — was supposed to be a warning about lock-in. For inference workloads it has become a literal cost function: the further your context sources sit from your model endpoint, the more every agent turn weighs.
The billable boundaries in a single agent turn
It helps to trace one turn of a production agent and count the boundaries the context crosses. A typical enterprise RAG-plus-tools loop looks like this:
- Vector store to orchestrator. Retrieval returns 20–50 chunks. If your vector database is a managed service in another VPC or region, this hop is billed egress on their side and possibly ingress processing on yours.
- Object storage to orchestrator. The agent reads files — a repo snapshot, a PDF, a spreadsheet. S3 to same-region EC2 is free; S3 to another region or another cloud is $0.02–$0.09 per GB.
- Internal services to orchestrator. Tool calls fan out across microservices. On AWS, every cross-AZ hop costs $0.01 per GB in each direction, and high-availability architectures cross AZs by design.
- Orchestrator to model endpoint. The assembled context — often 50,000–200,000 tokens by mid-conversation — ships to the inference provider. Cross-cloud, this is the full internet-egress rate of roughly $0.09 per GB on the first pricing tier.
- Repeat, per turn. A 20-turn agent session re-crosses most of these boundaries 20 times, with the payload growing each turn as history accumulates.
None of these hops appears in your model provider's invoice. Token pricing is the visible cost; the freight is smeared across your cloud bill under "data transfer," where nobody attributes it to the AI project. Teams that instrument this properly tend to discover their effective cost per agent session is meaningfully higher than the token math predicted — and that the gap is almost entirely geography.
Latency compounds the same way. Each boundary adds round-trip time, and agent loops serialize their hops: retrieve, then read, then call tools, then infer. A 40ms cross-region penalty on retrieval sounds trivial until it sits inside a loop that runs fifteen times per session, in front of a user who experiences the sum.
- https://www.suse.com/c/the-data-gravity-problem-moving-data-to-ai-vs-moving-ai-to-data/
- https://blog.purestorage.com/purely-technical/the-economics-of-data-gravity/
- https://dev.to/ntctech/ai-inference-is-the-new-egress-the-cost-layer-nobody-modeled-2kcp
- https://cast.ai/blog/data-egress-cost-how-to-take-back-control-and-reduce-egress-charges/
- https://www.nops.io/blog/aws-egress-costs-and-how-to-avoid/
- https://data-flair.training/blogs/data-locality-in-hadoop-mapreduce/
- https://www.thoughtworks.com/insights/decoder/d/data-locality
- https://getunblocked.com/blog/agent-auto-loop-token-cost/
- https://www.augmentcode.com/guides/ai-agent-loop-token-cost-context-constraints
- https://arxiv.org/pdf/2503.14649
