Skip to content

Commit 938c351

Browse files
Merge pull request #112 from NHSDigital/hotfix/ERSSUP-57381
[ERSSUP-57381]-[JW]-[OAS Documentation for eRS Rate Limit]-[RG]
2 parents e75b4ab + 2b24a71 commit 938c351

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

scripts/populate_placeholders.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ def main():
2929
"[[HYPERLINK_PDS]]": "[Personal Demographic Service (PDS)](https://digital.nhs.uk/developer/api-catalogue/personal-demographics-service-fhir)",
3030
"[[HYPERLINK_CIS2]]": "[CIS2](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/user-restricted-restful-apis-nhs-cis2-combined-authentication-and-authorisation)",
3131
"[[HYPERLINK_ERS_BUS_FUNCTIONS]]": "[e-RS Business Functions](https://fhir.nhs.uk/CodeSystem/eRS-BusinessFunction-1)",
32+
"[[HYPERLINK_PERFORMANCE_TESTING]]": "[performance testing](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#performance-testing)",
33+
"[[HYPERLINK_CONTACT_US]]": "[contact us](https://digital.nhs.uk/developer/help-and-support)",
3234
}
3335

3436
data = sys.stdin.read()
Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1-
description: You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits).
1+
description: |
2+
The e-Referral service APIs limit the number of transactions you can make per unit of time.
3+
This protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.
24
5+
Our standard rate limit for the production environment is 10 requests per second per application.
6+
APIs associated with the "Binary" resource are further restricted to 2 requests per second per application.
7+
If you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).
38
9+
Our path-to-live environments have very low rate limits.
10+
They are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].
11+
12+
If you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,
13+
and to see whether it's appropriate to raise your rate limit.
14+
15+
If a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.
16+
Once a request is successful again, then you may continue to send requests inline with the documented rate limits.
17+
18+
Example:
19+
- Receive a 429 response
20+
- Wait 1s and resend, but still receive a 429
21+
- Wait 2s and resend, but still receive a 429
22+
- Wait 4s, request is successful
23+
- Return to normal request cadence

0 commit comments

Comments
 (0)