Cloud Load Balancing and Scaling Essentials Quiz

Test your knowledge of load balancing strategies and scaling techniques in cloud architectures. This quiz covers key concepts, best practices, and real-world scenarios to help you understand efficient distribution of workloads and elastic scaling in cloud environments.

  1. Types of Load Balancing

    Which type of load balancing distributes client requests based on current server workload, such as CPU usage or memory utilization?

    1. Random selection
    2. Round robin
    3. Hash-based
    4. Least connections

    Explanation: Least connections load balancing directs incoming requests to the server with the fewest active connections, which often correlates with lighter resource usage. Round robin simply rotates requests in order and may ignore server load. Random selection assigns requests unpredictably, without considering workload. Hash-based approaches use hash values to direct traffic based on client or request attributes, not server load.

  2. Benefits of Horizontal Scaling

    What is the primary benefit of horizontal scaling for web applications experiencing unpredictable traffic spikes?

    1. Reducing network latency
    2. Purely improved CPU speed
    3. Increased server memory
    4. Adding more servers

    Explanation: Horizontal scaling allows you to handle unpredictable or high traffic by adding more servers, providing better fault tolerance and increased capacity. Increasing server memory or improving CPU speed refers to vertical scaling, not horizontal. While adding servers can indirectly reduce latency by distributing the load, its main purpose is to increase overall capacity.

  3. Session Persistence (Sticky Sessions)

    When a user must always connect to the same backend server during a session, which load balancing feature is essential?

    1. Session persistence
    2. DNS round robin
    3. SSL termination
    4. Caching

    Explanation: Session persistence ensures that a user's requests during a session are routed to the same server, which is critical when session information is stored locally. SSL termination deals with decrypting secure traffic, not routing. Caching improves response time but doesn't manage connections per user. DNS round robin distributes requests based on DNS lookup, which may break session continuity.

  4. Autoscaling Triggers

    Which metric is most commonly monitored to automatically scale out compute resources in a cloud environment?

    1. Disk space usage
    2. Server hostname
    3. CPU utilization
    4. Weekly network traffic

    Explanation: CPU utilization is widely used as a key threshold for triggering autoscaling actions, as high CPU usage often indicates increased demand. Disk space is less directly related to immediate traffic spikes. Network traffic may be used but is generally less common than CPU. Server hostname is not a metric for scaling decisions.

  5. Health Checks and Availability

    Why are periodic health checks important in load balancing for cloud architectures?

    1. They split databases
    2. They detect unresponsive servers
    3. They encrypt data packets
    4. They update DNS records

    Explanation: Periodic health checks help identify servers that are unresponsive, so the load balancer can stop sending requests to them. They do not encrypt data; that’s part of encryption protocols. DNS records are managed by DNS services, not health checks. Splitting databases is a database sharding procedure, not related to load balancer health checks.

  6. Vertical vs. Horizontal Scaling

    A database server upgrades from 16 GB to 64 GB of RAM to handle more queries. What type of scaling does this illustrate?

    1. Horizontal scaling
    2. Auto failover
    3. Cloud bursting
    4. Vertical scaling

    Explanation: Vertical scaling increases the capabilities of a single server, such as adding more RAM or faster CPUs. Cloud bursting temporarily uses outside resources but isn't about upgrading a single server. Horizontal scaling adds more servers instead of strengthening one. Auto failover involves switching to backup components, not upgrading resources.

  7. Layer 4 vs. Layer 7 Load Balancing

    Which layer does content-based routing, such as directing image requests to specialized servers, primarily occur at in a load balancer?

    1. Layer 7
    2. Layer 4
    3. Layer 2
    4. Layer 3

    Explanation: Layer 7 load balancing operates at the application layer, enabling routing based on content, such as URLs or headers. Layer 4 works with transport data, not application content. Layer 2 is data link, handling frames, while Layer 3 is the network layer, responsible for IP routing but not application content.

  8. Global Load Balancing

    What is the main advantage of global load balancing for users accessing an application from different continents?

    1. Directing users to the nearest regional server
    2. Lower internal memory usage
    3. Faster local failover
    4. Reducing instance count everywhere

    Explanation: Global load balancing directs user requests to the geographically closest regional server, which can lower latency and enhance performance for users in different regions. Lowering internal memory usage is unrelated. Faster local failover refers to handling failures within one site. Reducing instance count would hurt availability rather than help.

  9. Stateless Application Design

    Why are stateless applications better suited for horizontal scaling in cloud architectures?

    1. They need sticky IP assignment
    2. They store all data on one server
    3. They require more CPU resources
    4. They can process requests independently

    Explanation: Stateless applications handle each request independently, making it easy to distribute traffic across multiple instances. They do not require more CPU resources by default, nor do they store all data on a single server, which would hinder scaling. Sticky IP or session persistence is less critical for stateless applications; it's usually needed for stateful ones.

  10. Scaling Down Safely

    Before removing servers during a scale-down event, what step helps ensure that no in-progress user requests are lost?

    1. Session draining
    2. Random decommissioning
    3. Static IP assignment
    4. Force shutdown

    Explanation: Session draining allows servers to finish processing existing requests before they are removed from the pool, preventing data loss or errors. Force shutdown terminates ongoing connections abruptly. Random decommissioning risks dropping active sessions. Static IP assignment pertains to network configuration, not safe resource reduction.