Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Half open state allowing all requests #819

Open
slice-arpitkhatri opened this issue Sep 27, 2023 · 1 comment
Open

Half open state allowing all requests #819

slice-arpitkhatri opened this issue Sep 27, 2023 · 1 comment

Comments

@slice-arpitkhatri
Copy link

As per my understanding, when opossum marks the circuit HALF_OPEN state, it allows all the requests. And when it receives the first response, it marks the circuit as CLOSED / OPEN based on the response. Shouldn't we just allow a single request instead of all the requests?

Code that I'm referring to :

if (!this.closed && !this.pendingClose) {
  /**
   * Emitted when the circuit breaker is open and failing fast
   * @event CircuitBreaker#reject
   * @type {Error}
   */
  const error = buildError('Breaker is open', 'EOPENBREAKER');

  this.emit('reject', error);

  return fallback(this, error, args) ||
    Promise.reject(error);
}
@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant