728x90
반응형

Gateway 4

Spring Cloud Gateway - Http timeouts configuration

http 관련 타임아웃 설정을 할 수 있다. Global timeouts 전역 설정 식으로 모든 것에 적용 되는 설정을 할 수 있다. spring: cloud: gateway: httpclient: connect-timeout: 1000 response-timeout: 5s Per-route timeouts 각 route 룰 마다 타임아웃을 별도로 줄 수 있다. 아래는 yml 서정 방식 - id: per_route_timeouts uri: https://example.org predicates: - name: Path args: pattern: /delay/{timeout} metadata: response-timeout: 200 connect-timeout: 200 아래는 Java 설정 방식 RESPO..

Architecture/MSA 2021.01.07

Spring Cloud Gateway - Route Predicate & Gateway Filter Factory

Gateway를 만들면서 사용할 수 있는 룰들을 셋팅하는데 있어서 구글링 및 공식 Document를 보는 것에 시간이 걸려 하나씩 정리해 둔다. 참고로 사용하게 되는 Predicate Factory는 org.springframework.cloud.gateway.handler.predicate 아래에 있다. ( github.com/spring-cloud/spring-cloud-gateway/tree/2.2.x/spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/handler/predicate ) @Autowired private SecureHeadersProperties secureHeadersProperties; /** ..

Architecture/MSA 2020.12.28

Zuul을 이용한 Gateway 구축 시 설정

Zuul을 이용하여 MSA의 Api Gateway 구축을 테스트 삼아 하고 있는데 설정 값을 지정하면서 알게 된 내용을 정리한다. application.yml 파일을 아래와 같이 설정 하였다. spring: application: name: api-gateway server: port: 8801 eureka: instance: instance-id: zuul-inst001 client: service-url: defaultZone: http://localhost:8761/eureka zuul: routes: chauffeur: path: /chauffeur/** stripPrefix: true path 에 지정하는 값은 client에서 api gateway로 호출할 때의 url path 이다. 해당 pa..

Architecture/MSA 2020.12.11

MSA 관련 북마크

futurecreator.github.io/2018/09/14/what-is-microservices-architecture/ 마이크로서비스 Microservices (1) 아키텍처 소개 주변에서 마이크로서비스 아키텍처(Microservices architecture; MSA)에 대한 이야기가 많이 들려옵니다. 마이크로서비스가 모든 것을 해결해줄 것처럼 이야기하는 사람이 있는가하면, 서비스 지향 아키 futurecreator.github.io futurecreator.github.io/2018/09/14/microservices-with-api-gateway/ 마이크로서비스 Microservices (2) API 게이트웨이 이전 포스트에서 마이크로서비스 아키텍처의 개념을 살펴봤습니다. 이번 포스트에서는 ..

Architecture/MSA 2020.11.20
728x90
반응형