Join our Newsletter — 33% off our NHI Course
Home› Guides› Scaling for Beginners: How Systems Grow and What…
Guide Cloud Security

Scaling for Beginners: How Systems Grow and What It Means for Security

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 1 December 2026 9 min read
On this page

Scaling is how a system grows to handle more work, by making one machine bigger or adding more machines.

This guide is for anyone who hears "it will scale" in meetings and wants a plain answer. You do not need to be an engineer. It also shows why each extra machine matters for security.

In short

  • Vertical scaling means making one machine bigger. Horizontal scaling means adding more copies.
  • Autoscaling adds and removes copies automatically as demand changes.
  • Every new copy is a new workload that needs its own identity and permissions, so mistakes are copied too.
  • Set limits, use short-lived credentials from a role, and watch the system when it hits its maximum.

What you will learn

  • Explain the difference between scaling up and scaling out.
  • Describe what autoscaling does and where it can go wrong.
  • Spot why copied machines can copy secrets and permissions.
  • Ask three useful questions about any system that scales.
Copy (instance)
one running machine or container doing the work.
Traffic sharer (load balancer)
the part that spreads incoming requests across the copies.
Upper limit (maximum)
the most copies the system is allowed to run.

What is scaling?

Think of a busy café. You can buy a bigger coffee machine, or you can open more tills with more staff. Both serve more people.

Computers grow in the same two ways. Microsoft calls it vertical scaling when you change the size of one resource, such as a move to a bigger virtual machine. The system is often down for a short time while this happens [1].

Horizontal scaling means adding or removing copies of a resource. Existing copies can keep serving while new ones start [1]. In Kubernetes, scaling out means running more Pods. A Pod is a small packaged copy of an app. Scaling up means giving the running Pods more memory or CPU [2].

Where the comparison stops working: new staff need training and their own key to the till. New computer copies need permissions too. They get them from whatever the original was given.

Why does it matter?

Most online services you use scale out behind the scenes. How they do it affects cost, reliability and security.

If you manage a team or budget

What could happen: autoscaling with no upper limit runs up a large bill during a traffic spike or attack.

Check this: ask what the maximum number of copies is and who gets an alert when it is reached.

Next: Cloud Computing for Beginners

If you are new to security work

What could happen: a password or key stored inside a machine image is copied into every new copy.

Check this: ask how each copy gets its credentials. A role that hands out short-lived credentials is the safer answer.

Next: Cloud Workload Identities for Beginners

If you build or run apps

What could happen: copies are removed mid-task and lose work, or the database behind them becomes the real bottleneck.

Check this: find the slowest shared part before adding more copies.

Next: Container Security for Beginners

What does it look like?

Here is a made-up scaling rule in plain words. Real rules use each platform's own settings. They cover the same points.

Example only. All values are made up.

Scaling rule: EXAMPLE-shop-web
Minimum copies:   2                                  (1)
Maximum copies:   10                                 (2)
Add a copy when:  busy above 70% for 5 minutes       (3)
Remove a copy when: busy below 30% for 15 minutes    (4)
Identity:         role EXAMPLE-shop-web-role         (5)
  1. Keeps some copies running so the service is never cold.
  2. The upper limit. It caps cost and the number of identities in use.
  3. The trigger for scaling out.
  4. The trigger for scaling in. A gap between the two numbers stops constant flipping.
  5. In a real file, this line would contain the name of the role each copy uses to get short-lived credentials, not a stored key.

Why this is risky: say line 5 held a long-lived key instead. Every new copy would carry that same key. Removing copies would not remove it.

The safer way: give copies a role with only the access they need. Then each copy gets its own credentials, and they expire on their own.

How does it work?

  1. Measure demand. The platform watches signals such as CPU use or the number of requests.
  2. Compare with a rule. Autoscaling adds resources as demand grows and removes them as it falls, to keep performance up and cost down [1].
  3. Start new copies. Each copy is built from the same image or template, so it inherits the same settings.
  4. Share the traffic. A load balancer sends requests to the new copies once they are ready.
  5. Remove copies safely. When demand drops, Microsoft advises scaling in only when the remaining copies can cope, and draining work from departing copies first [1].
Diagram titled Scaling up versus scaling out. Four boxes in a row joined by arrows. Busy service: more visitors than one server can serve. Scale up: give the same server more memory and CPU. Scale out: add more copies behind a load balancer. Each new copy: starts with its own identity and permissions. A note underneath says autoscaling adds and removes copies by rule, so set a maximum and give every copy short-lived credentials from a role, never a key baked into the image.
Figure 1. Two ways to grow, and why every new copy needs a safe identity.

