SlideShare una empresa de Scribd logo
1 de 38
Descargar para leer sin conexión
Spil Games:
outgrowing an
internet startup
Art van Scheppingen
Head of Database Engineering
2	
  
1.  Who	
  is	
  Spil	
  Games?	
  
2.  How	
  to	
  professionalize?	
  
3.  Spil	
  Storage	
  Pla<orm	
  
4.  Ques@ons?	
  
Overview
Who are we?
Who	
  is	
  Spil	
  Games?	
  
	
  
4	
  
•  Company	
  founded	
  in	
  2001	
  
•  350+	
  employees	
  world	
  wide	
  
•  170M	
  unique	
  visitors	
  per	
  month	
  
•  100K	
  unique	
  visitors	
  per	
  month	
  on	
  spilgames.com	
  
Facts
5	
  
Geographic Reach
170	
  Million	
  Monthly	
  Ac@ve	
  Users(*)	
  
Source:	
  (*)	
  Google	
  Analy3cs,	
  December	
  2011	
  
•  Over	
  40	
  localized	
  portals	
  in	
  19	
  languages	
  
•  Focus	
  on	
  casual	
  and	
  social	
  games	
  
•  170M	
  MAU	
  per	
  month	
  (30M	
  YoY	
  growth)	
  
•  Over	
  40M	
  registered	
  users	
  
6	
  
Girls,	
  Teens	
  and	
  Family	
  
Brands
7	
  
Games
8	
  
Games
9	
  
Games
10	
  
Games
11	
  
Games
12	
  
Games
•  Inhouse	
  game	
  studios	
  
•  Partnerships	
  with	
  Social	
  Gaming	
  studios	
  
•  Over	
  1500	
  licensed	
  games	
  
13	
  
DB	
  Servers	
  
MAU	
  
Employees	
  
2006	
   2007	
   2008	
   2009	
   2010	
   2011	
  
DB	
  Servers	
  
MAU	
  
Employees	
  
Spil Games is growing fast!
Database
Engineering
How	
  to	
  professionalize	
  your	
  
department	
  
	
  
15	
  
•  Databases	
  maintained	
  by	
  Systems	
  Engineering	
  
•  No	
  focus	
  on	
  performance,	
  structure	
  or	
  backups	
  
•  Looking	
  only	
  one	
  or	
  two	
  weeks	
  into	
  the	
  future	
  
Startup
16	
  
•  Mul@ple	
  migra@ons	
  to	
  new	
  hardware	
  
•  Ping-­‐pong	
  on	
  Master-­‐Master	
  setups	
  
•  Lack	
  of	
  insight	
  into	
  performance	
  issues	
  
Lessons
Read+write
17	
  
•  Plan	
  ahead	
  up	
  to	
  three	
  months	
  
•  Improve	
  database	
  pla<orm	
  
•  Reduce	
  number	
  of	
  repe@@ve	
  tasks	
  
•  Write	
  them	
  down	
  step	
  by	
  step	
  (wiki)	
  
•  Automate	
  where	
  possible	
  
•  Improve	
  monitoring	
  
•  A	
  single	
  monitoring	
  system	
  is	
  not	
  enough!	
  
•  Forecast	
  growth	
  
•  Week	
  /	
  Month	
  /	
  Year	
  
•  Look	
  back	
  and	
  evaluate!	
  
•  Extend	
  department	
  
Professionalize
18	
  
•  Scaling	
  the	
  LDAP	
  pla<orm	
  
•  LDAP	
  replaced	
  by	
  MySQL	
  based	
  solu@on	
  (with	
  help	
  
from	
  Percona)	
  
LDAP isn’t suitable for the web
MMMDMM
19	
  
•  LVM	
  snapshot	
  method	
  
•  took	
  4	
  hours	
  on	
  average	
  with	
  manual	
  interven@on	
  
•  Innobackupex	
  +	
  netcat	
  +	
  tar	
  +	
  script	
  =	
  quick	
  cloning	
  
•  Takes	
  about	
  1	
  hour	
  per	
  100GB	
  
•  Foolproof	
  
•  Can	
  be	
  run	
  on	
  ac@ve	
  masters	
  (if	
  necessary)	
  
Cloning
20	
  
•  Different	
  monitoring	
  systems	
  give	
  different	
  insights	
  
