Skip to content

Half open state allowing all requests #819

Open
@slice-arpitkhatri

Description

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);
}

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions