liveBook · Manning

Horizontal scaling

As explained in Refactoring to Rust

Horizontal scaling is increasing service capacity by running additional instances of a system.

Horizontal scaling increases service capacity by adding instances to an already running service. It duplicates the system across extra servers, machines, or processes without changing the machine configuration. section 8.2

Scaling addresses performance limits alongside rewriting. Unlike vertical scaling, which adds resources to one machine, horizontal scaling requires the application to behave as a distributed system. section 8.2

Running two processes

Running `python main.py & python main.py` starts two application processes. If both produce `single.png`, one process overwrites the other: the mathematical function may be idempotent, but the service is not structured for unique outputs. section 8.2

How Refactoring to Rust covers it

How deep it goes
Defines horizontal scaling, contrasts vertical scaling, and demonstrates process duplication before addressing distributed-service code changes.
Examples
Demonstrates concurrent Python processes producing the same `single.png` output and overwriting one another.
What it assumes
Assumes familiarity with running applications and introduces bottlenecks, scaling choices, and distributed-service requirements.
What you can do after
Diagnoses why duplicated service instances can collide on outputs even when the underlying computation is idempotent.
How it connects
Connects horizontal scaling with bottlenecks, vertical scaling, distributed systems, idempotence, and service output handling.

Also explained in

Compare how 13 books explain horizontal scaling →

Related concepts

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