Skip to content

Retry Mechanism ​

To handle situations such as unstable networks or temporary outages of external services, we have designed an automatic retry mechanism to ensure eventual consistency for transactions. This mechanism applies to key balance-changing operations, primarily including:

  • Standard games: Return Balance (s:1003) and Cancel Bet (s:1005)

📜 General Retry Principles ​

  • Trigger condition: A retry is triggered when an unexpected (non-success) response is received from the operator (e.g. a non-200 HTTP status code, or a business logic error code), or when a network-level error occurs (e.g. a timeout or connection interruption).
  • Retry interval: Retries occur every 5 minutes.
  • Maximum attempts: Up to 5 retries.
  • Failure handling: If the issue remains unresolved after the maximum number of retries, the system stops retrying automatically; the operator should then notify the platform to perform a manual retry.

📊 Retry Flow Diagram ​

📋 Business Scenarios ​

The table below details the retry-triggering operation, status check interface, and retry condition for each business scenario.

Business TypeTriggering OperationStatus Check InterfaceRetry Condition (when status...) 🔗
Standard gamesReturn Balance (s:1003)s:1004is not "Success"
Cancel Bet (s:1005)s:1004is not "Failed" or "Order not found"