Scalability and Load Balancing

Scalability handles growing load by scaling up (bigger machines) or out (more machines); a load balancer distributes requests across instances, and auto-scaling adjusts instance count automatically to match demand.

Key formulas & points

Skim these first — then read the full notes below.

  • A stateless application tier scales out easily
  • Sticky sessions bind a user to one backend
  • Elasticity means scaling in and out on demand

Topic details

Introduction

This topic covers handling load in the cloud. You compare vertical and horizontal scaling, understand load-balancing algorithms and session handling, and configure auto-scaling policies that add or remove capacity based on metrics.

Key relations & formulas

Formulas (Indian textbook notation)

  • horizontalscalingaddsinstances;verticalscalingenlargesonehorizontal scaling adds instances; vertical scaling enlarges one

Formulas (Indian textbook notation)

  • balancingalgorithms:roundrobin,leastconnections,weightedbalancing algorithms: round-robin, least-connections, weighted

Formulas (Indian textbook notation)

  • autoscaling:ametricthresholdtriggersaddingorremovinginstancesauto-scaling: a metric threshold triggers adding or removing instances

Notation and sign conventions

Relation 1 —
horizontalscalingaddsinstances;verticalscalingenlargesonehorizontal scaling adds instances; vertical scaling enlarges one

Formulas (Indian textbook notation)

  • horizontalscalingaddsinstances;verticalscalingenlargesonehorizontal scaling adds instances; vertical scaling enlarges one
Write this relation with symbols exactly as in Rajaraman Cloud — Standard reference before substituting numbers. Examiners award partial marks for a correct setup even when arithmetic slips.
Relation 2 —
balancingalgorithms:roundrobin,leastconnections,weightedbalancing algorithms: round-robin, least-connections, weighted

Formulas (Indian textbook notation)

  • balancingalgorithms:roundrobin,leastconnections,weightedbalancing algorithms: round-robin, least-connections, weighted
Write this relation with symbols exactly as in Rajaraman Cloud — Standard reference before substituting numbers. Examiners award partial marks for a correct setup even when arithmetic slips.
Relation 3 —
autoscaling:ametricthresholdtriggersaddingorremovinginstancesauto-scaling: a metric threshold triggers adding or removing instances

Formulas (Indian textbook notation)

  • autoscaling:ametricthresholdtriggersaddingorremovinginstancesauto-scaling: a metric threshold triggers adding or removing instances
Write this relation with symbols exactly as in Rajaraman Cloud — Standard reference before substituting numbers. Examiners award partial marks for a correct setup even when arithmetic slips.

Concept in depth

Vertical scaling (a bigger server) is simple but bounded and creates a single point of failure, so cloud systems favour horizontal scaling — adding interchangeable instances behind a load balancer. This only works well when the application tier is stateless, so any instance can serve any request; when state is kept per-server, sticky sessions must pin users to one backend, undermining even load distribution and resilience. The load balancer spreads traffic by round-robin, least-connections or weighted rules, and auto-scaling closes the loop by watching metrics like CPU or request rate and adding instances during spikes and removing them when idle — the elasticity that makes cloud economics attractive by matching cost to actual demand.

Assumptions and validity limits

State assumptions explicitly before using any relation for scalability and load balancing — steady state, uniform properties, linear elastic material, ideal gas, incompressible flow, etc., as applicable.
Wrong assumptions invalidate the entire solution even when the formula is correct. In Cloud Computing viva and GATE descriptive questions, listing valid assumptions often earns separate marks.

Step-by-step problem approach

1. Read the question and list given data with SI units (common in Cloud Computing papers).
2. Draw a neat labelled diagram where applicable — examiners in Indian universities award diagram marks even when arithmetic slips.
3. Identify which relation from this topic applies to scalability and load balancing.
4. Use equation 1:
horizontalscalingaddsinstances;verticalscalingenlargesonehorizontal scaling adds instances; vertical scaling enlarges one
.
5. Use equation 2:
balancingalgorithms:roundrobin,leastconnections,weightedbalancing algorithms: round-robin, least-connections, weighted
.
6. Substitute values, compute, and verify units and sign (direction).
7. State conclusion in one line — e.g. safe/unsafe, stable/unstable, feasible/infeasible.

Applications & exam relevance

Scalability and Load Balancing appears in SaaS/PaaS deployments. In Indian it software curricula this topic is tested because it connects theory to virtualization and cloud service models.
GATE and semester exams often combine scalability and load balancing with earlier units — revise prerequisites before attempting mixed problems.
Industry interview panels sometimes ask: "Where did you use scalability and load balancing?" — answer with a lab, mini-project, or plant visit example if possible.

Common mistakes in exams

Students design a stateful application tier and then struggle to scale out, forget that vertical scaling has hard limits and downtime, and confuse a load balancer with auto-scaling (distribution versus capacity change). Assuming sticky sessions are free of resilience cost is an oversight.

Quick revision checklist

Before attempting scalability and load balancing problems, confirm you can:
1. A stateless application tier scales out easily
2. Sticky sessions bind a user to one backend
3. Elasticity means scaling in and out on demand
Revise the solved examples in Rajaraman Cloud — Standard reference and one previous-year GATE or university paper for this unit.

Worked examples

Try the problem first — open the solution when you are ready to check.

Instances for peak load

Problem

One instance handles 250 requests/s and peak demand is 1800 requests/s. How many instances are needed with one spare for failover?

Solution

Base = ceil(1800/250) = ceil(7.2) = 8 instances; add one spare for failover = 9. Horizontal scaling plus a buffer absorbs the peak and tolerates a single failure.

Conceptual check — Scalability and Load Balancing

Problem

In a Cloud Computing semester or GATE paper you are asked: "State the main assumption, the governing relation, and one practical consequence of scalability and load balancing." What should a complete answer include?

📖 Standard books (India)

  • Rajaraman CloudStandard reference

    Read: Syllabus unit

    Referenced in Indian B.Tech syllabus