사용자 도구

사이트 도구


java:zuul

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
java:zuul [2019/02/28 21:09]
kwon37xi [참고]
java:zuul [2022/08/18 09:19] (현재)
kwon37xi
줄 1: 줄 1:
-====== Zuul - Edge Service====== +====== Zuul - API Gateway ====== 
-  * [[https://github.com/Netflix/zuul|zuul]] : Edge Service를 만드는 라이브러리+  * [[https://github.com/Netflix/zuul|zuul]]  
 +  * [[msa:gateway_routing_pattern|MSA - Gateway Routing Pattern]] 
 +  * [[https://github.com/Netflix/zuul/wiki/How-We-Use-Zuul-At-Netflix|How We Use Zuul At Netflix · Netflix/zuul Wiki]] 
 +  * [[https://netflixtechblog.com/announcing-zuul-edge-service-in-the-cloud-ab3af5be08ee|Announcing Zuul: Edge Service in the Cloud | by Netflix Technology Blog | Netflix TechBlog]] 
 +  * [[:springframework|Spring Framework]] 기반 개발자들에게는 [[springframework:cloud_gateway|Spring Cloud Gateway]]가 더 적합해보인다.
   * [[https://github.com/Netflix/zuul/wiki|Home · Netflix/zuul Wiki]]   * [[https://github.com/Netflix/zuul/wiki|Home · Netflix/zuul Wiki]]
   * [[http://cloud.spring.io/spring-cloud-netflix/|Spring Cloud Netflix]]   * [[http://cloud.spring.io/spring-cloud-netflix/|Spring Cloud Netflix]]
  
-===== Edge Service ===== 
-  * Edge Service 는 API 앞단에서 인증, 필터링등을 거쳐서 그 정보를 가지고 그 뒤로 API 요청을 보낸다. 
-  * 여기서 권한 문제가 생기는데 Edge Service 뒷단에서 권한 문제(어떤 리소스를 어떤 사용자가 접근 가능한가)를 처리해야만한다. 
-  * 뒷단 API 서비스(보통 API Gateway라고 부름)은 그 뒤에서 다시 실제 서비스 API를 호출한다. 
- 
-[[https://github.com/Netflix/zuul/wiki/How-We-Use-Zuul-At-Netflix|{{:java:netflix_zuul.png|}}]] 
  
 ===== Spring Cloud Neflix Zuul ===== ===== Spring Cloud Neflix Zuul =====
줄 37: 줄 35:
   * ''/actuator/routes''   * ''/actuator/routes''
   * boot 2.1 의 경우 ''management.endpoints.web.exposure.include=routes'' 처럼 지정해 줘야 활성화 됨. 혹은 ''*''   * boot 2.1 의 경우 ''management.endpoints.web.exposure.include=routes'' 처럼 지정해 줘야 활성화 됨. 혹은 ''*''
 +
 +==== Filter ====
 +=== Service ID 알아내기 ===
 +* 'org.springframework.cloud.netflix.zuul.filters.support.FilterConstants#SERVICE_ID_KEY'' 사용
 +<code java>
 +  @Override
 +  public boolean shouldFilter() {
 +    RequestContext context = RequestContext.getCurrentContext();
 +    return "member-api".equals(context.get(SERVICE_ID_KEY));
 +  }
 +</code>
 +
  
 ===== 참고 ===== ===== 참고 =====
줄 43: 줄 53:
   * [[https://github.com/Netflix/zuul/wiki/How-We-Use-Zuul-At-Netflix|How We Use Zuul At Netflix · Netflix/zuul Wiki]]   * [[https://github.com/Netflix/zuul/wiki/How-We-Use-Zuul-At-Netflix|How We Use Zuul At Netflix · Netflix/zuul Wiki]]
   * [[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://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/announcing-zuul-edge-service-in-the-cloud-ab3af5be08ee|Announcing Zuul: Edge Service in the Cloud | by Netflix Technology Blog | Netflix TechBlog]]
 +  * [[https://philcalcado.com/2015/09/18/the_back_end_for_front_end_pattern_bff.html|The Back-end for Front-end Pattern (BFF)]]
 +  * [[https://metleeha.tistory.com/entry/BFFBackend-for-Frontend-%EB%9E%80|BFF(Backend for Frontend) 란?]]
 +  * [[https://www.kennethlange.com/backends-for-frontends-pattern/|The Backends for Frontends (BFF) Pattern]]
java/zuul.1551355760.txt.gz · 마지막으로 수정됨: 2019/02/28 21:09 저자 kwon37xi