Sobes.tech
Middle

Load: 3 RPS and 5000 requests per day. How to handle the case when the contract is not found or the acquiring is unavailable?

sobes.tech AI

Answer from AI

Under a load of 3 RPS and 5000 requests per day, it is important to ensure proper error handling and system stability.

If the contract is not found:

  • Return a clear response to the client with a 404 status code and a message indicating that the contract was not found.
  • Log such cases for analysis.
  • If necessary, provide the option to create a new contract or redirect to support.

If acquiring is unavailable:

  • Implement retries with exponential backoff.
  • Use message queues or deferred processing to avoid losing requests.
  • Return an informative message to the client about the temporary unavailability of the service and suggest trying again later.
  • Monitor the acquiring status and notify the support team.

Thus, the system will be resilient, and the user will receive clear feedback.

Load: 3 RPS and 5000 requests per day. How to handle… - sobes.tech