•  Different	
  angles/metrics/purposes	
  
•  Early	
  problem	
  detec@on	
  
•  Signal	
  abnormal	
  use	
  which	
  could	
  cause	
  outage	
  
Improve monitoring
21	
  
•  Uneven	
  growth:	
  
•  Ac@ve	
  master	
  handling	
  all	
  write	
  requests	
  
•  Ver@cal	
  scaling	
  	
  
•  Write	
  only	
  
•  More	
  writes	
  than	
  reads	
  
•  SOA	
  problems	
  
•  Connec@on	
  spawning	
  
•  Open	
  file	
  descriptors	
  
Growing pains
22	
  
•  An@cipate	
  more	
  than	
  one	
  year	
  in	
  advance	
  
•  Acknowledge	
  shortcomings/problems,	
  look	
  for	
  
solu@ons	
  or	
  alterna@ves	
  
•  Don't	
  commit	
  to	
  one	
  single	
  solu@on!	
  
•  Be	
  flexible!	
  
•  Plan	
  for	
  capacity	
  per	
  instance,	
  not	
  for	
  growth	
  alone!	
  
•  Start	
  thinking	
  globally!	
  
Outgrowing our startup phase
Spil Storage
Platform
Sharding	
  is	
  inevitable	
  
	
  
24	
  
What is this exciting project about?
25	
  
•  Natural	
  growth	
  
•  Grown	
  out	
  of	
  necessity	
  for	
  more	
  func@onality	
  
•  Adding	
  func@onality	
  means	
  more	
  interac@on	
  
•  Separa@on	
  of	
  database	
  func@on	
  
•  Profiles	
  
•  Highscores	
  
•  Comments	
  
•  User	
  Generated	
  Content	
  
•  etc	
  
Functional sharding
26	
  
•  KISS	
  
•  Problem	
  isola@on	
  
Advantages
Disadvantages
•  Uneven	
  growth	
  
•  Difference	
  in	
  query	
  panerns	
  
•  No	
  data	
  consistency	
  
•  No	
  clear	
  ownership	
  of	
  data	
  
•  Capacity	
  planning	
  on	
  total	
  number	
  of	
  reads/writes	
  
•  Horizontal	
  scaling	
  is	
  difficult	
  
27	
  
Spil Storage Platform
28	
  
•  What	
  is	
  the	
  bucket	
  model?	
  
•  It	
  is	
  an	
  abstrac@on	
  layer	
  between	
  the	
  database	
  and	
  
the	
  datamodel	
  
•  Each	
  record	
  has	
  one	
  unique	
  owner	
  anribute	
  (GID)	
  
•  The	
  GID	
  (Global	
  IDen@fier)	
  iden@fies	
  different	
  data	
  
types	
  
•  Different	
  buckets	
  per	
  func@on	
  
•  Anributes	
  contain	
  record	
  data	
  
•  Anributes	
  do	
  not	
  have	
  to	
  correspond	
  to	
  schema	
  
Bucket model
29	
  
•  Flexibility	
  
•  Database	
  backend	
  independent	
  
•  Seamless	
  schema	
  changes	
  and	
  upgrades	
  
•  Sharded	
  on	
  both	
  func@onal	
  and	
  GID	
  level	
  
•  Even	
  distribu@on	
  of	
  queries	
  possible	
  
•  Capacity	
  planning	
  on	
  number	
  and	
  type	
  of	
  en@@es	
  
•  Asynchronous	
  writes	
  possible	
  
•  Transparent	
  data	
  migra@on	
  
Advantages
Disadvantages
•  Harder	
  to	
  find	
  data	
  
•  At	
  least	
  two	
  lookups	
  needed!	
  
•  Datawarehousing	
  needs	
  a	
  different	
  approach	
  
30	
  
•  Globally	
  sharded	
  on	
  GID	
  
•  (local)	
  GID	
  Lookup	
  
How do GIDs work?
GID
lookup
Shard 1 Shard 2
Persis
stora
31	
  
Pipeline flow
Current functional
shards
SPAPI
LEGACY
adapter
New
Application
SSP
Legacy API
New GID based
shards
Read only
Read + write
32	
  
Bucket mapping and migration
33	
  
•  Each	
  cluster	
  of	
  two	
  masters	
  will	
  contain	
  two	
  shards	
  
