Idea ID: 2747960

use 503 HTTP code and "Retry-After" header for too many requests

Status : Waiting for Votes
over 1 year ago

Dear Micro Focus

As an industry standard every tools want to consume REST-APIs. We are planning to extensively make use of the uCMDB REST-API but recently detect the API limitation of 15 requests / second.

With the current implementation of the uCMDB REST-API we are unable to scale for multiple data consumers.

Especially with chunked data retrieval you have very soon more than 15 requests/second.

 

We suggest the following enhancement:

Instead of return HTTP code 500 in case of reaching the 15 requests limitation a HTTP 503 with header “Retry-After” should be returned.

In this case the client can handle the overload. This is best practice and documented in IETF (https://tools.ietf.org/html/rfc2616#section-10.5.4).

You can also see on several discussions at stackoverflow.com that this is best way to implement such a limitation:

   https://stackoverflow.com/questions/12449538/http-response-code-for-please-wait-a-little-bit

   https://stackoverflow.com/questions/17862015/http-statuscode-to-retry-same-request

   https://stackoverflow.com/questions/9794696/how-do-i-choose-a-http-status-code-in-rest-api-for-not-ready-yet-try-again-lat

 

Relevant section @IETF RFC2616 10.5.4

HTTP_503_IETF_RFC_2616.png 

uCMDB REST API Limitation was found here:

https://docs.microfocus.com/itom/Universal_CMDB:2019.05/RESTAPIDeploy

 

Best regards,
Thomas