Layer Above, Layer Below

Jan 18, 2022

In software engineering, you should always understand at least one layer of abstraction above and below the one you're working at.

The advice translates well to software businesses as well. Its why Cloudflare can counter position itself against AWS. The network layer is below the application layer. The 7-layer Open Systems Interconnection (OSI) model is an example of how to separate abstraction layers for networking (the terminology is a bit outdated but it's still commonly used).

You can look at the story of Telcos vs. Internet and AWS vs. Applications ("dumb pipes"?) through this framework. Where does one start and the other end? Some lessons.

You can do more at higher abstractions. There are two layers to do load balancing – the Transport Layer (L4) and the Application Layer (L7) using the OSI model. L4 load balancers don't know anything about the application – it just moves bytes back and forth – a dumb pipe. L7 load balancers know more about the protocols – TLS, HTTP, or gRPC. L7 load balancers (like Envoy, NGINX, and HAProxy) make some of the benefits of service meshes possible – service discovery, better load balancing, TLS termination, sticky sessions.

Companies build moats around a layer. The best build moats around multiple layers. Google's strategy is to protect Search. The layer above search is the web browser – hence Chrome (and its PM, Sundar Pichai, became CEO). The layer below relates to how websites are built and scraped. Walled gardens (e.g., Facebook) attack Google from the other side, with unindexable content.

Cloudflare operates mostly at the network layer. This lets it get around the deep moats of certain businesses. AWS has built a moat with network egress costs that Cloudflare hopes to beat with its storage solution.

When the layer above you starts to form, you must move up the stack. Microsoft almost missed this with Netscape. No longer was the operating system the highest layer of abstraction (now everything is a browser). Luckily, the more layers you operate in, the more you can shift costs. The lower layers initially always have distribution.