liveBook · Manning

Container

As explained in Grokking Software Architecture

An isolated, portable execution environment that packages an application with its dependencies while sharing the host operating system kernel.

A container is a standardized box for an application: it packages the app, its runtime, and its dependencies into an executable image. Like a shipping container, the box makes its contents predictable; instances created from the same image are identical. section 9.4.2

Containers trade some convenience for portability and control:

  • Portability: an image built on a laptop can run the same way on an AWS server. section 9.4.2
  • Operational work: you still manage the container fleet; hundreds of containers may require Kubernetes to place them and restart failures. section 9.4.2
  • Cost: billing continues while a container is running. section 9.4.2
Table 9.1 Architect’s Cheat Sheet: The Compute Spectrum
Model
What It Is
Control Level
"Clarity" Best Use Case
The Hidden Architectural Trap
IaaS (Virtual Machines)
Renting the metal.
High (OS-level access)
Legacy applications or strict legal/compliance requirements.
"Lift and Shift": Moving legacy problems to the cloud and paying 24/7 for idle time.
CaaS (Containers)
Renting the shipping port.
Medium (Environment & runtime)
Standardized, portable deployments across different environments.
Orchestration Overhead: You still have to manage the complex system (Kubernetes) and route the boxes.
PaaS (Platform as a Service)
Renting the runtime.
Medium-Low (App code & config only)
Rapid prototyping and standard web apps, where you want zero infrastructure chores without learning Docker.
The "Black Box": If your app suddenly needs a custom system-level library, you are out of luck and heavily locked into that vendor's ecosystem.
FaaS (Serverless)
Renting the millisecond.
Low (Pure logic/code)
Spiky traffic or new startups wanting infinite scale with zero idle costs.
 "Cold Starts" and Time Limits: Latency spikes when waking up code, and hard execution limits that brutally kill long-running processes mid-flight.
AIaaS (AI Models)
Renting the reasoning.
Zero (Prompts & payload)
Adding complex language or data processing without building ML infrastructure.
Hallucinations: The model confidently invents facts, requiring strict "RAG" guardrails.

Compare containers with other deployment models by control level, best use case, and architectural traps. section 9.4.6

How Grokking Software Architecture covers it

How deep it goes
Explains image packaging, identical instances, portability, orchestration, and running costs without detailing container internals.
Examples
Uses Node.js and Python runtimes, a Docker image, laptop-to-AWS portability, and a fleet of 500 containers.
What you can do after
Evaluate deployment choices by weighing portability against orchestration work and ongoing costs.
How it connects
Relates containers to Docker, Kubernetes, Containers as a Service, virtual machines, and serverless deployment.

Also explained in

Compare how 32 books explain container →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Software Architecture. The section links point to the parts of the book it draws on.