Spring Boot Tutorial 0/110 lessons ~6 min read Lesson 60

    API Gateway

    An API Gateway is a single front door for all your microservices: routing, auth, rate-limiting, request rewriting, observability.

    Course progress0%
    Focus
    2 guided sections
    Practice signal
    Examples included
    Career prep
    Foundation builder

    Introduction

    An API Gateway is a single front door for all your microservices: routing, auth, rate-limiting, request rewriting, observability. Spring Cloud Gateway is the JVM-native option; Kong / AWS API Gateway are popular alternatives.

    Informative example

    bash
    # Spring Cloud Gateway routes
    spring:
    cloud:
    gateway:
    routes:
    - id: orders
    uri: lb://orders-service
    predicates: [ Path=/api/v1/orders/** ]
    filters:
    - StripPrefix=2
    - name: RequestRateLimiter
    args:
    redis-rate-limiter.replenishRate: 50
    redis-rate-limiter.burstCapacity: 100
    - id: catalog
    uri: lb://catalog-service
    predicates: [ Path=/api/v1/products/** ]
    Ready to mark this lesson complete?Track your journey across the entire course.