12345678910111213141516171819202122232425262728293031323334353637 |
- spring:
- application:
- name: api-endpoint
- eureka:
- client:
- register-with-eureka: false #유레카 서버에 클라이언트로 등록할지 여부
- service-url:
- defaultZone: http://${EUREKA}/eureka #서비스 리스트가 있는 유레카 서버
- zuul:
- ribbon-isolation-strategy: thread #hystrix에서 thread로 격리
- ignored-services: "*" #무시할 서비스 목록
- prefix: /api #모든 요청을 /api로 묶는다
- routes:
- icd-search:
- path: /icd/** #icd/로 오는 요청을 해당 서비스로 라우팅 한다
- strip-prefix: false # 라우팅시 url path를 보존할지 여부
- hystrix:
- command:
- default:
- execution:
- isolation:
- strategy: THREAD #thread로 격리
- thread:
- timeoutInMilliseconds: 3000 #서비스가 해당시간 내에 응답하지 않으면 바로 써킷이 닫혀있더라도 fallback
- circuitBreaker:
- enabled: true
- requestVolumeThreashold: 20 #감시 시간 내 요청 수
- sleepWindowInMilliseconds: 5000 #서킷이 열렸을 떄 얼마나 지속될지 설정
- errorThresholdPercentage: 50 #요청 대비 오류율
- metrics:
- rollingStates:
- timeInMilliseconds: 10000 #오류 감시 시간
- #docker run --rm -p 8080:8080 -e EUREKA=192.168.99.100:8761 --name gateway --network api_bridge zuul-gateway:gateway
|