Skip to content

Conversation

nite23
Copy link
Collaborator

@nite23 nite23 commented Oct 28, 2014

Allows to limit the total amount of data downloaded and uploaded through a proxy.

@lightbody
Copy link
Owner

What is this used for? What happens when the limit is reached?

@nite23
Copy link
Collaborator Author

nite23 commented Oct 28, 2014

Intended scenario is when you have a large number of untrusted clients, and you need control over the amount of resources that each client consumes, but you don't want to throttle bandwidth.

When the limit is reached, an exception is thrown. The client sees this as a HTTP 502 Bad Gateway response to any request routed through the proxy. The idea is, that on every 502 response the client-side implementation would issue the GET /limit/[proxy] API call to see if the error wasn't caused by exceeded data limit.

lightbody added a commit that referenced this pull request Nov 8, 2014
Added data transfer limits
@lightbody lightbody merged commit eac09a5 into lightbody:master Nov 8, 2014
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.

2 participants