API Gateway(Reverse Proxy) - Application Programming Interface Gateway ====================================================================== .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What is API Gateway?** An **API Gateway** is a server that acts as an **entry point** into a backend system or microservices architecture. It **manages, routes, secures, and monitors** API requests from clients to services. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Why is API Gateway useful?** API Gateways are useful because they: - **Centralize access control** and authentication - **Enforce rate limiting and throttling** - Provide **load balancing and routing** - Handle **cross-cutting concerns** like logging, metrics, and caching - Simplify communication between external clients and complex backend services .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **How it works?** The API Gateway receives client requests and: - **Authenticates** and **authorizes** them - **Transforms** or **validates** the request data if needed - **Routes** the request to the appropriate backend service - **Aggregates** data from multiple services if required - Sends back the response to the client It also manages **timeouts**, **retries**, **caching**, and **monitoring**. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Where is API Gateway used?** API Gateways are widely used in: - **Microservices architectures** - **Cloud-native applications** - **Mobile and web backend systems** - **Serverless platforms** - Examples include AWS API Gateway, NGINX, Kong, Apigee, and Azure API Management. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which OSI layer does this protocol belong to?** API Gateway operates at the **Application Layer (Layer 7)** of the OSI model. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Is API Gateway Windows specific?** No, API Gateways are **not Windows specific**. They can be deployed on any OS that supports network services, including Windows, Linux, and containerized environments like Docker/Kubernetes. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Is API Gateway Linux specific?** No, API Gateways are **not Linux specific**. While many are optimized for Linux environments (e.g., NGINX), they are designed to run on multiple platforms. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which Transport Protocol is used by API Gateway?** API Gateways primarily use: - **HTTP/HTTPS** - Some may also support **WebSocket**, **gRPC**, or **TCP** depending on the implementation. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which Port is used by API Gateway?** Common default ports include: - **Port 80** for HTTP - **Port 443** for HTTPS - Custom ports can be configured as needed depending on the use case. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Is API Gateway using Client server model?** Yes, an API Gateway is a key component of the **client-server model**. - **Clients** make requests to the API Gateway. - The **Gateway** handles the logic and forwards requests to the appropriate backend services (servers), then relays responses back to the client. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Topics in this section, * :ref:`Learnings in this section ` * :ref:`Terminology ` * :ref:`Version Info ` * :ref:`API_Gateway Version&IEEE Details ` * :ref:`API_Gateway Basic Setup on Ubuntu using IPv4 ` * :ref:`API_Gateway Basic Setup on Ubuntu using IPv6 ` * :ref:`API_Gateway Protocol Packet Details ` * :ref:`API_Gateway Usecases ` * :ref:`API_Gateway Basic Features ` * :ref:`Reference links ` .. _API_Gateway_step1: .. tab-set:: .. tab-item:: Learnings in this section * In this section, you are going to learn .. _API_Gateway_step2: .. tab-set:: .. tab-item:: Terminology * Terminology .. _API_Gateway_step3: .. tab-set:: .. tab-item:: Version Info * Version Info .. _API_Gateway_step5: .. tab-set:: .. tab-item:: API_Gateway Version&RFC Details * rfc details .. _API_Gateway_step18: .. tab-set:: .. tab-item:: API_Gateway Basic Setup on Ubuntu using IPv4 * setup .. _API_Gateway_step19: .. tab-set:: .. tab-item:: API_Gateway Basic Setup on Ubuntu using IPv6 * setup .. _API_Gateway_step6: .. tab-set:: .. tab-item:: API_Gateway Protocol Packet Details * packet details .. _API_Gateway_step7: .. tab-set:: .. tab-item:: API_Gateway Usecases * usecases .. _API_Gateway_step8: .. tab-set:: .. tab-item:: API_Gateway Basic Features * features .. _API_Gateway_step17: .. tab-set:: .. tab-item:: Reference links * Reference links