8000 Update circuitbreaker.md by azarboon · Pull Request #32556 · akka/akka · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
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

Update circuitbreaker.md #32556

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update circuitbreaker.md #32556

wants to merge 1 commit into from

Conversation

azarboon
Copy link
@azarboon azarboon commented Oct 9, 2024

This page mainly mentions benefits of the pattern. I've added some challenges so readers can take a more informed decision.

References #xxxx

@lightbend-cla-validator
Copy link

Hi @azarboon,

Thank you for your contribution! We really value the time you've taken to put this together.

Before we proceed with reviewing this pull request, please sign the Lightbend Contributors License Agreement:

http://www.lightbend.com/contribute/cla

@azarboon
Copy link
Author
azarboon commented Oct 9, 2024

Hi @azarboon,

Thank you for your contribution! We really value the time you've taken to put this together.

Before we proceed with reviewing this pull request, please sign the Lightbend Contributors License Agreement:

http://www.lightbend.com/contribute/cla

Done

@@ -24,6 +24,8 @@ resource exhaustion. Circuit breakers can also allow savvy developers to mark p
the site that use the functionality unavailable, or perhaps show some cached content as
appropriate while the breaker is open.

Like any other pattern, circuit breakers have their own challenges: circuit breakers can misinterpret a partial failure as total system failure and inadvertently bring down the entire system. In particular, sharded systems and cell-based architectures are vulnerable to this issue. For example, let’s say only one of your database shards is overloaded and other shards are working normally. Usually in such circumstances, the circuit breaker either assumes the entire database (i.e. all shards) is overloaded and trips which negatively impacts the normal shards, or the circuit breaker assumes the required threshold hasn’t been exceeded and doesn’t do anything to mitigate overloading of the problematic shard. In either case, the result is not optimal. A workaround is that the server indicates to the client exactly which specific part is overloaded and the client uses a corresponding mini circuit breaker. However, this workaround can be complex and expensive.
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for you contribution @azarboon.
However, I don't think the added paragraph is helping understand Akka's circuit breakers.

The example that of a system being brought down doesn't seem to apply. If you have a distributed database, the access to the instances is managed by some connection pool + driver. The application itself won't be connecting to db shards individually.

Copy link
Author

Choose a reason for hiding this comment

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

Fair enough. How about cell based architecture? May I change the example to that?

Copy link
Member
@octonato octonato Oct 10, 2024

Choose a reason for hiding this comment

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

I'm not sure. What is missing in the Akka documentation about Circuit Breakers that needs to be addressed?

It's good if we have a succinct, high-level, explanation about the concept of Circuit Breakers followed by how to use the Akka APIs.

But if the intro about Circuit Breakers is too extensive, then we miss the main goal. The are enough resources on the internet (articles, blogs, videos) about it and interested users will dig the web for more information.

Copy link
Author
@azarboon azarboon Oct 10, 2024

Choose a reason for hiding this comment

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

You are right. But the problem is that the problem I mentioned, is not well known. Marc Brooker has written an excellent post explaining this. But it's buried and not well-known. So, I'm attempting to evangelize it so builders can be informed. Given that Akka is a well-known resource, it would be great if it evangelizes about challenges of this pattern. I'm thinking maybe we can add a link to that post for further reading? This way we can keep the doc succinct while giving heads-up to builders. What's your advice?

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

Successfully merging this pull request may close these issues.

4 participants
0