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

Remove @Beta from com.google.common.util.concurrent.RateLimiter #5612

Open
zaragozamartin91 opened this issue Jun 17, 2021 · 7 comments
Open
Assignees
Labels
P3 package=concurrent status=triaged type=debeta Request to remove something from @Beta

Comments

@zaragozamartin91
Copy link

RateLimiter has been around since version 13 and it is stilled marked as @beta

@jbduncan
Copy link
Contributor

For people waiting for RateLimiter to be made stable, an alternative that looks good is resilience4j, which also has a rate limiter, amongst other utilities for "fault tolerance".

I've never actually used it, so I can't personally vouch for it, but Hystrix, an older library in this space, recommends it in their README at the time of me writing this.

@cpovirk
Copy link
Member

cpovirk commented Jun 18, 2021

Thanks, @jbduncan! We've been wondering if we should recommend that, but we haven't found the time to look into it.

[edit: I also just heard of Failsafe. I am mildly discouraged by the fact that both of these libraries appear to also offer retry functionality that defaults to a fixed delay between tries (rather than randomized exponential backoff), but that doesn't mean their rate limiters are bad.]

@jbduncan
Copy link
Contributor

jbduncan commented Jun 18, 2021

As a side note, Netflix, the creators of Hystrix, say that they've been using a technique called adaptive concurrency limits instead of Hystrix since around 2018. They have a library for this, but I know even less about it than resilience4j and Hystrix.

@darshitpp
Copy link

While resilience4j is indeed a rate limiting alternative, I believe both the RateLimiters are different. Guava's RateLimiter is a blocking call, whereas Resilience4j RateLimiter throws an RequestNotPermitted exception. I found Guava's to be easier to use for my use case.

@olehen
Copy link

olehen commented Jun 20, 2022

Another alternative is bucket4j which have the option of using blocking calls if you want. But I agree that it would be nice to have this out of Beta. For my use-case I just need the simple functionality that Guava RateLimiter provides, and I would rather not install another dependecy just for that when I already use Guava.

@beanthemoonman
Copy link

Is there any sort of thought on how the Rate Limiter API would change before getting marked as stable? The team I work with has an understandable aversion to including new libraries to our codebase, but Guava is currently a library we use and that's not changing. It'd be great to understand what the risk is to incorporating it into our codebase, because the functionality is very useful.

@MikeEnRegalia
Copy link

After five+ years of beta status, wouldn't it be possible to just remove it and cancel the one remaining todo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 package=concurrent status=triaged type=debeta Request to remove something from @Beta
Projects
None yet
Development

No branches or pull requests

8 participants