Skip to content

Question - best way to implement in a serverless environment with concurrent executions #781

Open
@lext05

Description

Hi,

I understand this library has support for saving and loading states using an external storage. However, I am wondering how to best handle concurrent executions and updating the stats.

For example, if breaker.stats stored in an external storage for success is initially 0, and two executions read the state with both functions passing, I assume the breaker.stats would be updated to 1 in both cases. If we were to write stats in both cases to external storage, they would both write 1, when in reality there were 2 successes.

Should we be handling incrementing these stats ourselves and calculating the other fields like percentiles?

Activity

github-actions

github-actions commented on Jul 22, 2023

@github-actions
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

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

      Participants

      @lext05

      Issue actions

        Question - best way to implement in a serverless environment with concurrent executions · Issue #781 · nodeshift/opossum