Chapter 16: Shipping and running

Serverless

Also called Functions as a service, FaaS

You hand a provider your code, and they run it on their machines when requests arrive. There are still servers. They just aren't yours to manage.

There is nothing of your own to patch or keep running. The price is limits you don't choose, code that can't count on anything staying in memory between requests, and a dependence on one provider.

Say it to your agent

“This runs on Cloudflare Workers, so don't keep state in a module-level variable and expect it on the next request, which may not reach the same instance. Put it in the database, and show me every place you read it.”

The workshop

Name a word, or describe what you mean in everyday language.