•  Data	
  is	
  wrinen	
  interleaved	
  
•  HA	
  for	
  both	
  shards	
  
•  No	
  warmup	
  needed	
  
•  Both	
  masters	
  ac@ve	
  and	
  “warmed	
  up”	
  
•  Slave	
  added	
  for	
  backups	
  and	
  Datawarehouse	
  
Master-Master Sharding
SSP	
  
Shard	
  1	
  
	
  	
  
	
  	
  
	
  	
  
	
  	
  
	
  	
  
	
  	
  
	
  	
  
	
  	
  
	
  	
  
Shard	
  2	
  
	
  	
  
	
  	
  
	
  	
  
	
  	
  
	
  	
  
	
  	
  
	
  	
  
	
  	
  
	
  	
  
34	
  
•  Erlang	
  cluster	
  with	
  many	
  workers	
  
•  Every	
  GID	
  has	
  its	
  own	
  worker	
  process	
  
•  (Inter)cluster	
  communica@on	
  
•  (Near)	
  linear	
  scalability	
  
How are we implementing this SSP?
35	
  
•  Erlang	
  node	
  caching	
  
•  Mul@ple	
  backend	
  connectors	
  
•  MySQL	
  library	
  
•  Handlersockets	
  
•  Any	
  other	
  connectors	
  if	
  needed	
  
•  Connec@on	
  pooling	
  
Advantages
Disadvantages
•  NOT	
  SEXY?	
  (	
  hnp://spil.com/notsexy	
  )	
  
36	
  
Do YOU want to be sexy?
Questions?
38	
  
Thank you!

Más contenido relacionado

La actualidad más candente

Data Care, Feeding, and Maintenance
Data Care, Feeding, and MaintenanceData Care, Feeding, and Maintenance
Data Care, Feeding, and MaintenanceMercedes Coyle
 
MongoDB Days Germany: Data Processing with MongoDB
MongoDB Days Germany: Data Processing with MongoDBMongoDB Days Germany: Data Processing with MongoDB
MongoDB Days Germany: Data Processing with MongoDBMongoDB
 
Ciel, mes données ne sont plus relationnelles
Ciel, mes données ne sont plus relationnellesCiel, mes données ne sont plus relationnelles
Ciel, mes données ne sont plus relationnellesXavier Gorse
 
SSIS Monitoring Deep Dive
SSIS Monitoring Deep DiveSSIS Monitoring Deep Dive
SSIS Monitoring Deep DiveDavide Mauri
 
Geek Sync | Top 5 Tips to Keep Always On Always Humming and Users Happy
Geek Sync | Top 5 Tips to Keep Always On Always Humming and Users HappyGeek Sync | Top 5 Tips to Keep Always On Always Humming and Users Happy
Geek Sync | Top 5 Tips to Keep Always On Always Humming and Users HappyIDERA Software
 
City of Atlanta Oracle Application Footprint
City of Atlanta Oracle Application FootprintCity of Atlanta Oracle Application Footprint
City of Atlanta Oracle Application FootprintDanny Bryant
 
Dogfooding data at Lyft
Dogfooding data at LyftDogfooding data at Lyft
Dogfooding data at Lyftmarkgrover
 
SAIS2018 - Fact Store At Netflix Scale
SAIS2018 - Fact Store At Netflix ScaleSAIS2018 - Fact Store At Netflix Scale
SAIS2018 - Fact Store At Netflix ScaleNitin S
 
Scala and Spark are Ideal for Big Data - Data Science Pop-up Seattle
Scala and Spark are Ideal for Big Data - Data Science Pop-up SeattleScala and Spark are Ideal for Big Data - Data Science Pop-up Seattle
Scala and Spark are Ideal for Big Data - Data Science Pop-up SeattleDomino Data Lab
 
Efficient & effective data management for research projects : ILRI's Data Ma...
Efficient & effective  data management for research projects : ILRI's Data Ma...Efficient & effective  data management for research projects : ILRI's Data Ma...
Efficient & effective data management for research projects : ILRI's Data Ma...CIARD Movement
 
Data Ingestion Engine
Data Ingestion EngineData Ingestion Engine
Data Ingestion EngineAdam Doyle
 
ELK at LinkedIn - Kafka, scaling, lessons learned
ELK at LinkedIn - Kafka, scaling, lessons learnedELK at LinkedIn - Kafka, scaling, lessons learned
ELK at LinkedIn - Kafka, scaling, lessons learnedTin Le
 
