patrick huesler wooga gmbh › dl › goto-aar-2012 › slides › ...load balancer app app app app...

93
NOSQL GAMES Patrick Huesler wooga GmbH

Upload: others

Post on 07-Feb-2021

18 views

Category:

Documents


0 download

TRANSCRIPT

  • NOSQL GAMESPatrick Hueslerwooga GmbH

  • play?Do you like to

  • challengestechnical

  • for Diamond Dash20,543,500monthly active users

    http://www.appdata.com/apps/facebook/127995567256931-diamond-dash (03/10/2012)

    http://www.appdata.com/apps/facebook/127995567256931-diamond-dashhttp://www.appdata.com/apps/facebook/127995567256931-diamond-dash

  • for Diamond Dash3,871,133daily active users

    http://www.appdata.com/apps/facebook/127995567256931-diamond-dash (03/10/2012)

    http://www.appdata.com/apps/facebook/127995567256931-diamond-dashhttp://www.appdata.com/apps/facebook/127995567256931-diamond-dash

  • for Monster World6,500 RPS

    backend traffic up to

  • Database?what does mean that for a

  • write heavyread/write ratio?

  • of architectureEVOLUTION

    Wooga’s

  • Game backend

    iOS

    Flash

    Facebook

    Reporting

  • ... well, nginx instead of apache

    LAMPBuilt with

  • scalemysql does

  • use casesfor certain

  • peoplewith the right

  • cloudTo the

  • instead of PHPRailsLet’s use

  • load balancer

    app server app server app server

    master shard 1 master shard 2

    slave shard 2 slave shard 2

  • shortstory

    long

  • load balancer

    app app app app app app app app

    db db db db db db db db

    db db db db db db db db

    app app app app app app app app

    app app app app app app app app

  • use casedifferent

  • Are NOTarcade games

    farming games

  • going to workNOT

    5is is

  • at the end of the tunnelLight

    but there is

  • to redisSLOW PARTS

    Move

  • rinsE and REPEAT

  • dedicatedback to

  • for the buckbangMore

  • MachinesFaster

  • networkfaster

  • all the wayREdisLet’s use

  • load balancer

    app server app server app server

    redis

    redis slave

  • REDIS HASH

  • Redis Landall is well in

  • Memory Leaks

  • work again?BGSAVEhow does

  • workingno longerdumps are

  • going to workNOT

    5is is

  • Restore on Demand

    6x it with

  • (never really supported)Disk Store

    Redis

  • StatefulLet’s go

  • is faster than no databasedatabase

    no

  • all the wayS3

    Let’s use

  • erlangLet’s use

  • http://www.slideshare.net/wooga/from-0-to-1000000-daily-users-with-erlang

    http://www.slideshare.net/wooga/from-0-to-1000000-daily-users-with-erlanghttp://www.slideshare.net/wooga/from-0-to-1000000-daily-users-with-erlang

  • http://www.slideshare.net/wooga/from-0-to-1000000-daily-users-with-erlang

    http://www.slideshare.net/wooga/from-0-to-1000000-daily-users-with-erlanghttp://www.slideshare.net/wooga/from-0-to-1000000-daily-users-with-erlang

  • SPARTANproject

  • yesterdayready

    it has to be

  • enormouslyscale

    It has to

  • node.js

  • without sharding?Scales

    What DB

  • masterless replication?

    what DB has

  • Async Saving

  • Riak

  • for nowgood enough

  • for goodgood enough

  • Riaklife with

  • 1 { 2 "userId" : 1000000011100, 3 "xp" : 20, 4 "coins" : 400, 5 "cash" : 300, 6 "rooms" : [ 7 { 8 "id" : 1, 9 "type" : "x-ray", 10 "status" : "busy" 11 } 12 ] 13 } 14

  • is plain awesomeSPoF

    no

  • for our use casesuboptimal

    bitcask was

  • over all keys!map/reduce

    Do not

  • ulimitdread8l

  • riak Attachthe tale of

  • MobileMonsters go

  • a flash clientNOT

    An iOS client is

  • at all?databasedo we need a

  • in a stateless architecture?s3

    Could we just use

  • at all?backenddo we need a

  • writes toclientwhat if the

    S3?

  • wooga.com/jobs