Sub topic 6
The stack: from hardware to application
This chapter assumes you know what a server, an operating system, and an application are. It also assumes you are comfortable with basic networking terms such as IP address and HTTP. Here you build the layered model that the rest of the tutorial uses to explain IaaS, PaaS, and SaaS.
Why think in layers
Every running application depends on a pile of components. Each one relies on the one below it. This pile is the technology stack. Cloud service models differ in one respect: which layers the provider operates for you and which layers you operate yourself. If you can name the layers, you can predict what each model leaves on your plate.
The layers, bottom to top
The list below uses the common simplified view of the stack, ordered from the physical machine up to the user-facing product.
- Facilities and hardware. Buildings, power, cooling, physical networking, servers, and disks.
- Virtualization. Software that splits physical machines into virtual machines (VMs) and pools their resources.
- Operating system. The kernel and system services inside a VM, such as Linux or Windows, plus its patches.
- Runtime and middleware. The language runtime (for example Python or Java), web server, and libraries your code needs.
- Application. The code that implements the features, such as a Flask app.
- Data and configuration. The records, settings, and user accounts that make the application yours.
Arrows point upward because each layer depends on the one below it. If a lower layer fails, everything above it is affected.
Seeing the layers in practice
You can find each layer in a simple deployment. Suppose you run a small Flask app on a Linux VM.
from flask import Flask
application = Flask(__name__)
@application.route("/")
def index():
return "Hello from the stack"This file is only the application layer. To run it, something must also supply the following:
- A physical server in a data center (hardware).
- A hypervisor that creates the VM (virtualization).
- An installed Linux system with security updates (operating system).
- Python and the Flask package (runtime and middleware).
The application code is a small part of the whole stack. Most of the work in running software happens below it.
Where the cloud draws the line
Cloud providers take over layers from the bottom upward. The higher the provider reaches, the less you manage. The table gives a preview of the split that later chapters examine in detail.
| Layer | IaaS | PaaS | SaaS |
|---|---|---|---|
| Facilities and hardware | Provider | Provider | Provider |
| Virtualization | Provider | Provider | Provider |
| Operating system | You | Provider | Provider |
| Runtime and middleware | You | Provider | Provider |
| Application | You | You | Provider |
| Data and configuration | You | You | You (mostly) |
The data and configuration row stays with you in every model. Even in SaaS you decide who gets access, what data you enter, and how the product is configured.
Common mistakes
- Treating "the cloud" as one thing. The same provider can offer services at every layer. Ask which layers a specific service manages.
- Forgetting the lower layers still exist. In PaaS and SaaS the operating system and hardware are still there. The provider operates them.
- Assuming the provider owns your data. The data layer is generally your responsibility, including access control and backups.
Exercise
A team runs a Python web app on a rented virtual machine and installs the OS patches themselves. Which layers does the team manage, and which layers does the provider manage?
Show answer
The team manages the operating system, runtime and middleware, application, and data and configuration. The provider manages the facilities and hardware and the virtualization layer. This split matches IaaS.
Exercise
Which layer stays with you in all three service models, and why?
Show answer
Data and configuration. Even in SaaS you choose what data to store, who can access it, and how the product is set up, so you remain responsible for it.