Cloud service providers do not provide the same level of flexibility compared as an on-premises database. In this session, discover how Gaming Innovation Group (GiG) and MariaDB deployed a highly available setup on Microsoft Azure using the following technologies: Azure Load Balancer, CoroSync, Pacemaker, MariaDB MaxScale, MariaDB Cluster and MariaDB Server.
3. ~750
No of Employees
Offices in Malta,
Denmark, Gibraltar,
Norway, Spain, USA
Licences in Malta,
UK, New Jersey,
Germany S-H,
(Denmark, Spain,
Sweden)
GiG Overview
2012
GiG founded Listed on the
Oslo Stock
exchange
€151.4m revenue
30+ clients
including Hard
Rock International
2015 Present
“Opening up iGaming to
make it fair & fun for all”
Vision
“Have a stake in every
fair online bet”
Mission
4. GiG Service Portfolio
GiG Media GiG Core
GiG Sports
& Games
GiG Gaming
Digital marketing Platform services
Sports & gaming
services
Operators
Finding leads through
online media buys and
publishing and refer these
lead to operators
Offering cloud based
platform services to
multiple operators,
internal and external
Odds, trading and risk
management tools and
mobile first front end for
sportsbooks and games
for casino operators
Seven consumer facing
brands
Connecting end users, operators & suppliers
B2B B2B B2B B2C
5. GiG Sports Connect
In-house and
aggregated odds
and data
GiG Trader
Full suite of trading
and risk
management tools
GiG Goal
Mobile first Sports
Front End
GiG Sports
6. GiG Sports Data ingestion
Data persistence
Data processing
Transactions
7. Performance
1M+ messages processed per day
100ms (avg) to process an odds message
140+ concurrent live events
23k+ events
50+ bets per second
GiG Sports
10. GiG Sports
Master Master Master
Load Balancer
Multi master using Galera Cluster
Hosted on cloud or on premise
Fault Tolerant and automatic failover
Linear scalable
Geo-replication
11. GiG Sports
Master Slave Slave
Load Balancer
Single master using Galera Cluster
Hosted on cloud or on premise
Fault Tolerant and automatic failover
Linear scalable
Geo-replication
12. GiG Sports
Master Slave Slave
Load Balancer
Single master using MariaDB MaxScale
Hosted on cloud or on premise
Fault Tolerant and automatic failover
Linear scalable
Geo-replication
Active
Remote
Manual Manual
15. GiG Sports
Corosync and Pacemaker
A group communication system
mostly used for implementing
application high availability
A high availability resource manager
which provides application clustering.
16. GiG Sports
Corosync and Pacemaker
Leader
Load Balancer
Node Node
App
Performs TCP health checks to identify which nodes
are serving the application
Group clustering
communication
Group clustering
communication
17. GiG Sports
Corosync and Pacemaker
Leader
Load Balancer
Leader Node
App
Pacemaker on the new leader switches
application on
18. GiG Sports
Master Slave Slave
Load Balancer
Single master using MariaDB MaxScale
Hosted on cloud or on premise
Fault Tolerant and automatic failover
Linear scalable
Geo-replication
Active
Remote
Passive Passive
19. Media
Omni-Channel
Platform
Sports & Games Content
Managed ServicesGiG Sports
Configuration
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash
apt-get update && apt-get install maxscale
Install MaxScale on all nodes
service maxscale stop
systemctl disable maxscale
Stop and disable MaxScale service autostart
20. Media
Omni-Channel
Platform
Sports & Games Content
Managed ServicesGiG Sports
Configuration
apt-get update && apt-get install pacemaker
Install Corosync and PaceMaker
corosync-keygen
Generate a key from corosync used to rsync to the other nodes
21. Media
Omni-Channel
Platform
Sports & Games Content
Managed ServicesGiG Sports
Configuration
cluster_name: maxscale-cluster
interface {
ringnumber: 0
member {
memberaddr: <node1>
}
member {
memberaddr: <node2>
}
member {
memberaddr: <node3>
}
bindnetaddr: <node1>
mcastport: 5405
}
quorum {
provider: corosync_votequorum
expected_votes: 2
}
Configure corosync.conf
22. Media
Omni-Channel
Platform
Sports & Games Content
Managed ServicesGiG Sports
Configuration
rsync -avh /etc/corosync/ root@<node2>:/etc/corosync
rsync -avh /etc/corosync/ root@<node3>:/etc/corosync
Rsync Corosync keys to all other nodes
crm configure property 'stonith-enabled'='false'
Disable the STONITH (Shoot The Other Node In The Head)
23. Media
Omni-Channel
Platform
Sports & Games Content
Managed ServicesGiG Sports
Configuration
crm configure primitive MaxScale systemd:maxscale
op monitor interval='10s' timeout='15s'
op start interval='0' timeout='15s'
op stop interval='0' timeout='30s'
Configure MaxScale in the Cluster Resource Manager