Using Joomla, Zoo & SOLR to power Asia's Largest Auction House
Using Joomla, Zoo & SOLR to power Asia's Largest Auction HouseUsing Joomla, Zoo & SOLR to power Asia's Largest Auction House
Using Joomla, Zoo & SOLR to power Asia's Largest Auction HouseParth Lawate
 
Zillow's favorite big data & machine learning tools
Zillow's favorite big data & machine learning toolsZillow's favorite big data & machine learning tools
Zillow's favorite big data & machine learning toolsnjstevens
 
Participating in the Community - Beyond Code: Presented by Cassandra Targett,...
Participating in the Community - Beyond Code: Presented by Cassandra Targett,...Participating in the Community - Beyond Code: Presented by Cassandra Targett,...
Participating in the Community - Beyond Code: Presented by Cassandra Targett,...Lucidworks
 
Adf and ala design c sharp corner toronto chapter feb 2019 meetup nik shahriar
Adf and ala design c sharp corner toronto chapter feb 2019 meetup nik shahriarAdf and ala design c sharp corner toronto chapter feb 2019 meetup nik shahriar
Adf and ala design c sharp corner toronto chapter feb 2019 meetup nik shahriarNilesh Shah
 

La actualidad más candente (20)

Data Care, Feeding, and Maintenance
Data Care, Feeding, and MaintenanceData Care, Feeding, and Maintenance
Data Care, Feeding, and Maintenance
 
MongoDB Days Germany: Data Processing with MongoDB
MongoDB Days Germany: Data Processing with MongoDBMongoDB Days Germany: Data Processing with MongoDB
MongoDB Days Germany: Data Processing with MongoDB
 
Ciel, mes données ne sont plus relationnelles
Ciel, mes données ne sont plus relationnellesCiel, mes données ne sont plus relationnelles
Ciel, mes données ne sont plus relationnelles
 
SSIS Monitoring Deep Dive
SSIS Monitoring Deep DiveSSIS Monitoring Deep Dive
SSIS Monitoring Deep Dive
 
Geek Sync | Top 5 Tips to Keep Always On Always Humming and Users Happy
Geek Sync | Top 5 Tips to Keep Always On Always Humming and Users HappyGeek Sync | Top 5 Tips to Keep Always On Always Humming and Users Happy
Geek Sync | Top 5 Tips to Keep Always On Always Humming and Users Happy
 
Scala Jday 2014
Scala Jday 2014 Scala Jday 2014
Scala Jday 2014
 
City of Atlanta Oracle Application Footprint
City of Atlanta Oracle Application FootprintCity of Atlanta Oracle Application Footprint
City of Atlanta Oracle Application Footprint
 
Dogfooding data at Lyft
Dogfooding data at LyftDogfooding data at Lyft
Dogfooding data at Lyft
 
SAIS2018 - Fact Store At Netflix Scale
SAIS2018 - Fact Store At Netflix ScaleSAIS2018 - Fact Store At Netflix Scale
SAIS2018 - Fact Store At Netflix Scale
 
Scala and Spark are Ideal for Big Data - Data Science Pop-up Seattle
Scala and Spark are Ideal for Big Data - Data Science Pop-up SeattleScala and Spark are Ideal for Big Data - Data Science Pop-up Seattle
Scala and Spark are Ideal for Big Data - Data Science Pop-up Seattle
 
Efficient & effective data management for research projects : ILRI's Data Ma...
Efficient & effective  data management for research projects : ILRI's Data Ma...Efficient & effective  data management for research projects : ILRI's Data Ma...
Efficient & effective data management for research projects : ILRI's Data Ma...
 
Neo4j & fby presentation
Neo4j & fby presentationNeo4j & fby presentation
Neo4j & fby presentation
 
Data Ingestion Engine
Data Ingestion EngineData Ingestion Engine
Data Ingestion Engine
 
ELK at LinkedIn - Kafka, scaling, lessons learned
ELK at LinkedIn - Kafka, scaling, lessons learnedELK at LinkedIn - Kafka, scaling, lessons learned
ELK at LinkedIn - Kafka, scaling, lessons learned
 
