Api Gateways Flashcards

1
Q

What is an API Gateway and why is it used

A

An API Gateway acts as an intermediary between clients and backend services managing requests routing them and handling authentication logging and rate limiting

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

How does an API Gateway improve security

A

It provides authentication authorization and encryption to protect backend services from unauthorized access

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

What performance optimizations does an API Gateway offer

A

It includes caching compression and request aggregation to enhance response times and reduce backend load

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

How does an API Gateway help in a microservices architecture

A

It simplifies management by acting as a single entry point decoupling clients from services and allowing independent service evolution

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

What is request routing in an API Gateway

A

It directs client requests to the appropriate backend service based on URL patterns and service configurations

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

How does authentication and authorization work in an API Gateway

A

It verifies client identity using methods like OAuth API keys or JWT and ensures users have correct permissions

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

What is rate limiting in an API Gateway

A

It controls the number of requests a client can make within a given time to prevent abuse and maintain service stability

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

How does request transformation work in an API Gateway

A

It modifies incoming requests or outgoing responses such as adding headers changing query parameters or restructuring data

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

Why is load balancing important in an API Gateway

A

It distributes incoming requests across multiple service instances to ensure even resource utilization and availability

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

What is caching in an API Gateway

A

It stores responses for frequently accessed resources to reduce backend processing and improve latency

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

How does logging and monitoring work in an API Gateway

A

It captures request and response logs for tracking debugging and analytics purposes

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

What is API versioning in an API Gateway

A

It allows multiple API versions to coexist by routing requests to the correct versioned service

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

How does an API Gateway process a client request

A

It authenticates applies rate limits transforms and routes the request to the appropriate backend service then sends back the response

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

What are some popular API Gateway tools

A

Some popular tools are NGINX Kong AWS API Gateway Apigee and Traefik each offering unique features

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

What are the advantages of using an API Gateway

A

It simplifies client interactions enhances security offloads backend complexity and improves scalability

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

What are the disadvantages of using an API Gateway

A

It can introduce a single point of failure add latency increase complexity and incur higher costs

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

How does an API Gateway differ from a reverse proxy

A

An API Gateway manages API requests provides authentication rate limiting and transformation whereas a reverse proxy primarily routes traffic

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

How does an API Gateway differ from a Load Balancer

A

An API Gateway operates at the application layer managing API-specific concerns while a Load Balancer distributes traffic across servers for availability

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

Why is an API Gateway essential for microservices

A

It abstracts microservices complexity provides a unified interface and facilitates service communication efficiently

20
Q

How does an API Gateway handle GraphQL requests

A

It enables GraphQL support allowing clients to query only the necessary data optimizing performance and reducing payload size

21
Q

What is the difference between an API Gateway and a Service Mesh

A

An API Gateway handles client-to-service traffic whereas a Service Mesh manages service-to-service communication within a microservices architecture

22
Q

How does an API Gateway contribute to scalability

A

It enables load balancing caching and request optimization allowing backend services to scale independently

23
Q

How can an API Gateway help with security compliance

A

It enforces security policies like rate limiting authentication encryption and logging ensuring regulatory compliance

24
Q

How do API Gateways support microservices deployments

A

They route requests manage access handle failures and enable service discovery in dynamic microservices environments

25
How do you secure an API Gateway
Security measures include authentication authorization rate limiting TLS encryption and request validation
26
What is the role of an API Gateway in API monetization
It enables API access control usage tracking billing and rate limiting to support monetization strategies
27
What are the challenges of implementing an API Gateway
Challenges include configuration complexity potential bottlenecks managing failures and handling high traffic loads
28
How do API Gateways handle failures and retries
They implement automatic retries circuit breakers and failover mechanisms to maintain reliability
29
What factors should be considered when choosing an API Gateway
Factors include scalability security performance integrations ease of management and cost
30
What are the benefits of using a managed API Gateway service
Managed API Gateways provide scalability security analytics monitoring and integration with cloud services reducing operational overhead
31
What is an API Gateway
An API Gateway manages API requests providing authentication authorization caching rate limiting and request transformation
32
What is a Load Balancer
A Load Balancer distributes network traffic across multiple servers to ensure availability and reliability
33
How does an API Gateway differ from a Load Balancer in terms of functionality
An API Gateway handles API management tasks like authentication rate limiting and request transformation while a Load Balancer focuses on distributing traffic across multiple servers
34
At which network layer does an API Gateway operate
An API Gateway operates at Layer 7 of the OSI model the application layer where it processes HTTP requests
35
At which network layer does a Load Balancer operate
A Load Balancer can operate at Layer 4 transport layer handling TCP or UDP traffic or Layer 7 application layer handling HTTP or HTTPS traffic
36
How does request handling differ between an API Gateway and a Load Balancer
An API Gateway routes requests based on API endpoints applies transformations and enforces security while a Load Balancer directs traffic based on server health and availability
37
Which component is responsible for securing APIs an API Gateway or a Load Balancer
An API Gateway secures APIs by implementing authentication authorization and encryption a Load Balancer does not typically handle security directly
38
Can an API Gateway perform load balancing
Yes an API Gateway can distribute requests among backend services but its primary role is API management while a dedicated Load Balancer focuses solely on traffic distribution
39
Which component would you use for balancing traffic across multiple instances of a monolithic application
A Load Balancer is best for distributing traffic across multiple instances of a monolithic application
40
Which component would you use for managing API requests for microservices
An API Gateway is best for managing API requests for microservices as it provides routing security and request transformation
41
How does an API Gateway enhance microservices communication
An API Gateway abstracts microservices complexity provides a unified entry point and manages request routing authentication and rate limiting
42
How does a Load Balancer enhance application performance
A Load Balancer enhances performance by distributing incoming traffic evenly across multiple instances reducing server load and preventing failures
43
What is an example of using an API Gateway in an e-commerce platform
An API Gateway in an e-commerce platform can route user requests to the User Service orders to the Order Service and products to the Product Service
44
What is an example of using a Load Balancer in an e-commerce platform
A Load Balancer in an e-commerce platform can distribute incoming traffic among multiple instances of the product catalog service to prevent overload
45
Can an API Gateway and Load Balancer be used together
Yes an API Gateway and Load Balancer can work together where the Load Balancer distributes traffic across multiple API Gateway instances ensuring availability