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

The request expiry work with unit tests. #819

Merged
merged 9 commits into from
Jun 3, 2015
Merged

Conversation

ThePrimeagen
Copy link
Contributor

No description provided.

@ThePrimeagen
Copy link
Contributor Author

@yunong this should do it

@ThePrimeagen
Copy link
Contributor Author

Important

travis-ci is not claiming bad builds when unit tests fail. This is because make is not catching the exit 1 condition from node unit on a test case failure.

@ThePrimeagen ThePrimeagen reopened this Jun 2, 2015
@@ -1081,6 +1082,21 @@ Options:

Note that `ip`, `xff` and `username` are XOR'd.

### Request Expiry

Request expiry is used to kick out old requests that have been timed out somewhere upstream.
Copy link
Member

Choose a reason for hiding this comment

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

I might change the prose here to something a bit more succinct, like.

"Request Expiry can be used to throttle requests that have already exceeded their client timeouts. Requests can be sent with a configurable client timeout header, e.g. 'x-request-expiry-time', which gives in absolute ms since epoch, when this request will be timed out by the client.

This plugin will throttle all incoming requests via a 504 where 'x-request-expiry-time' < Date.now() -- since these incoming requests have already been timed out by the client. This prevents the server from processing unnecessary requests."

* A request expiry will use the headers to tell if the
* incoming request has expired or not. The header is
* expected to be in absolute time since the epoch.
* @param {Object} options
Copy link
Member

Choose a reason for hiding this comment

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

Can you add a description of what options is and also add @param {string} options.header with a description?

@ThePrimeagen
Copy link
Contributor Author

ok, how about now @yunong ?

yunong added a commit that referenced this pull request Jun 3, 2015
The request expiry work with unit tests.
@yunong yunong merged commit 437c8de into restify:master Jun 3, 2015
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