You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
laigasus edited this page Dec 9, 2024
·
1 revision
개요
Spring Cloud Gateway Server MVC 는 Servlet 기반으로 구축된 API 게이트웨이입니다.
이는 마이크로서비스 아키텍처에서 라우팅, 필터링, 로드밸런싱 등의 기능을 제공하는 핵심 컴포넌트 역할을 합니다.
현대적인 클라우드 네이티브 애플리케이션에서 요구되는 높은 성능과 확장성을 제공합니다.
기능
Spring Cloud Gateway Server MVC 는 Servlet 기반으로 동작합니다.
제공되는 기능은 다음과 같습니다.
라우팅
필터링
로드밸런싱
폴백 처리
인증
아키텍처
Spring Cloud Gateway Server MVC 의 아키텍처는 다음과 같습니다.
라우트는 일반적인 WebMvc.fn의 RouterFunction 인스턴스이며,
HTTP 를 통해 요청을 전달하기 위한 특별한 HandlerFunction을 사용합니다.
이는 org.springframework.cloud.gateway.server.mvc.handler.HandlerFunctions 에 정의되어 있습니다.
HTTP 전달을 위한 사용자 정의 HandlerFunctions 외에도, Spring Cloud Gateway Server MVC는 다음과 같은 추가 구현을 제공합니다:
RequestPredicate 구현체 - GatewayRequestPredicates에서 제공
HandlerFilterFunctions 구현체 - FilterFunctions에서 제공
필터는 다음과 같이 구성됩니다:
'before' 필터: 순수 요청 전 필터는 BeforeFilterFunctions에서 구현되며 FilterFunctions에서 요청 프로세서로 변환됩니다