Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
Scaling the gaming platform @Betsson
Journey of the monolith
Roger Johansson
Akka.NET Co-Founder
Twitter: @rogeralsing
Github: rogeralsing
Mail: roger.johansson@betsson.com Github.com/rogeralsing/presentations
All material
from this
presentation
ABOUT BETSSON GROUP
1766Employees (Q2 2016)
+ 500 tech employees
+ 40 nationalities
2121 different brands
Across Europe, Central Asia & Latin America
41%
563,247
Active players
(Q2 2016)
0%
5%
10%
15%
20%
25%
30%
35%
0
500
1,000
1,500
2,000
2,500
3,000
3,500
4,000
2011 2012 2013 2014 2015 H1 2016
SEKm
Profitable Growth
Revenue EBIT margin
1963Company
founded
2014
Revenue
SEK 3,722 m
2015
EBIT
SEK 886 m
73%
Casino
24%
Sportsbook
Share of revenue
Listed on Nasdaq
Large Cap
Share of revenue
(Q2 2016)
Mobile
19.1%
Top line CAGR of 19.1% (2012-2015)
What to expect from this talk
A bit of history on where we came from in terms of architecture
Geekery about microservices, service discovery, Docker and .NET Core
I will not talk about Akka.NET
I am not an Ops guy
The Past
One Brand, One System
Bets10
The Monolith
We acquired more brands
Bets10
The Monolith
NordicBetBetsafe
??
Scaling the monolith
A monolithic application puts all its
functionality into a single process…
…and scales by replicating the
monolith on multiple servers
-Martin Fowler, James Lewis
Scaling by Instance
Instance 2
Brand C
Instance 3
Brand D
Instance 1
Brand A, B
Introducing SOA
Instance 1 Instance 2 Instance 3
Customer
Gaming
Campaigns
…
Customer
Gaming
Campaigns
…
Customer
Gaming
Campaigns
…
Still pretty
darn big
services
Challenges?
Point to point communication
Single
Message
Producer
Single
Message
Consumer
No
Redundancy
Doesn’t
Scale
Shared Servers, Noisy Neighbours
Instance
Customer
Gaming
Campaigns
…
Instance
Single point of failure…
Customer
Gaming
Campaigns
…
…Same issue with deployment
Instance
Customer
Gaming
Campaigns
…
Down
during
deployment
Challenges!
• Scalability, Elasticity
• Isolation
• Availability
• Deployment
The Current
Adopting Microservices
Customer
Bounded Contexts
Login
Registration
Customer Data
Scaling Microservices
A microservice architecture puts
each element of functionality into a
separate service…
…and scales by distributing these services
across servers, replicating as needed
-Martin Fowler, James Lewis
Scaling Microservices
Where are
you guys!?
I’m over
here!
Service Discovery
Service Registry
Publish ”I am A” Publish ”I am B”
Service A Service B
Service Discovery
Service Registry
Lookup ”Where is B?”
Service A Service B
Service Discovery
Service Registry
CallService A Service B
Service Discovery
Service A3
Service A2
Service A1
Service B2
Service B1
Service B3
Service Registry
Leetspeak 2014, Niklas Gustavsson/Spotify
Service Discovery using DNS
Consul
Demo https://demo.consul.io/ui/
Microphone
.NET Consul
Microphone
Consul
.NET Service A
Microphone
I am A
Are you alive?
Where is X?
Consul enables
• Scalability – Locate service instances
• Availability – Find healthy instances
• Circuit Breaker’ish
• (Distributed Configuration)
Asp.NET Core
Demo Show Asp.NET Core with
Microphone
The future
Server
Docker
Login
Registration
Customer Data
Isolating
services from
eachother
Demo Docker Compose
Docker Compose
Cluster Schedulers
Cluster Schedulers
Server 2
Docker
Login
Registration
Customer Data
Server 1
Docker
Registration
Registration
….
Server 3
Docker
Login
….
….
Putting it all together
• Show Rancher UI
• Install Consul – Docker Compose
• Install Asp.NET Core services
• Show Consul UI
• Scale Services
• Redeploy Services
• Integrate with legacy services
Leetspeak

More Related Content

Leetspeak

Editor's Notes

  1. Founded in 1963 -strong history -we know what we’re doing Strong growth of approx 10% annually and strong EBIT margins at around 25%. Q2 was a disappointment, but we have taken action and Q3 has started well. Despite Q2 revenue was less than we hoped for, we have a strong underlying activity with an all time high of active players during Q2. Betsson is listed at Nasdaq Stockholm large cap. Betsson’s board believes in return to shareholders and the direct yield is 5-5.5%. We employ close to 1800 people across Europe. Our largest site, where I am based, is Malta with some 800 employees