The iGaming industry is a highly competitive environment, requiring a high-performance & scalable backend to retain players and ensure smooth gameplay. Any kind of online betting on the future outcome of a game or event – such as sports betting, online casinos, poker, and eSports – is considered part of iGaming. These companies must handle large volumes of unpredictable traffic while ensuring uninterrupted uptime. User retention is critical, and any performance issues can drive players away. The database is the backbone of any successful platform architecture, yet it is often the biggest bottleneck. To handle millions of users, it must maintain 100% uptime during peak hours, providing users with a responsive and personalized experience across all of their devices. 

Low-latency transaction processing

There are two types of transactions in iGaming—critical and non-critical. Wallet operations are critical transactions that must meet a 1-second SLA, especially for Casino gameplay. While Sports bet settlement transactions can be throttled, Casino players expect an instant experience—pressing a button should immediately deduct money from their wallet.

Some Casino providers enforce a strict 1-second SLA for operators to handle debit and credit transactions when a round starts or when a player wins/loses. This ensures a smooth gameplay experience for the player. Transactions that fail to meet this requirement are timed out. Slow processing leads to delays, longer player wait times, and a poor user experience, causing frustration and potential player churn. Players need a smooth journey while playing. Otherwise, they lose trust in the platform.

From my experience working in iGaming, if even 0.5% of transactions time out during peak hours, customer support will be overwhelmed with player complaints, creating frustration and mistrust in the platform.

During wallet processing for multiple wallets (e.g., cash and bonuses), it is essential that winnings are distributed according to the same percentage of the debit. For example, if a player places a bet of 1 unit, and this amount is deducted as 20 cents from the cash wallet and 80 cents from the bonus wallet, the winnings must reflect the same percentage distribution. This means that if the player wins, 20% of the winnings should be credited to the cash wallet and 80% to the bonus wallet.

This type of information must be stored reliably and consistently at all times. Since casino winnings are typically processed and sent approximately one second later, an eventually consistent approach will not suffice. Furthermore, it is common for casino providers to send duplicate transactions. Therefore, the system must be designed to effectively handle such scenarios to prevent double-processing.

This is where having a NoSQL database like Couchbase becomes critical. Couchbase stores all data in its cache and then asynchronously writes it to disk within milliseconds. With its multi-master architecture, Couchbase delivers higher performance compared to MongoDB in production environments. For example, if you have a 3-node data cluster, all three nodes can process transactions simultaneously. This ensures that wallet transactions are processed much faster, allowing users to see their wallet balances updated quickly and accurately. This results in a better user experience all around, while reducing infrastructure costs.

Zero downtime

One of the key advantages of Couchbase is its ability to perform updates and maintenance without causing downtime. This is a critical feature for iGaming platforms where thousands of players may still be actively playing even during off-peak hours. Its multi-master architecture allows updates to one node while other master nodes continue processing transactions seamlessly. This means players can keep playing, betting, and managing wallets without interruptions, maintaining a smooth and responsive experience at all times.

Transactions querying

For iGaming companies, 90% of wallet transactions are based on Bet ID or Round ID for Sportsbook and Casino respectively-which suits key-value storage. The other 10% of transactions involve rollbacks, requiring lookups by transaction ID. This becomes a perfect use case for a document-oriented database like Couchbase, compared to key-value stores like Redis. With Couchbase, more information can be added as needed. For example, Sportsbook bets sometimes require up to 20 different parameters and casino games have their own different types of data associated.

Couchbase Capella’s multi-master architecture allows you to scale efficiently and process a higher volume of documents. A 3-node cluster can handle a significant number of documents by IDs compared to other master-slave document-oriented databases. 

Peak traffic levels can surge 5x more than non-peak hours, and this can occur on a daily basis. Automatic scaling struggles to handle sudden traffic spikes, as the traffic often comes and goes too quickly. Couchbase Capella allows you to implement time-based scaling through its API, enabling more efficient resource management during unpredictable traffic patterns. Certain traffic demands are constant and can be predicted, while other traffic rises and falls based on other factors — and an iGaming company needs to be prepared to handle both scenarios.

Conclusion

Overall, if you are looking for a platform to handle 2K requests per minute MongoDB could be able to handle that. However, if you want to future-proof your solution and set yourself up to handle high throughput with a target of 30K+ requests per minute, Couchbase is the choice I would highly recommend in terms of costs, reliability and scalability.

From a user perspective the main metric I would keep my eye on was how many transactions we were processing per minute and if there was a drop. For example, if we were processing 20K requests per minute and then it dropped to 10K — that is an indicator that something is wrong and there is a big financial impact to that. Most often it was related to the database. Couchbase provides much better performance, reliability, and availability at a lower total cost of ownership.

Read more

Author

Posted by Keith Azzopardi - CTO, Tassei Tech

CTO at Tassei Tech, with technology leadership roles at Right Stakes, Betlic, Moneybase, and more, with 9+ years of experience in the iGaming industry.

Leave a reply