An HTTP(S) Load Balancer in GCP is a Layer 7 load balancer that distributes incoming web traffic across multiple backend instances based on HTTP(S) request attributes like URL path, headers, or cookies. It helps improve availability and scalability.
Click to reveal answer
beginner
What does Layer 7 mean in the context of load balancing?
Layer 7 refers to the application layer in the OSI model. Load balancing at Layer 7 means decisions are made based on application data such as HTTP headers, URLs, or cookies, allowing smarter routing than just IP or TCP level.
Click to reveal answer
intermediate
Name two key features of GCP HTTP(S) Load Balancer.
1. Global load balancing with a single anycast IP address. 2. Content-based routing using URL maps to direct traffic to different backends.
Click to reveal answer
intermediate
How does HTTP(S) Load Balancer improve scalability?
It distributes traffic across multiple backend instances automatically, scales backend capacity up or down, and uses health checks to route traffic only to healthy instances, ensuring efficient resource use.
Click to reveal answer
intermediate
What is the role of URL maps in HTTP(S) Load Balancer?
URL maps define rules to route incoming requests to different backend services based on URL paths or hostnames. This allows serving different content or applications from the same IP address.
Click to reveal answer
What layer does HTTP(S) Load Balancer operate on?
ALayer 2 - Data Link Layer
BLayer 3 - Network Layer
CLayer 4 - Transport Layer
DLayer 7 - Application Layer
✗ Incorrect
HTTP(S) Load Balancer operates at Layer 7, the application layer, allowing it to route traffic based on HTTP attributes.
Which feature allows HTTP(S) Load Balancer to route traffic based on URL paths?
AURL Maps
BHealth Checks
CFirewall Rules
DBackend Buckets
✗ Incorrect
URL Maps define routing rules based on URL paths or hostnames.
What is the benefit of using a single anycast IP address in GCP HTTP(S) Load Balancer?
AImproves DNS resolution speed
BReduces backend server count
CEnables global load balancing
DEncrypts traffic automatically
✗ Incorrect
A single anycast IP allows global load balancing by routing user requests to the nearest backend.
How does HTTP(S) Load Balancer ensure traffic is sent only to healthy backends?
AUsing firewall rules
BUsing health checks
CUsing SSL certificates
DUsing DNS failover
✗ Incorrect
Health checks monitor backend health and route traffic only to healthy instances.
Which protocol(s) does HTTP(S) Load Balancer support?
ABoth HTTP and HTTPS
BOnly HTTPS
COnly HTTP
DTCP and UDP
✗ Incorrect
HTTP(S) Load Balancer supports both HTTP and HTTPS protocols.
Explain how GCP HTTP(S) Load Balancer routes traffic and improves application availability.
Think about how it uses HTTP details and global network to distribute traffic smartly.
You got /5 concepts.
Describe the difference between Layer 4 and Layer 7 load balancing and why Layer 7 is useful for web applications.
Consider what extra information Layer 7 has compared to Layer 4.
You got /5 concepts.
Practice
(1/5)
1. What is the primary function of an HTTP(S) Load Balancer in Google Cloud Platform?
easy
A. Distribute incoming web traffic across multiple backend services
B. Store user data securely in the cloud
C. Create virtual machines automatically
D. Monitor network latency between regions
Solution
Step 1: Understand the role of HTTP(S) Load Balancer
It is designed to spread incoming web traffic to multiple backend services to improve performance and reliability.
Step 2: Eliminate unrelated functions
Storing data, creating VMs, and monitoring latency are not functions of the load balancer.
Final Answer:
Distribute incoming web traffic across multiple backend services -> Option A
Quick Check:
Load balancer = traffic distribution [OK]
Hint: Load balancer = spreading traffic to backends [OK]
Common Mistakes:
Confusing load balancer with storage or VM services
Thinking it monitors network latency
Assuming it creates resources automatically
2. Which component is NOT part of the HTTP(S) Load Balancer setup in GCP?
easy
A. Cloud Storage bucket
B. Forwarding rule
C. Target proxy
D. URL map
Solution
Step 1: Identify components of HTTP(S) Load Balancer
It includes URL maps, forwarding rules, and target proxies to route traffic.
Step 2: Recognize unrelated components
Cloud Storage bucket is for storing files, not part of load balancing setup.
Final Answer:
Cloud Storage bucket -> Option A
Quick Check:
Storage bucket ≠ load balancer component [OK]
Hint: Storage buckets store files, not route traffic [OK]
Common Mistakes:
Confusing storage services with load balancer parts
Mixing forwarding rules with storage buckets
Assuming all GCP services are load balancer components
3. Given this URL map configuration snippet, which backend service will handle requests to /images/*?
The path rule for /images/* points to backend-service-images.
Step 2: Understand default service role
Requests not matching specific paths use backend-service-default, but /images/* matches a specific path rule.
Final Answer:
backend-service-images -> Option B
Quick Check:
Specific path rule overrides default service [OK]
Hint: Specific path rules override default backend [OK]
Common Mistakes:
Choosing default service instead of specific path service
Ignoring path pattern matching
Confusing backend service names
4. A user configures an HTTP(S) Load Balancer but finds that requests to /api/* are not routed to the intended backend service. Which is the most likely cause?
medium
A. The backend service is not in the same region
B. The forwarding rule is missing
C. The target proxy is not HTTPS
D. The URL map lacks a path rule for /api/*
Solution
Step 1: Check URL map path rules
If /api/* is missing in path rules, requests won't route correctly.
Step 2: Verify other components
Forwarding rule and target proxy affect traffic flow but missing path rule directly causes routing failure. Backend region mismatch usually causes latency, not routing failure.
Final Answer:
The URL map lacks a path rule for /api/* -> Option D
5. You want to design a scalable web application using GCP's HTTP(S) Load Balancer that routes traffic based on URL paths to different backend services. Which design approach ensures high availability and efficient routing?
hard
A. Use a single backend service for all traffic and scale it vertically
B. Deploy multiple forwarding rules each pointing to different backend services without URL maps
C. Configure URL map with path matchers directing to multiple regional backend services behind managed instance groups
D. Use TCP Load Balancer instead of HTTP(S) Load Balancer for path-based routing
Solution
Step 1: Understand path-based routing needs
HTTP(S) Load Balancer uses URL maps with path matchers to route requests to different backends efficiently.
Step 2: Ensure scalability and availability
Using multiple regional backend services behind managed instance groups provides scalability and high availability.
Step 3: Evaluate other options
Single backend limits scalability; multiple forwarding rules without URL maps cannot do path-based routing; TCP Load Balancer does not support Layer 7 routing.
Final Answer:
Configure URL map with path matchers directing to multiple regional backend services behind managed instance groups -> Option C