Using Joomla, Zoo & SOLR to power Asia's Largest Auction House
Using Joomla, Zoo & SOLR to power Asia's Largest Auction HouseUsing Joomla, Zoo & SOLR to power Asia's Largest Auction House
Using Joomla, Zoo & SOLR to power Asia's Largest Auction House
 
Zillow's favorite big data & machine learning tools
Zillow's favorite big data & machine learning toolsZillow's favorite big data & machine learning tools
Zillow's favorite big data & machine learning tools
 
Spark at Zillow
Spark at ZillowSpark at Zillow
Spark at Zillow
 
Participating in the Community - Beyond Code: Presented by Cassandra Targett,...
Participating in the Community - Beyond Code: Presented by Cassandra Targett,...Participating in the Community - Beyond Code: Presented by Cassandra Targett,...
Participating in the Community - Beyond Code: Presented by Cassandra Targett,...
 
Adf and ala design c sharp corner toronto chapter feb 2019 meetup nik shahriar
Adf and ala design c sharp corner toronto chapter feb 2019 meetup nik shahriarAdf and ala design c sharp corner toronto chapter feb 2019 meetup nik shahriar
Adf and ala design c sharp corner toronto chapter feb 2019 meetup nik shahriar
 
Apache Spark in Industry
Apache Spark in IndustryApache Spark in Industry
Apache Spark in Industry
 

Similar a Outgrowing an internet startup: database administration in a fast growing company.

Big Data Overview Part 1
Big Data Overview Part 1Big Data Overview Part 1
Big Data Overview Part 1William Simms
 
Mongo db admin_20110329
Mongo db admin_20110329Mongo db admin_20110329
Mongo db admin_20110329radiocats
 
Reactive Development: Commands, Actors and Events. Oh My!!
Reactive Development: Commands, Actors and Events.  Oh My!!Reactive Development: Commands, Actors and Events.  Oh My!!
Reactive Development: Commands, Actors and Events. Oh My!!David Hoerster
 
Filipe paternot - Case Study: Zabbix Deployment at Globo.com
Filipe paternot - Case Study: Zabbix Deployment at Globo.comFilipe paternot - Case Study: Zabbix Deployment at Globo.com
Filipe paternot - Case Study: Zabbix Deployment at Globo.comZabbix
 
What ya gonna do?
What ya gonna do?What ya gonna do?
What ya gonna do?CQD
 
Continuous Optimization for Distributed BigData Analysis
Continuous Optimization for Distributed BigData AnalysisContinuous Optimization for Distributed BigData Analysis
Continuous Optimization for Distributed BigData AnalysisKai Sasaki
 
AWS re:Invent 2016| GAM302 | Sony PlayStation: Breaking the Bandwidth Barrier...
AWS re:Invent 2016| GAM302 | Sony PlayStation: Breaking the Bandwidth Barrier...AWS re:Invent 2016| GAM302 | Sony PlayStation: Breaking the Bandwidth Barrier...
AWS re:Invent 2016| GAM302 | Sony PlayStation: Breaking the Bandwidth Barrier...Amazon Web Services
 
Ideas spracklen-final
Ideas spracklen-finalIdeas spracklen-final
Ideas spracklen-finalsupportlogic
 
Rakuten’s Journey with Splunk - Evolution of Splunk as a Service
Rakuten’s Journey with Splunk - Evolution of Splunk as a ServiceRakuten’s Journey with Splunk - Evolution of Splunk as a Service
Rakuten’s Journey with Splunk - Evolution of Splunk as a ServiceRakuten Group, Inc.
 
Large scale computing with mapreduce
Large scale computing with mapreduceLarge scale computing with mapreduce
Large scale computing with mapreducehansen3032
 
Big Data Rampage
Big Data RampageBig Data Rampage
Big Data RampageNiko Vuokko
 
5 Popular Choices for NoSQL on a Microsoft Platform - Tulsa - July 2018
5 Popular Choices for NoSQL on a Microsoft Platform - Tulsa - July 20185 Popular Choices for NoSQL on a Microsoft Platform - Tulsa - July 2018
5 Popular Choices for NoSQL on a Microsoft Platform - Tulsa - July 2018Matthew Groves
 
Pldc2012 monitoring-and-trending-with-mysql
Pldc2012 monitoring-and-trending-with-mysqlPldc2012 monitoring-and-trending-with-mysql
Pldc2012 monitoring-and-trending-with-mysqlradiocats
 
