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

feat(event): Add circuit breaker for events sending. #1233

Merged
merged 3 commits into from
Dec 14, 2022

Conversation

armory-abedonik
Copy link
Contributor

Description

The event may have payload size up to 10 MB and even more, there are no strict limits. The number of events to be sent can be large. It depends on how frequently Spinnaker runs pipelines, and other internal jobs. As a result, if consumer API is unavailable or has high latency then Echo service is constantly restarting due to Out of Memory error.

How to use?

Add to echo-local.yml:

rest:
  enabled: true
  circuitBreakerEnabled: true

resilience4j:
  circuitbreaker:
    instances:
      sendEvent:
        failure-rate-threshold: 50
        minimum-number-of-calls: 5
        automatic-transition-from-open-to-half-open-enabled: true
        wait-duration-in-open-state: 5s
        permitted-number-of-calls-in-half-open-state: 3
        sliding-window-size: 10
        sliding-window-type: count_based

Copy link
Contributor

@ovidiupopa07 ovidiupopa07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@armory-abedonik armory-abedonik marked this pull request as ready for review December 12, 2022 17:14
@dogonthehorizon dogonthehorizon added the ready to merge Approved and ready for merge label Dec 14, 2022
@mergify mergify bot added the auto merged label Dec 14, 2022
@dogonthehorizon
Copy link
Contributor

Has feature flag and is tested, backporting

@dogonthehorizon
Copy link
Contributor

@Mergifyio backport release-1.29.x release-1.28.x release-1.27.x

@mergify
Copy link
Contributor

mergify bot commented Dec 14, 2022

backport release-1.29.x release-1.28.x release-1.27.x

✅ Backports have been created

@mergify mergify bot merged commit 28d0b16 into spinnaker:master Dec 14, 2022
mergify bot pushed a commit that referenced this pull request Dec 14, 2022
* feat(event): Add circuit breaker for events sending.

* refactor: Move send event without Circuit Breaker to the event service.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 28d0b16)
mergify bot pushed a commit that referenced this pull request Dec 14, 2022
* feat(event): Add circuit breaker for events sending.

* refactor: Move send event without Circuit Breaker to the event service.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 28d0b16)
mergify bot pushed a commit that referenced this pull request Dec 14, 2022
* feat(event): Add circuit breaker for events sending.

* refactor: Move send event without Circuit Breaker to the event service.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 28d0b16)
mergify bot added a commit that referenced this pull request Dec 14, 2022
* feat(event): Add circuit breaker for events sending.

* refactor: Move send event without Circuit Breaker to the event service.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 28d0b16)

Co-authored-by: armory-abedonik <106548537+armory-abedonik@users.noreply.github.com>
mergify bot added a commit that referenced this pull request Dec 14, 2022
* feat(event): Add circuit breaker for events sending.

* refactor: Move send event without Circuit Breaker to the event service.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 28d0b16)

Co-authored-by: armory-abedonik <106548537+armory-abedonik@users.noreply.github.com>
mergify bot added a commit that referenced this pull request Dec 14, 2022
* feat(event): Add circuit breaker for events sending.

* refactor: Move send event without Circuit Breaker to the event service.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 28d0b16)

Co-authored-by: armory-abedonik <106548537+armory-abedonik@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants