문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 다음 판 | 이전 판 마지막 판 양쪽 다음 판 | ||
java:zuul [2019/02/28 14:59] kwon37xi [참고] |
java:zuul [2022/08/18 09:15] kwon37xi [Netflix의 Client Serving Server] |
||
---|---|---|---|
줄 1: | 줄 1: | ||
- | ====== Zuul - Edge Service====== | + | ====== Zuul - API Gateway |
- | * [[https:// | + | * [[https:// |
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[: | ||
* [[https:// | * [[https:// | ||
* [[http:// | * [[http:// | ||
- | ===== Edge Service ===== | ||
- | * Edge Service 는 API 앞단에서 인증, 필터링등을 거쳐서 그 정보를 가지고 그 뒤로 API 요청을 보낸다. | ||
- | * 여기서 권한 문제가 생기는데 Edge Service 뒷단에서 권한 문제(어떤 리소스를 어떤 사용자가 접근 가능한가)를 처리해야만한다. | ||
- | * 뒷단 API 서비스(보통 API Gateway라고 부름)은 그 뒤에서 다시 실제 서비스 API를 호출한다. | ||
- | [[https://github.com/Netflix/zuul/wiki/How-We-Use-Zuul-At-Netflix|{{: | + | ===== Spring Cloud Neflix Zuul ===== |
- | + | * [[https://cloud.spring.io/spring-cloud-netflix/multi/multi__router_and_filter_zuul.html|Spring Cloud Neflix Zuul]] | |
- | ===== 참고 ===== | + | * [[https:// |
- | * [[http://woowabros.github.io/r&d/2017/06/13/ | + | * [[https://supawer0728.github.io/2018/03/11/Spring-Cloud-Zuul/ |
* [[https:// | * [[https:// | ||
+ | * [[http:// | ||
* [[https:// | * [[https:// | ||
+ | |||
+ | ==== 다중 path 지정 ==== | ||
+ | * [[https:// | ||
+ | * '' | ||
+ | <code yml> | ||
+ | zuul: | ||
+ | routes: | ||
+ | myserver_mypath: | ||
+ | path: /mypath/** | ||
+ | url: .... | ||
+ | serviceId: myserver | ||
+ | myserver_another_path: | ||
+ | path: / | ||
+ | url: ... | ||
+ | serviceId: myserver | ||
+ | </ | ||
+ | ==== actuator ==== | ||
+ | * ''/ | ||
+ | * boot 2.1 의 경우 '' | ||
+ | |||
+ | ==== Filter ==== | ||
+ | === Service ID 알아내기 === | ||
+ | * ' | ||
+ | <code java> | ||
+ | @Override | ||
+ | public boolean shouldFilter() { | ||
+ | RequestContext context = RequestContext.getCurrentContext(); | ||
+ | return " | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== 참고 ===== | ||
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
- | * [[https://supawer0728.github.io/2018/03/11/Spring-Cloud-Zuul/|(Spring Cloud) Zuul ]] | + | * [[https://dzone.com/articles/dynamic-routing-through-zuul-with-rest-api-spring|Dynamic Routing Through Zuul With a REST API and Spring Boot Without Spring Config — Sub-Domain to Subpath Router - DZone Microservices]] |
+ | * [[https://netflixtechblog.com/ | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// |