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

(extension): add blocking memorylimiter extension #172

Conversation

moh-osman3
Copy link
Contributor

@moh-osman3 moh-osman3 commented Apr 4, 2024

This is a followup to #157 and adds a blockingmemorylimiterextension, that only helps memory limit unary RPC's.

This component provides a UnaryServerInterceptor that intercepts incoming unary RPC's, calculates the size of the request, and tries to acquire bytes from a semaphore. If we have already reached our memorylimit, the request will block until other requests complete and release bytes from the semaphore or the request times out.

Resolves #173 for unary RPC's but have not fully determined the solution for streaming RPC's as it is not straightforward.

Copy link
Contributor

@jmacd jmacd left a comment

Choose a reason for hiding this comment

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

Looks good so far!

@jmacd
Copy link
Contributor

jmacd commented May 20, 2024

Let's reopen this when we decide to make progress.

@jmacd jmacd closed this May 20, 2024
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.

Add a memorylimiter extension
2 participants