-
Notifications
You must be signed in to change notification settings - Fork 108
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
Use semaphore isolation to limit concurrent requests #60
Comments
@lance I'm using https://www.npmjs.com/package/await-semaphore around the fire function. |
I'm going to try again with semaphore.. this other library has some weird behavior I dunno. |
OK - if you are still having issues, send a link to your branch and I will
poke around.
…On Mon, Jun 12, 2017 at 1:57 PM helio-frota ***@***.***> wrote:
I'm going to try again with semaphore.. this other library has some weird
behavior I dunno.
When I change the capacity nothing happens, 0, 1, 100...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#60 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAA-ULlV8Cru_2w6yk6ZJ2N1Kp3Irwmvks5sDXwggaJpZM4NMq0v>
.
|
Also using blue-tape to fix a specific test and Connects to #60
Fine Grained Bulkhead Pattern
The goal here is to implement a fine-grained bulkhead pattern similar to how Hystrix works in Java. This works hand-in-hand with circuit breakers to provide user-configurable client-side load balancing / throttling and helps to mitigate DoS attacks.
Before actually executing any of the circuit breaker wrapped code, the
fire()
function should acquire a semaphore, execute the function, and then release the semaphore. This prevents a client from unintentionally overloading a server with requests to a single resource, protecting against both programmer error (e.g. a loop that just spins, firing request after request), or malicious code designed to bring a service down.Things to Consider
The text was updated successfully, but these errors were encountered: