Everything Old Is New (Again, and Again…)

This post is inspired by a talk that Kelsey Hightower gave at Serverless Days NYC back in 2018, well before the pandemic. He pointed out that the Lambda / FaaS is pretty much a repeat of the inetd program from the 1970s!

I thought this was a pretty awesome idea! At the time, I was just starting the journey of a new serverless stack build on Kubernetes, and it was pretty cool to realize that I was re-inventing a fairly old wheel.

Why is it so exciting to be reinventing an existing wheel?

Reinventing a wheel means that an existing idea was popular enough to be worth doing again, with better tools. Looking at a brief history of FaaS, we can see that each generation added on to the one before:

  • 1970s: inetd
    Execute a program per network connection. You can use the OS to clean up all the resources after a connection completes! With inetd, it’s possible to provide a network service without needing to carefully track memory usage, etc.
  • 1990s: cgi-bin
    inetd for the web! It’s easy to build a dynamic page or set of pages using a scripting language for the page rendering, and Apache (or the equivalent) for the actual handling of the HTTP protocol. HTTP has a bunch of nice advantages over raw TCP sockets, including better IP/port usage and more-universal discovery.
  • 2000s: 12 factor (Heroku, App Engine, Cloud Foundry, etc)
    After getting some experience with cgi-bin, the 12-factor manifesto laid out a set of design principles to allow applications to scale horizontally across many machines. With this pattern, applications could be scaled dynamically across multiple machines. Heroku, Google App Engine, and Cloud Foundry all provided various versions of this.
  • 2010s: FaaS (AWS Lambda, Azure Functions, Google Cloud Functions, etc)
    AWS Lambda kicked off a new revolution by removing the “HTTP” part of 12 factor app and replacing it with provider-defined language bindings. By using Inversion of Control (IoC), developers only needed to focus on their business logic, not how a request was formatted.

In my next few posts, I’ll be musing a little bit about the different computation models that we’ve developed on a single machine (ala inetd), and how those might apply in a distributed, warehouse-scale computing model like Kubernetes.

0 thoughts on “Everything Old Is New (Again, and Again…)

Leave a Reply

Your email address will not be published.