Research by E-CARD
Leads to Galera Cluster
The Bulgarian National Lottery is the largest
Quick Factslicensed gambling operator in Bulgaria. It isCustomer name: E-CARD
one of the most innovative lotteries in Europe
Contact name: Rumen Palovand is among the fastest growing businesses
Industry: On-Line Gamblingin Eastern Europe. At present, they operate
Headquarters: Sofia, Bulgaria
18,500 point of sale machines for instantSite: http://www.e-card.bg
tickets, as well as an additional 1,550 point ofsale machines for drawings. They havemanaged this through thorough innovations in technology, strategic distribution andadvertising, while promoting responsible gaming, good causes and CSR goals. This has
resulted in the National Lottery becoming one of the best known consumer brands in Bulgaria.
Established in 2000, E-CARD, LTD, is a Bulgarian company specializing in the development ofinteractive projects, TV shows, and SMS and IVR applications. They have taken part innumerous projects in Bulgaria and abroad and are a valued member of the Bulgarian WebAssociation. Additionally, they are also licensed by the Bulgarian State Commission on
Gambling for the production of gambling software and platforms.
E-CARD created and developed the entire infrastructure for the National Lottery JSC in Bulgaria.
This includes the systems managing instant tickets and drawing games, logistics, marketing
tools such as video on demand, the banner system for the point of sale machines, and thewebsite.

Challenges
Seeking to become a role model in the gambling industry, National Lottery and E-CARD set out
to build a system that was responsible, innovative, fast and entertaining. For the back-end
database they required a system that could manage real-time processing of transactions andprovide a certainty that commits would propagate through the deployment that was familiar totheir developers and administrators. It would also need to be zero tolerant of data loss, able tohandle peaks, and have zero downtime.
“We wanted a solution which was backward compatible with our frameworks, as we have usedmainly MySQL, which was reliable and nearly 100% data consistent,” Rumen Palov, CTO at ECARD, explains. “If our application were to execute a commit and receive a successful
response, we needed a 100% guarantee that we have rows of data in our database — and formore than that one instance.”
There were many options that Palov explored. “First, we tried MySQL NDB Cluster. That was avery frustrating experience. After that we tried a few other plugins and extensions of MySQL,
but they weren't complete solutions. At the end of this process, we found Galera with MySQL. It
responded to our needs nearly 100% of the time.”

Solution
In order to provide for nearly twenty
thousand point of sale machines for theNational Lottery, E-CARD uses Galera Cluster
for MySQL, Perl, MemCache and Redis. The
database layer runs on nine FreeBSD servers
configured into three clusters. Each serverhas 16 cores, 410 to 820 GB of RAM, anduses a mix of SSD and SAS storage. Additionally, they replicate data from one cluster intoanother using standard MySQL replication.

Benefits
The system took more than two years to implement and E-CARD continues to develop andimprove upon the system daily. They began by deploying clusters on their own into production.
Later, as the business grew they entered into a professional support service contract withCodership. Codership was able to deliver FreeBSD ports for Galera Cluster and the MySQL
Server, which was patched to use Galera replication. “Codership is a company that delivers
solutions for database clustering in the right time and the correct form for us,” says Palov.
“They have a very strong Engineering and QA team. They understand and react to our problems
in a very professional and reasonable way.”
The main benefits they have found are data safety and robustness as well as a reliability ofservice. They now always have three replicas of their data. They also no longer depend on asingle server and can instead provide uninterrupted service.

Copyright 2017, Codership Oy. All Rights Reserved.
Galera, Galera Cluster, Galera Replication are trademarks of Codership Oy.
Pohjolankatu 64 A, 00600 Helsinki, Finland info@galeracluster.com
http : / / ga l e r a c l uste r . c o m ♣ +358 50 5179059