liveBook · Manning

Scalability

As explained in Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform

The ability of an application or its data-management components to accommodate increasing workload or size by expanding resources or capacity.

Scalability is the ability to accommodate more work by increasing an application’s capacity. In a microservices application, that does not have to mean enlarging everything at once: a heavily used service can receive dedicated resources or be replicated without scaling every other service. section 1.9

Choose a response to the part of the system under pressure:

  • Scale the cluster vertically or horizontally when the wider application needs more capacity. section 12.3
  • Scale an individual microservice horizontally when its workload is the bottleneck. section 12.3 section 1.9
  • Consider elastic scaling for the cluster or individual services as another route to capacity. section 12.3
  • Scale the database separately when data workload outgrows its current resources. section 12.3.6

Keep each microservice’s database separate, even if several databases initially run on one server. A database shared between different services creates a fixed integration point and potential performance bottleneck. If one separate database grows too large, move it to a dedicated server; for an extremely large MongoDB database, sharding can distribute it across multiple virtual machines. section 12.3.6

Figure 12.17 As our application grows larger, we can scale it by splitting out large databases into their own independent database servers.

The figure shows the incremental database path: start with separate databases, then move a large one onto its own server when its workload warrants it. section 12.3.6

Scale for an observed need, not a guessed future. Premature changes can complicate development and make later scaling harder. Cluster configuration changes also carry risk: try them on a separate instance rather than infrastructure that staff or customers depend on. section 12.3.7 section 12.1

How Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform covers it

How deep it goes
Outlines cluster, service, and database scaling options, but stops short of hands-on scaling procedures or advanced performance techniques.
Examples
Uses service replication and a database moved from a shared server to a dedicated server as concrete growth scenarios.
What it assumes
Assumes a working microservices application and cluster; treats scaling as a later step rather than an initial setup task.
What you can do after
Evaluate/understand when to scale a cluster, service, or database, and why to test risky changes away from production.
How it connects
Connects microservices, performance bottlenecks, horizontal scaling, elastic scaling, database isolation, and blue-green deployments.

Also explained in

Compare how 27 books explain scalability →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform. The section links point to the parts of the book it draws on.