Intro to Big Data and NoSQL
Intro to Big Data and NoSQLIntro to Big Data and NoSQL
Intro to Big Data and NoSQLDon Demcsak
 

Similar a Outgrowing an internet startup: database administration in a fast growing company. (20)

Intro to Big Data
Intro to Big DataIntro to Big Data
Intro to Big Data
 
Big Data Overview Part 1
Big Data Overview Part 1Big Data Overview Part 1
Big Data Overview Part 1
 
Big Data training
Big Data trainingBig Data training
Big Data training
 
Mongo db admin_20110329
Mongo db admin_20110329Mongo db admin_20110329
Mongo db admin_20110329
 
Scalable web architecture
Scalable web architectureScalable web architecture
Scalable web architecture
 
Reactive Development: Commands, Actors and Events. Oh My!!
Reactive Development: Commands, Actors and Events.  Oh My!!Reactive Development: Commands, Actors and Events.  Oh My!!
Reactive Development: Commands, Actors and Events. Oh My!!
 
Filipe paternot - Case Study: Zabbix Deployment at Globo.com
Filipe paternot - Case Study: Zabbix Deployment at Globo.comFilipe paternot - Case Study: Zabbix Deployment at Globo.com
Filipe paternot - Case Study: Zabbix Deployment at Globo.com
 
What ya gonna do?
What ya gonna do?What ya gonna do?
What ya gonna do?
 
Continuous Optimization for Distributed BigData Analysis
Continuous Optimization for Distributed BigData AnalysisContinuous Optimization for Distributed BigData Analysis
Continuous Optimization for Distributed BigData Analysis
 
AWS re:Invent 2016| GAM302 | Sony PlayStation: Breaking the Bandwidth Barrier...
AWS re:Invent 2016| GAM302 | Sony PlayStation: Breaking the Bandwidth Barrier...AWS re:Invent 2016| GAM302 | Sony PlayStation: Breaking the Bandwidth Barrier...
AWS re:Invent 2016| GAM302 | Sony PlayStation: Breaking the Bandwidth Barrier...
 
Big Data
Big DataBig Data
Big Data
 
Ideas spracklen-final
Ideas spracklen-finalIdeas spracklen-final
Ideas spracklen-final
 
Rakuten’s Journey with Splunk - Evolution of Splunk as a Service
Rakuten’s Journey with Splunk - Evolution of Splunk as a ServiceRakuten’s Journey with Splunk - Evolution of Splunk as a Service
Rakuten’s Journey with Splunk - Evolution of Splunk as a Service
 
Intro to Big Data - Spark
Intro to Big Data - SparkIntro to Big Data - Spark
Intro to Big Data - Spark
 
Large scale computing with mapreduce
Large scale computing with mapreduceLarge scale computing with mapreduce
Large scale computing with mapreduce
 
Big Data Rampage
Big Data RampageBig Data Rampage
Big Data Rampage
 
5 Popular Choices for NoSQL on a Microsoft Platform - Tulsa - July 2018
5 Popular Choices for NoSQL on a Microsoft Platform - Tulsa - July 20185 Popular Choices for NoSQL on a Microsoft Platform - Tulsa - July 2018
5 Popular Choices for NoSQL on a Microsoft Platform - Tulsa - July 2018
 
Pldc2012 monitoring-and-trending-with-mysql
Pldc2012 monitoring-and-trending-with-mysqlPldc2012 monitoring-and-trending-with-mysql
Pldc2012 monitoring-and-trending-with-mysql
 
Intro to Big Data and NoSQL
Intro to Big Data and NoSQLIntro to Big Data and NoSQL
Intro to Big Data and NoSQL
 
A data analyst view of Bigdata
A data analyst view of Bigdata A data analyst view of Bigdata
A data analyst view of Bigdata
 

Más de spil-engineering

Percona Live London 2014: Serve out any page with an HA Sphinx environment
Percona Live London 2014: Serve out any page with an HA Sphinx environmentPercona Live London 2014: Serve out any page with an HA Sphinx environment
Percona Live London 2014: Serve out any page with an HA Sphinx environmentspil-engineering
 
Spil Games @ FOSDEM: Galera Replicator IRL
Spil Games @ FOSDEM: Galera Replicator IRLSpil Games @ FOSDEM: Galera Replicator IRL
Spil Games @ FOSDEM: Galera Replicator IRLspil-engineering
 
MySQL performance monitoring using Statsd and Graphite (PLUK2013)
MySQL performance monitoring using Statsd and Graphite (PLUK2013)MySQL performance monitoring using Statsd and Graphite (PLUK2013)
MySQL performance monitoring using Statsd and Graphite (PLUK2013)spil-engineering
 
Retaining globally distributed high availability
Retaining globally distributed high availabilityRetaining globally distributed high availability
Retaining globally distributed high availabilityspil-engineering
 
MySQL Performance Monitoring
MySQL Performance MonitoringMySQL Performance Monitoring
MySQL Performance Monitoringspil-engineering
 

Más de spil-engineering (7)

Percona Live London 2014: Serve out any page with an HA Sphinx environment
Percona Live London 2014: Serve out any page with an HA Sphinx environmentPercona Live London 2014: Serve out any page with an HA Sphinx environment
Percona Live London 2014: Serve out any page with an HA Sphinx environment
 
Spil Games @ FOSDEM: Galera Replicator IRL
Spil Games @ FOSDEM: Galera Replicator IRLSpil Games @ FOSDEM: Galera Replicator IRL
Spil Games @ FOSDEM: Galera Replicator IRL
 
MySQL performance monitoring using Statsd and Graphite (PLUK2013)
MySQL performance monitoring using Statsd and Graphite (PLUK2013)MySQL performance monitoring using Statsd and Graphite (PLUK2013)
MySQL performance monitoring using Statsd and Graphite (PLUK2013)
 
Retaining globally distributed high availability
Retaining globally distributed high availabilityRetaining globally distributed high availability
Retaining globally distributed high availability
 
MySQL Performance Monitoring
MySQL Performance MonitoringMySQL Performance Monitoring
MySQL Performance Monitoring
 
Disco workshop
Disco workshopDisco workshop
Disco workshop
 
Database TCO
Database TCODatabase TCO
Database TCO
 

Último

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