The identity part is easy to miss. AWS notes that it is hard to hand out credentials safely to each machine, especially machines in Auto Scaling groups that AWS creates for you. Its answer is to use a role, with least privilege policies, so the application fetches temporary credentials [3]. Each copy is a non-human identity, and the scaling rule decides how many exist at once.

Limits matter as well. Microsoft advises setting a maximum number of copies, checking quotas and downstream capacity, and alerting when the maximum is reached [1]. More copies do not always mean better speed: a database or another shared service can still be the bottleneck [1].

A worked example

This story is made up to show the idea.

Elif Zamora runs the website for a small ticket seller. A popular concert goes on sale and the site slows to a crawl.

Her first fix is to scale up: a bigger server. It helps, but the switch causes a short outage, and the next sale is even busier.

She asks why. The server had to restart to get bigger, and there is a limit to how big one server can get.

She moves to scaling out instead. The site now runs as several copies behind a load balancer, with autoscaling between 2 and 12 copies.

While reviewing the setup, her colleague Marek Engel spots a problem. The machine image has a payment service key saved in a settings file. Every new copy would carry the same key, and nobody could tell which copy used it.

They move the key to a secrets store and give the copies a role that fetches short-lived credentials. They also add an alert when the site hits 12 copies.

Marek also checks the database. More web copies would not help if the database was the slow part. It copes, so they leave it for now.

At the next sale the site scales to 9 copies and back down. Elif learned that scaling out is about more than speed: every copy is another identity to control.

Myths and mistakes

What people thinkWhat is true
More copies always make a system faster.A database or other shared service may still limit speed [1].
Autoscaling needs no limit.A maximum caps cost and resource use, and should raise an alert when reached [1].
Copies are temporary, so their secrets do not matter.A key baked into an image outlives every copy that used it. Use a role with temporary credentials [3].
Scaling up and scaling out are the same.Scaling up makes one machine bigger; scaling out adds more copies [2].
Removing a copy is always safe.A copy removed mid-task can lose work, so drain it first [1].

What can I do this week?

  • Pick one service your team runs and find out whether it scales up, out, or not at all.
  • Ask what the maximum number of copies is, and who is alerted when it is hit.
  • Ask how new copies get credentials. Look for keys stored in images or settings files.
  • Read Cloud Workload Identities for Beginners.

Checklist

  • I can explain scaling up and scaling out in one sentence each.
  • I know autoscaling adds and removes copies by rule.
  • I check that every scaling rule has a maximum.
  • I know each copy is a workload identity with its own permissions.
  • I look for keys stored inside machine images.
  • I know the database can be the bottleneck, not the servers.
  • I check that copies are drained before they are removed.

Common questions

Which is better, horizontal or vertical scaling?

Neither is always better. Scaling up is simple but has a ceiling and often needs a short outage. Scaling out can keep serving while copies are added, but the app has to be designed to run as many copies [1].

What is autoscaling?

It is the platform adding or removing resources automatically to match demand. Performance holds up when the service is busy, and costs fall when it is quiet. You set the rules, including the smallest and largest number of copies [1].

Why is scaling a security topic?

Each copy needs permissions to do its job. If those come from a shared stored key, the key spreads to every copy. If they come from a role with temporary credentials, each copy gets its own short-lived access [3].

What is flapping?

Flapping is when a system keeps adding and removing copies, back and forth, without settling. It wastes money and can disturb users. Leaving a clear gap between the add and remove thresholds helps avoid it [1].

Where next?

Ready for the detail? Read the practitioner guide: Cloud Security Guide. It covers how to secure cloud workloads, identities and settings at scale.

Also useful:

Related NHI Mgmt Group resources: Cloud Misconfigurations for Beginners and Least Privilege for Beginners.

Key terms

Horizontal scaling
Growing a system by adding more copies of a machine or service and sharing the work between them.
Vertical scaling
Growing a system by giving one machine more memory or processing power.
Autoscaling
Adding or removing resources automatically, by rule, as demand changes.
Load balancer
A service that spreads incoming requests across several copies of an application.
Non-human identity
A digital identity used by software, such as a service, workload, script or AI agent, rather than a person.

Sources and further reading

  1. Microsoft, "Autoscaling", Azure Architecture Center, Microsoft Learn. https://learn.microsoft.com/en-us/azure/architecture/best-practices/auto-scaling (accessed 1 Dec 2026).
  2. The Kubernetes Authors, "Horizontal Pod Autoscaling", Kubernetes documentation. https://kubernetes.io/docs/concepts/workloads/autoscaling/horizontal-pod-autoscale/ (accessed 1 Dec 2026).
  3. Amazon Web Services, "IAM roles for Amazon EC2", Amazon EC2 User Guide. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html (accessed 1 Dec 2026).

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.