liveBook · Manning

Cloud computing

As explained in Grokking Software Architecture

The on-demand delivery of computing resources and services over a network, typically with scalable provisioning and usage-based billing.

“It works on my machine” is less reassuring when the application leaves your laptop. Cloud computing provides rented computing resources over a network, letting a system provision virtual servers as needed rather than relying on a particular physical machine. section 9.1 section 9.1.3 section 9.3.2

The public cloud is not magic: it runs on physical hardware in providers’ data centers. Think of it like an apartment building: tenants have separate spaces, but share the foundations. That sharing can create a noisy neighbor problem: another tenant’s heavy network or disk use can slow your application down. section 9.1.1

Cloud resources can expand and contract, but flexibility comes with operational complexity and potentially higher usage costs. Dropping a rigid on-premises design into an elastic environment can leave it unable to cope with changing demand. Infrastructure as Code helps by describing the required environment in declarative blueprints that can be provisioned automatically. section 9.1.3

Treat virtual servers as replaceable cattle, not carefully tended pets. If one stops responding, automation can terminate it and start another. But replacement is safe only if the server is not holding unique data: keep sessions, uploads, and other state in persistent external storage rather than on its local disk. section 9.3.2 section 9.3.3

Listing 9.1 Stateful Design vs. Stateless Design
# Wrong (Stateful): Saves user upload to the fragile local filesystem
with open('profile.jpg', 'wb') as f:
    f.write(user_upload)
 
# Right (Stateless): Saves user upload directly to an external S3 Bucket
import boto3
boto3.client('s3').put_object(Bucket='mybucket', Key='profile.jpg', 
Body=user_upload)

Compare an upload saved on a disposable server’s local disk with one sent directly to an S3 bucket. section 9.3.3

The practical decision rule: plan for servers to disappear, store important state elsewhere, and weigh the benefits of elasticity against shared-resource behavior, operational work, and usage costs. section 9.1.1 section 9.1.3 section 9.3.3

How Grokking Software Architecture covers it

How deep it goes
Explains multi-tenancy, cost tradeoffs, and stateless design while leaving detailed cloud administration and operating-system configuration aside.
Examples
Uses an apartment-building analogy for multi-tenancy and contrasts a local profile-image upload with an external object-store upload.
What you can do after
Evaluate cloud architecture for shared-resource risks, usage costs, and the safe replacement of servers holding application state.
How it connects
Connects cloud computing to infrastructure as code, stateless design, auto-scaling, and persistent storage.

Also explained in

Compare how 14 books explain cloud computing →

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.