Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Gateway 지원 로드밸런싱 기술

Reference : https://docs.spring.io/spring-cloud-commons/docs/current/reference/html/#spring-cloud-loadbalancer

Default로 ReactiveLoadBalancer 을 사용하고, 이는 Round-Robin(default) 과 Random 이 두 가지를 지원합니다. 만약 Nginx 처럼 ip_hash 와 같은 로드밸런싱을 적용하고 싶다면, 커스텀 로드밸런서 를 참고해주세요!

Gateway 로드밸런싱 통계 확인

  • 로드밸런싱 관련하여 아래의 통계를 micrometer 을 통해 보여줍니다(Actuator 을 Gateway 에 implement 하셔야되요).
    • loadbalancer.requests.active: A gauge that allows you to monitor the number of currently active requests for any service instance (service instance data available via tags);
    • loadbalancer.requests.success: A timer that measures the time of execution of any load-balanced requests that have ended in passing a response on to the underlying client;
    • loadbalancer.requests.failed: A timer that measures the time of execution of any load-balanced requests that have ended with an exception;
    • loadbalancer.requests.discard: A counter that measures the number of discarded load-balanced requests, i.e. requests where a service instance to run the request on has not been retrieved by the LoadBalancer.

    Reference : 통계 확인