Skip to content

Restart gitaly-ruby when it uses too much memory

Jacob Vosmaer requested to merge balancer into master

Use gRPC client-side load balancing to shift traffic away from a gitaly-ruby process that has grown too large. This does not do actual load balancing at the moment, we just have two gitaly-ruby processes. One active and one stand-by. When either the active or stand-by gets too big we take it out of the pool, causing gRPC to shift all gitaly-ruby requests to the other process. The pool is not allowed to shrink to zero processes.

Configurable settings are the memory limit (default 300MB), the grace period for finishing ongoing gitaly-ruby requests (default 10 minutes), and the minimum period of sustained high memory readings before trying to restart (default 5 minutes).

Closes #720 (closed)

This link contains documentation for the grpc-go 'resolver' API. https://github.com/menghanl/proposal/blob/bf8da289d051c0025effaf91c1a4f255752d4db9/L9-go-resolver-balancer-API.md#the-balancer-api-and-the-structure

Edited by GitLab Release Tools Bot

Merge request reports