문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 다음 판 | 이전 판 | ||
java:zuul [2019/02/28 20:12] kwon37xi |
java:zuul [2022/08/18 09:19] kwon37xi |
||
---|---|---|---|
줄 1: | 줄 1: | ||
- | ====== Zuul - Edge Service====== | + | ====== Zuul - API Gateway |
- | * [[https:// | + | * [[https:// |
+ | * [[msa: | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[: | ||
* [[https:// | * [[https:// | ||
* [[http:// | * [[http:// | ||
- | ===== Edge Service ===== | ||
- | * Edge Service 는 API 앞단에서 인증, 필터링등을 거쳐서 그 정보를 가지고 그 뒤로 API 요청을 보낸다. | ||
- | * 여기서 권한 문제가 생기는데 Edge Service 뒷단에서 권한 문제(어떤 리소스를 어떤 사용자가 접근 가능한가)를 처리해야만한다. | ||
- | * 뒷단 API 서비스(보통 API Gateway라고 부름)은 그 뒤에서 다시 실제 서비스 API를 호출한다. | ||
- | |||
- | [[https:// | ||
===== Spring Cloud Neflix Zuul ===== | ===== Spring Cloud Neflix Zuul ===== | ||
+ | * [[https:// | ||
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
줄 20: | 줄 19: | ||
==== 다중 path 지정 ==== | ==== 다중 path 지정 ==== | ||
* [[https:// | * [[https:// | ||
+ | * '' | ||
<code yml> | <code yml> | ||
zuul: | zuul: | ||
줄 25: | 줄 25: | ||
myserver_mypath: | myserver_mypath: | ||
path: /mypath/** | path: /mypath/** | ||
+ | url: .... | ||
serviceId: myserver | serviceId: myserver | ||
myserver_another_path: | myserver_another_path: | ||
path: / | path: / | ||
+ | url: ... | ||
serviceId: myserver | serviceId: myserver | ||
+ | </ | ||
+ | ==== actuator ==== | ||
+ | * ''/ | ||
+ | * boot 2.1 의 경우 '' | ||
+ | |||
+ | ==== Filter ==== | ||
+ | === Service ID 알아내기 === | ||
+ | * ' | ||
+ | <code java> | ||
+ | @Override | ||
+ | public boolean shouldFilter() { | ||
+ | RequestContext context = RequestContext.getCurrentContext(); | ||
+ | return " | ||
+ | } | ||
</ | </ | ||
줄 36: | 줄 52: | ||
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// |