主权项 |
1. A method for operating a service request circuit breaker, in which each step is computer-implemented, comprising:
receiving a first client service request at a server from a client; sending a first external server service request from the server to an external server, wherein a response to the first external server service request is required for processing the first client service request; determining that the external server is unavailable by evaluating how the external server responds to the first external server service request; in response to determining that the external server is unavailable: activating the service request circuit breaker; and saving the first external server service request to a queue, wherein the queue is instantiated in a persistent memory; receiving a second client service request at the server; generating a second external server service request, wherein a response to the second external service request is required for processing the second client service request; if the service request circuit breaker is active, saving the second external server service request to the queue without sending the second external service request to the external server; determining that the external server is available by evaluating how the external server responds to a periodic ping; and in response to determining that the external server is available, deactivating the service request circuit breaker, removing the first external server service request from the queue, and resending the first external server service requests to the external server. |