Shopify / Shopify/semian

Feature Request: Percentage Based Error Thresholds

Open
#245 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
1.5k
Forks
88
Avg merge
3d 19h
Merged PRs (30d)
5

Description

What

Currently, we express error thresholds as the number of failures (error_threshold) in a certain time period (error_timeout). After that threshold is reached, we open the circuit, and only close it again after a certain number of successful requests (success_threshold) are reached.

This requires intimate knowledge of your request patterns. A more flexible model is to use an error percentage threshold to determine when to open the circuit. Instead of saying 3 failures in 5 seconds, one might say over 10% of requests failed.

How

Either add a new parameter, error_percent_threshold or allow error_threshold to be expressed as a percentage (e.g. "10%").

Maintain either a large sliding window of successes and errors to compute percentages, or perhaps a set of counters to reduce the overall size of the windows.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file, test, or entry point is named. Start by locating the implementation of error_threshold, error_timeout, and success_threshold, then compare the proposed parameter and sliding-window or counter approaches. Done means the circuit can open based on a configured percentage of failed requests.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.