On this pageEight layers, one booking app
Cloud architecture is the set of decisions about which components a system has, where each one runs, how they talk to each other and where the data lives, together with the reasons for each choice. Infrastructure is the material: servers, disks, networks, DNS zones. Architecture is the arrangement and the rationale. The same infrastructure can host a good architecture or a fragile one. This guide follows one example, an online booking service for a small business, through the components, the decisions that matter most, and the documents that let someone else understand it later.
A quick way to tell the two apart: infrastructure is what appears on the invoice; architecture is what appears on the whiteboard. Swapping one provider's servers for another's changes the infrastructure. Moving uploaded files from a server's disk to object storage changes the architecture, because it changes what happens when that server dies.
Eight layers, one booking app
Nearly every web system, from a two-server booking site to a large platform, is built from the same layers:
| Layer | Typical components | Job | In the booking app |
|---|---|---|---|
| Edge | DNS, CDN, TLS | Find the service, serve static files near users | DNS for the domain, a CDN for images |
| Entry | Load balancer or reverse proxy | Route requests, drop unhealthy servers | A reverse proxy on the front server |
| Compute | App servers, containers, functions | Run the business logic | Two app servers |
| Async | Queues, workers, schedulers | Work that can wait | A worker that sends reminder emails |
| Data | Database, cache, object storage | Keep state durable and fast | PostgreSQL, a cache, a bucket for uploads |
| Identity | Accounts, SSO, tokens, secrets | Decide who can do what | Staff single sign-on, customer logins |
| Observability | Metrics, logs, uptime checks | Show when something breaks | Dashboards and an external uptime check |
| Delivery | Git, CI/CD, infrastructure code | Change the system safely | A pipeline that deploys on merge |
Small systems merge layers onto one machine, and that is fine. The layers still exist; they just share a server.
Decide where state lives
The most consequential decision in any cloud architecture is the split between stateless and stateful parts. A stateless app server holds nothing that matters between requests, so you can rebuild it, resize it or run three copies of it. A stateful component (the database, the bucket, the queue) needs backups, careful upgrades and a recovery plan.
State likes to hide in places that turn a stateless tier stateful without anyone deciding it:
- Uploaded files on local disk. Move them to object storage.
- Sessions in process memory. Move them to the cache or the database.
- Scheduled jobs on one particular server. Run them on one worker with a lock, so any server can take over.
- A local SQLite file or a log the app reads back. Move it into the database.
Once the app tier is truly stateless, most scaling and recovery questions get simple answers. Compute also follows data: put app servers in the same region as the database, because every query pays the round trip.
Map the failure domains
A failure domain is everything that fails together: a process, a server, a physical host, a region, a provider, an account, a person. For each component, ask three questions: what happens when it fails, who notices, and how long recovery takes.
| Component | If it fails | Recovery |
|---|---|---|
| One app server | The proxy stops sending it traffic | Rebuild from the standard image |
| The database | No bookings can be taken | Promote a replica, or restore the last backup |
| The region | Everything stops | Restore off-site backups in another region |
| The admin account | You lose control of everything | Two-factor authentication, a second owner, recovery codes |
| The one person who knows the setup | Nobody can fix the rest | Runbooks and a second admin |
Two numbers make the table actionable. The recovery point objective (RPO) is how much data you can afford to lose, measured as time since the last good copy. The recovery time objective (RTO) is how long you can afford to be down. Set them per component, then check that your backups and runbooks can actually meet them.
The business view of the same system
For a small business, an architecture diagram should also answer business questions: which customer-facing functions depend on which components, who owns each one, and how long each function can be down. Write it as a second table:
| Business function | Depends on | Owner | Tolerable downtime |
|---|---|---|---|
| Online booking | DNS, proxy, app servers, database | Operations lead | One hour |
| Reminder emails | Queue, worker, email service | Operations lead | One day |
| Staff calendar | A SaaS tool | Office manager | Half a day |
| Accounting export | Database, nightly job | Finance | One week |
The table settles arguments before they happen. Online booking justifies a database replica; the accounting export does not. Add the monthly cost per row and you can see what each function costs to run and to protect.
Document it so it survives you
Diagrams with the C4 model
The C4 model describes software at four zoom levels: system context (the system, its users and the external systems it talks to), containers (the deployable units, such as apps and databases), components (the parts inside one container) and code. Most small teams need only the first two. Keep diagrams as text in the repository, so they change in the same pull request as the system. Mermaid renders inside Markdown on the major Git platforms:
flowchart LR
user[Customer browser] --> cdn[CDN]
cdn --> proxy[Reverse proxy]
proxy --> app1[App server 1]
proxy --> app2[App server 2]
app1 & app2 --> db[(PostgreSQL)]
app1 & app2 --> cache[(Cache)]
app1 & app2 --> obj[(Object storage: uploads)]
app1 & app2 --> queue[[Queue]]
queue --> worker[Worker: reminder emails]
Decisions with ADRs
An architecture decision record (ADR) is a short file per significant decision: its context, the decision and its consequences. A numbered folder of them, such as docs/adr/, explains why the system looks the way it does long after the people who chose it have moved on:
# ADR 0004: Store uploads in object storage
Status: accepted, 2026-11-18
## Context
Uploads live on app server 1, so that server cannot be rebuilt or load balanced.
## Decision
Write uploads to an S3-compatible bucket. App servers keep no local files.
## Consequences
App servers become disposable. A bucket outage blocks new uploads but not bookings.
Start simple, grow on evidence
A single server running the app, the database and the worker, with off-site backups, is a legitimate architecture for a young product. What makes it architecture rather than accident is knowing what you would split first and why. Split when measurements say so, following scale a VPS up or out, and record each split as an ADR. For the network side of the same design, see cloud networking building blocks.
On CloudSat the layers map to plain building blocks: Cloud VPS servers for the app and data tiers, a floating IP for a front door that can move between servers, and snapshots before risky changes.
FAQ
Should a small system start with microservices?
Rarely. A single application with clear internal modules, one database and a worker is easier to deploy, debug and back up. Split a piece out when it needs to scale differently, fails differently or belongs to a different team, and record the reason as an ADR when you do.
What do people mean by "types" of cloud architecture?
Three different things. Deployment models describe who owns the hardware: public, private or hybrid cloud. Service models describe what you rent: infrastructure, a platform or finished software. Application patterns describe the shape of the system: a monolith, three tiers, event-driven workers or functions.
Does a small business need a cloud architect?
It needs someone who owns the diagram, the decision records and the failure table, not a job title. An hour each quarter to update them is usually enough, plus a review whenever a new component arrives.
How detailed should an architecture diagram be?
Detailed enough to answer two questions at a glance: where does the data live, and what breaks if this box disappears? The C4 context and container levels usually do that. Deeper diagrams go stale faster than anyone updates them.
Run it on CloudSat. Cloud VPS on AMD EPYC and NVMe from $1.98/mo in 13 regions, delivered in under 5 minutes and paid in crypto. See plans or deploy a server.




