Load Balancer Vs. API Gateway Flashcards

(9 cards)

1
Q

How are Load Balancers and API Gateways similar? What do they do?

A

They both are responsible for managing incoming traffic and requests.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What’s the purpose of a load balancer?

A

To distribute network and/or application traffic across multiple servers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

At a high level, how does a load balancer work?

A

It accepts incoming requests and routes them to the most appropriate server to handle them, generally determined through health checks and some specified routing algorithm (e.g. least connections etc.)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What’s the purpose of an API Gateway?

A

An API Gateway sits between the client and a collection of backend services (like a reverse proxy) and routes the requests to all of the appropriate services and aggregates the results.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

When are API gateways most commonly used? Why?

A

You’ll typically see them in microservice architectures where they can provide a unified interface for clients to consume from.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What’s the focus of a load balancer? An API gateway?

A

Load balancers focus on distributing traffic to avoid overloading servers, ensuring high availability and redundancy.

API gateways are more organizational and serve as a central point for managing and routing API calls.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

If a system required an API Gateway and a Load Balancer how would you arrange them?

A

Typically the load balancer would front the API gateway, but it depends.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Why would you put a load balancer in front of an API gateway?

A

This is the most common configuration.

It distributes traffic to multiple instances of the API Gateway, ensuring redundancy (reliability) and removing it as a single point of failure.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Would you ever front a load balancer with an API gateway? Why?

A

If the instances being routed to from the gateway required load balancing on their own, this would be a preferred approach.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly