Fallacies of Distributed Computing: 7. Transport cost is zero
Tags: distributedcomputing
Published: 2020-06-29 00:00:00

---
title: "Fallacies of Distributed Computing: 7. Transport cost is zero"
date: "2020-06-29T00:00:00.000Z"
tags: ["distributedcomputing"]
---

[The fallacies of distributed computing](https://web.archive.org/web/20171107014323/http://blog.fogcreek.com/eight-fallacies-of-distributed-computing-tech-talk/) are a set of assertions describing false assumptions made about distributed systems. 

[L. Peter Deutsch](https://en.wikipedia.org/wiki/L._Peter_Deutsch) drafted the first 7 fallacies in 1994, with the 8<sup>th</sup> added by [James Gosling](https://en.wikipedia.org/wiki/James_Gosling) in 1997.

The 8 fallacies are:

1. [The network is reliable](https://dereklawless.ie/fallacies-of-distributed-computing-1-the-network-is-reliable)
1. [Latency is zero](https://dereklawless.ie/fallacies-of-distributed-computing-2-latency-is-zero)
1. [Bandwidth is infinite](https://dereklawless.ie/fallacies-of-distributed-computing-3-bandwidth-is-infinite)
1. [The network is secure](https://dereklawless.ie/fallacies-of-distributed-computing-4-the-network-is-secure)
1. [Topology doesn't change](https://dereklawless.ie/fallacies-of-distributed-computing-5-topology-doesnt-change)
1. [There is one administrator](https://dereklawless.ie/fallacies-of-distributed-computing-6-there-is-one-administrator)
1. [Transport cost is zero](https://dereklawless.ie/fallacies-of-distributed-computing-7-transport-cost-is-zero)
1. [The network is homogeneous](https://dereklawless.ie/fallacies-of-distributed-computing-8-the-network-is-homogeneous)

## 7. Transport cost is zero

### The problem
Whereas the [second fallacy](https://dereklawless.ie/fallacies-of-distributed-computing-2-latency-is-zero) relates to the time taken to transport data over a network, the seventh fallacy relates to the resources required to do so.

#### Marshalling
There is a resource (and resultant latency) cost in marshalling data between the application layer ([Layer 7](https://en.wikipedia.org/wiki/OSI_model#Layer_7:_Application_Layer) on the OSI Reference Model) and transport layer ([Layer 4](https://en.wikipedia.org/wiki/OSI_model#Layer_4:_Transport_Layer)) in order to send it over the network. While this may be an abstract concern where a system is deployed on own hardware, in a cloud computing context where resource utilisation equals money, it can be a more concrete concern.

> Computing time costs money.

#### Infrastructure
The infrastructure used to set up and run the system will incur initial and ongoing costs -- for on-premises systems these may include the cost of physical hardware such as servers, switches, and routers to the salaries of the network operators who will hopefully manage everything.

For cloud computing, while physical hardware costs will of course not be a factor of concern, you will pay a premium for the resources you utilise.

### Solutions
While the cost of infrastructure is mostly outside your control, optimising its use is within your domain. Reducing the time spent marshalling data between Layers 7 and 4 may be significant, depending on the functionality provided by the system. For example, the cost of transport for systems providing audio and video streaming, telephony, or realtime collaboration features can be brought closer to zero by leveraging an optimised data format e.g. [protocol buffers](https://developers.google.com/protocol-buffers) vs. opting for JSON or XML.