application.yml 1.4 KB

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