Upgrade to Pro — share decks privately, control downloads, hide ads and more …

DAU 100 万人突破! 急成長を支える Shadowverse のインフラ技術

Cygames
June 02, 2017

DAU 100 万人突破! 急成長を支える Shadowverse のインフラ技術

2017/06/01 Game Tech Session ~AWS Summit Tokyo 2017~

Cygames

June 02, 2017
Tweet

More Decks by Cygames

Other Decks in Technology

Transcript

  1. 

  2.  

  3. 

  4.  "QQMJDBUJPO4FSWFST Node.js Nginx 6TFS$MJFOU "QQMJDBUJPO4FSWFST Apache / PHP %BUBCBTF4FSWFST

    MySQL HTTPS WebSocket Elastic Load Balancing Elastic Load Balancing $BTIF4FSWFST Memcached Redis
  5. Ϧ ΞϧλΠ Ϝ௨৴ͷαʔόߏ੒ ΫϥΠ Ξϯ τ͸3PPN*%Ͱ άϧʔϓԽ͞ΕΔ αʔό͸ϝ οηʔδΛ
 ΫϥΠ

    Ξϯ τʹڞ༗͢Δ
 ࢓૊ΈΛ࣋ͭ ෼ࢄϦ ΞϧλΠ Ϝ௨৴ͷ
 ߏ੒ͷݕ౼  Client A (RoomID 1) Client B (RoomID 2) Client C (RoomID 1) RoomID 1 RoomID 2 4FSWFS
  6. 1VC4VCϝ οηʔδϯάϞσϧ 1VC4VCϞσϧબఆ ࣮૷͕༰қ ୯Ұো֐఺ ʢ410'ʣ  1VC4VC͕Ϙ τϧωο Ϋʹ

    εέʔϧΞ΢ τͷ՝୊ ແఀࢭͷมߋ͕ߦ͑ͳ͍  Client A (RoomID 1) Client B (RoomID 2) Client C (RoomID 1) RoomID 1 /PEF RoomID 2 /PEF RoomID 1 RoomID 3 /PEF RoomID 2 3FEJT1VC4VC RoomID 1 RoomID 3 Client D (RoomID 3) Layer4 LB(Elastic Load Balancing)
  7. ϧʔϜ*%ରԠ-ϩʔυόϥϯαͷ։ൃ 410'ͷഉআ ϊ ʔυ୆਺Λಈతʹมߋ Ϛ ονϯάϩδο Ϋ Λ࣮૷ ಉҰϧʔϜ*%Λ
 ಉҰαʔόʹಈతϧʔς

    Ο ϯά  Client A (RoomID 1) Client B (RoomID 2) Client C (RoomID 1) Lua Nginx 1 Layer4 LB(Elastic Load Balancing) Lua Application Load Balancer Cluster Lua Nginx N Client D (RoomID 3) Nginx 2 … Room 1 Node 1 Room 2 Room 3 Node 3 Node 2 Dynamic Routing
  8.  /HJOY-ϩʔυόϥϯαͱ-VBεΫ Ϧϓ τ /HJOY 8FC4PDLFU௨৴ ʢ૒ํ޲௨৴ʣ ͷϩʔυόϥϯα -VBϞδϡʔϧʹΑ Γϩδο

    ΫػೳΛ࣮૷ -VBεΫ Ϧϓ τ ϔο μʹ෇༩͞ΕͨϧʔϜ*%Λݩʹಈత෼ࢄ 8FC"1*ʹΑ Γແఀࢭʹઃఆมߋ
  9.  ෼ࢄϩδο Ϋͷ࣮૷ ෼ࢄϩδο Ϋ ϧʔϜ*%ͷϋο γϡ஋ͱ/PEFαʔό਺ͷ৒༨ࢉ ʢNPEʣ Ͱ ઀ଓઌϊ

    ʔυ͕ܾఆ͞ΕΔ $POTJTUFOU)BTIJOH ʢϋο γϡܭࢉʣ  ϊ ʔυͷ௥Ճ ɾ ࡟আΛ࠷খݶͷมߋͰϚ ο ϐϯά
  10. ςΩε τϩάऩूͷ՝୊ ϩάऔΓ ͜΅͠ ҰߦͷαΠ ζ੍ݶ όο ϑ ΝΩϡʔҲΕ தܧαʔόͷෛՙ

    ϩάσʔλ૿େʹΑ Δ
 εέʔϧΞ΢ τͷ՝୊  Web Server 1 Error log KPI log Log Proxy 3 4UPSBHF"SSBZ Web Server 2 Web Server N SQL log Log Proxy 2 Access log Log Proxy 1
  11. .Z42-Π ϯαʔ τ ϩάͷ՝୊ Ϩεϙϯε஗Ԇ .Z42-*OTFSUॲཧͷ஗Ԇ ϩάσʔλ૿େ ϨϓϦέʔγϣϯ஗Ԇ  Web

    Server 1 Action log Web Server 2 Web Server N Item log MySQL Server Payment log
  12.  4UBMLFSͱ1PSUFS "NB[PO4ͷύϑ ΥʔϚϯε޲্ ઌ಄จࣈʹϋο γϡϓϨϑ Ο ο Ϋ ε௥Ճ͠ɺ

    
 JOEFYΛෳ਺ύʔς Ο γϣϯʹ෼ࢄ ྫ ɿ 4CVDLFU/MpMF໊
  13.  "TZODISPOPVT-PH 4ZTUFN (BNF 4ZTUFN CVTJOFTT 4ZTUFN 1PSUFSͱඇಉظ%#ϩάγεςϜ Worker Servers

    (Amazon EC2) Log Datebase (Amazon Aurora) σʔλղੳ CSରԠ Porter Web Servers Amazon S3 SQS TSV
  14. 

  15.  1.Put Event Trigger 2.Create Message 3.C ount M essages

    &$4Λར༻ͨ͠εέʔϥϒϧͳϩά࿈ܞ Google Cloud Storage Google BigQuery Auto Scaling 4.Run Task 6.Save Objects SQL Query Cron Job Amazon S3 Amazon Lamdba Amazon Lamdba SQS Amazon EC2 Container Service(ECS) Ϋϥελͷ$16࢖༻཰ʹԠͯ͡ Π ϯελϯε਺Λ૿ݮ 5.Get Files ϩάྔʹԠͯ͡ίϯςφىಈ਺Λ૿ݮ
  16. ͭͷεέʔϦϯάϙϦ γͷ࿈ಈ -BNCEB'VODUJPO ϩάྔʹԠͯ͡ɺ 
 ίϯςφىಈ਺Λ্͛Δ &$"VUP4DBMJOH ىಈதίϯςφ਺͕
 ্ঢʹΑ Γ$16࢖༻཰্ঢ

    &$εέʔϦϯάϙϦ γʹΑ Γ
 $POUBJOFS*OTUBODF૿Ճ  &$4Ϋϥελʔͷ$16࢖༻཰ $POUBJOFS*OTUBODFىಈ਺
  17.  ίε τ࡟ݮͱࣗಈԽͷ࣮ݱ αʔόϨεʺίε τ࡟ݮ -BNCEB&$4ʹΑ Γ ίε τ Λʹ࡟ݮ

    ίϯςφٕज़ͷ࠾༻ -BNCEBͱ&$4ͷద༻ൣғ όονॲཧɺ Π ϕϯ τ τ ϦΨʔ͸-BNCEB ৗ࣮࣌ߦ͢Δॲཧ͸&$4
  18.  "NB[PO"UIFOBͷར༻ 1.Put Event Trigger 2.Create Message 3.C ount M

    essages Auto Scaling 4.Run Task Cron Job Amazon S3 Amazon Lamdba Amazon Lamdba SQS Amazon EC2 Container Service(ECS) 5.Get Files SQL Query Amazon S3 Amazon Athena 6.Save Objects Google Cloud Storage Google BigQuery SQL Query