Outgrowing an internet startup: database administration in a fast growing company.

  • 1. Spil Games: outgrowing an internet startup Art van Scheppingen Head of Database Engineering
  • 2. 2   1.  Who  is  Spil  Games?   2.  How  to  professionalize?   3.  Spil  Storage  Pla<orm   4.  Ques@ons?   Overview
  • 3. Who are we? Who  is  Spil  Games?    
  • 4. 4   •  Company  founded  in  2001   •  350+  employees  world  wide   •  170M  unique  visitors  per  month   •  100K  unique  visitors  per  month  on  spilgames.com   Facts
  • 5. 5   Geographic Reach 170  Million  Monthly  Ac@ve  Users(*)   Source:  (*)  Google  Analy3cs,  December  2011   •  Over  40  localized  portals  in  19  languages   •  Focus  on  casual  and  social  games   •  170M  MAU  per  month  (30M  YoY  growth)   •  Over  40M  registered  users  
  • 6. 6   Girls,  Teens  and  Family   Brands
  • 12. 12   Games •  Inhouse  game  studios   •  Partnerships  with  Social  Gaming  studios   •  Over  1500  licensed  games  
  • 13. 13   DB  Servers   MAU   Employees   2006   2007   2008   2009   2010   2011   DB  Servers   MAU   Employees   Spil Games is growing fast!
  • 15. 15   •  Databases  maintained  by  Systems  Engineering   •  No  focus  on  performance,  structure  or  backups   •  Looking  only  one  or  two  weeks  into  the  future   Startup
  • 16. 16   •  Mul@ple  migra@ons  to  new  hardware   •  Ping-­‐pong  on  Master-­‐Master  setups   •  Lack  of  insight  into  performance  issues   Lessons Read+write
  • 17. 17   •  Plan  ahead  up  to  three  months   •  Improve  database  pla<orm   •  Reduce  number  of  repe@@ve  tasks   •  Write  them  down  step  by  step  (wiki)   •  Automate  where  possible   •  Improve  monitoring   •  A  single  monitoring  system  is  not  enough!   •  Forecast  growth   •  Week  /  Month  /  Year   •  Look  back  and  evaluate!   •  Extend  department   Professionalize
  • 18. 18   •  Scaling  the  LDAP  pla<orm   •  LDAP  replaced  by  MySQL  based  solu@on  (with  help   from  Percona)   LDAP isn’t suitable for the web MMMDMM
  • 19. 19   •  LVM  snapshot  method   •  took  4  hours  on  average  with  manual  interven@on   •  Innobackupex  +  netcat  +  tar  +  script  =  quick  cloning   •  Takes  about  1  hour  per  100GB   •  Foolproof   •  Can  be  run  on  ac@ve  masters  (if  necessary)   Cloning
  • 20. 20   •  Different  monitoring  systems  give  different  insights   •  Different  angles/metrics/purposes   •  Early  problem  detec@on   •  Signal  abnormal  use  which  could  cause  outage   Improve monitoring
  • 21. 21   •  Uneven  growth:   •  Ac@ve  master  handling  all  write  requests   •  Ver@cal  scaling     •  Write  only   •  More  writes  than  reads   •  SOA  problems   •  Connec@on  spawning   •  Open  file  descriptors   Growing pains
  • 22. 22   •  An@cipate  more  than  one  year  in  advance   •  Acknowledge  shortcomings/problems,  look  for   solu@ons  or  alterna@ves   •  Don't  commit  to  one  single  solu@on!   •  Be  flexible!   •  Plan  for  capacity  per  instance,  not  for  growth  alone!   •  Start  thinking  globally!   Outgrowing our startup phase
  • 24. 24   What is this exciting project about?
  • 25. 25   •  Natural  growth   •  Grown  out  of  necessity  for  more  func@onality   •  Adding  func@onality  means  more  interac@on   •  Separa@on  of  database  func@on   •  Profiles   •  Highscores   •  Comments   •  User  Generated  Content   •  etc   Functional sharding
  • 26. 26   •  KISS   •  Problem  isola@on   Advantages Disadvantages •  Uneven  growth   •  Difference  in  query  panerns   •  No  data  consistency   •  No  clear  ownership  of  data   •  Capacity  planning  on  total  number  of  reads/writes   •  Horizontal  scaling  is  difficult  
  • 27. 27   Spil Storage Platform
  • 28. 28   •  What  is  the  bucket  model?   •  It  is  an  abstrac@on  layer  between  the  database  and   the  datamodel   •  Each  record  has  one  unique  owner  anribute  (GID)   •  The  GID  (Global  IDen@fier)  iden@fies  different  data   types   •  Different  buckets  per  func@on   •  Anributes  contain  record  data   •  Anributes  do  not  have  to  correspond  to  schema   Bucket model
  • 29. 29   •  Flexibility   •  Database  backend  independent   •  Seamless  schema  changes  and  upgrades   •  Sharded  on  both  func@onal  and  GID  level   •  Even  distribu@on  of  queries  possible   •  Capacity  planning  on  number  and  type  of  en@@es   •  Asynchronous  writes  possible   •  Transparent  data  migra@on   Advantages Disadvantages •  Harder  to  find  data   •  At  least  two  lookups  needed!   •  Datawarehousing  needs  a  different  approach  
  • 30. 30   •  Globally  sharded  on  GID   •  (local)  GID  Lookup   How do GIDs work? GID lookup Shard 1 Shard 2 Persis stora
  • 32. Current functional shards SPAPI LEGACY adapter New Application SSP Legacy API New GID based shards Read only Read + write 32   Bucket mapping and migration
  • 33. 33   •  Each  cluster  of  two  masters  will  contain  two  shards   •  Data  is  wrinen  interleaved   •  HA  for  both  shards   •  No  warmup  needed   •  Both  masters  ac@ve  and  “warmed  up”   •  Slave  added  for  backups  and  Datawarehouse   Master-Master Sharding SSP   Shard  1                                       Shard  2                                      
  • 34. 34   •  Erlang  cluster  with  many  workers   •  Every  GID  has  its  own  worker  process   •  (Inter)cluster  communica@on   •  (Near)  linear  scalability   How are we implementing this SSP?
  • 35. 35   •  Erlang  node  caching   •  Mul@ple  backend  connectors   •  MySQL  library   •  Handlersockets   •  Any  other  connectors  if  needed   •  Connec@on  pooling   Advantages Disadvantages •  NOT  SEXY?  (  hnp://spil.com/notsexy  )  
  • 36. 36   Do YOU want to be sexy?