Skip to content
代码片段 群组 项目
提交 f933f2ca 编辑于 作者: Patrick Bajao's avatar Patrick Bajao 提交者: Peter Leitzen
浏览文件

Implement redis store for circuitbox

By default, the circuit breaker is using a memory store to track
the state of the circuit. This is okay for a single node
environment since threads can share the store.

On production though, we have multiple nodes (puma and sidekiq) so
a need for a persisted store is required.

This adds a custom store that will utilize redis as the storage. It
uses the redis-ratelimiting DB for this since it's kind of related
with rate limiting.

The `Gitlab::CircuitBreaker::Store` is based on Circuitbox's memory
store (https://github.com/yammer/circuitbox/blob/main/lib/circuitbox/memory_store.rb)
but modified to use redis.

This is behind the `circuit_breaker` feature flag.
上级 2a67b73a
分支
标签
无相关合并请求
加载中
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
想要评论请 注册