Ameba Piggの裏側

13,295 views

Published on

1 Comment
17 Likes
Statistics
Notes
No Downloads
Views
Total views
13,295
On SlideShare
0
From Embeds
0
Number of Embeds
2,350
Actions
Shares
0
Downloads
77
Comments
1
Likes
17
Embeds 0
No embeds

No notes for slide

Ameba Piggの裏側

  1. 1. AmebaPigg2011 5 16
  2. 2. 2011 5 16
  3. 3. (32) / @waysaku 2006 • SIer AmebaPigg2011 5 16
  4. 4. (32) / @waysaku 2006 • SIer AmebaPigg2011 5 16
  5. 5. AmebaPigg2011 5 16
  6. 6. 2009 2 4002011 5 16
  7. 7. 2011 5 16
  8. 8. 2011 5 16
  9. 9. 2011 5 16
  10. 10. 62011 5 16
  11. 11. • •2011 5 16
  12. 12. 2011 5 16
  13. 13. 2011 5 16
  14. 14. 2011 5 16
  15. 15. 2011 5 16
  16. 16. (Push )2011 5 16
  17. 17. (Push )2011 5 16
  18. 18. (Push )2011 5 16
  19. 19. File Store Cluster hadoop cluster MySQL memcached memcached web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  20. 20. File Store Cluster hadoop cluster MySQL memcached memcached swf img web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  21. 21. File Store Cluster hadoop cluster MySQL memcached memcached web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  22. 22. File Store Cluster hadoop cluster MySQL memcached memcached web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  23. 23. File Store Cluster hadoop cluster MySQL memcached memcached web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  24. 24. File Store Cluster hadoop cluster MySQL memcached memcached web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  25. 25. File Store Cluster hadoop cluster MySQL memcached memcached web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  26. 26. File Store Cluster hadoop cluster MySQL memcached memcached web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  27. 27. File Store Cluster hadoop cluster MySQL memcached memcached web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  28. 28. File Store Cluster hadoop cluster MySQL memcached DB memcached web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  29. 29. File Store Cluster hadoop cluster MySQL memcached memcached web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  30. 30. File Store Cluster hadoop cluster MySQL memcached memcached swf web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  31. 31. File Store Cluster hadoop cluster MySQL memcached memcached web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  32. 32. File Store Cluster hadoop cluster MySQL memcached memcached web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  33. 33. File Store Cluster hadoop cluster MySQL memcached memcached web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  34. 34. File Store Cluster hadoop cluster MySQL memcached memcached web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  35. 35. File Store Cluster hadoop cluster MySQL memcached memcached web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  36. 36. File Store Cluster hadoop cluster MySQL memcached memcached web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  37. 37. File Store Cluster hadoop cluster MySQL memcached memcached web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  38. 38. File Store Cluster hadoop cluster MySQL memcached memcached web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  39. 39. File Store Cluster hadoop cluster MySQL memcached memcached web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  40. 40. File Store Cluster hadoop cluster MySQL memcached memcached web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  41. 41. File Store Cluster hadoop cluster MySQL memcached memcached web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  42. 42. File Store Cluster hadoop cluster MySQL memcached memcached web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  43. 43. File Store Cluster hadoop cluster MySQL memcached memcached web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  44. 44. File Store Cluster hadoop cluster MySQL memcached memcached web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  45. 45. File Store Cluster hadoop cluster MySQL memcached memcached web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  46. 46. File Store Cluster hadoop cluster MySQL memcached memcached web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  47. 47. File Store Cluster hadoop cluster MySQL memcached memcached web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  48. 48. File Store Cluster hadoop cluster MySQL memcached memcached web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  49. 49. File Store Cluster hadoop cluster MySQL memcached memcached web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  50. 50. 2011 5 16
  51. 51. 2011 5 16
  52. 52. ActionScript3 +2011 5 16
  53. 53. ActionScript3 + Dynamic Module Loading Dependency Injection (LinkedList )2011 5 16
  54. 54. profile.swf core.swc room.swf main.swf main.swf casino.swf fishing.swf shop.swf2011 5 16
  55. 55. profile.swf core.swc room.swf main.swf main.swf casino.swf fishing.swf shop.swf swf2011 5 16
  56. 56. (socket)2011 5 16
  57. 57. (socket) Java +2011 5 16
  58. 58. (socket) Java + IO2011 5 16
  59. 59. server client <interface> <interface> Command Command AS3 python2011 5 16
  60. 60. 2011 5 16
  61. 61. IndexPersister(Java) + MySQL2011 5 16
  62. 62. IndexPersister(Java) + MySQL MySQL MySQL KeyValue2011 5 16
  63. 63. IndexPersister @Persistable("address") public class Address { private int userId; private String name;; private byte enable; @IndexKey @Store(index=0) public int getUserId() { return userId; } @Store(index=1) public String getName() { return name; } @Store(index=2) public byte getEnable() { return status; }2011 5 16
  64. 64. IndexPersister @Persistable("address") public class Address { private int userId; private String name;; private byte enable; @IndexKey @Store(index=0) public int getUserId() { return userId; } @Store(index=1) public String getName() { return name; } @Store(index=2) public byte getEnable() { return status; } Key : Value userId : userId + name + enable2011 5 16
  65. 65. IndexPersister @Persistable("address") public class Address { private int userId; private String name;; private byte enable; @IndexKey @Store(index=0) public int getUserId() { return userId; } @Store(index=1) public String getName() { return name; } @Store(index=2) public byte getEnable() { return status; } Key : Value userId : userId + name + enable2011 5 16
  66. 66. IndexPersister @Persistable("address") public class Address { private int userId; private String name;; private byte enable; @IndexKey @Store(index=0) public int getUserId() { return userId; } @Store(index=1) public String getName() { return name; } @Store(index=2) public byte getEnable() { return status; } Key : Value userId : userId + name + enable2011 5 16
  67. 67. IndexPersister @Persistable("address") public class Address { private int userId; private String name;; private byte enable; @IndexKey @Store(index=0) public int getUserId() { return userId; } @Store(index=1) public String getName() { return name; } @Store(index=2) public byte getEnable() { return status; } Key : Value userId : userId + name + enable2011 5 16
  68. 68. IndexPersister @Persistable("address") public class Address { private int userId; private String name;; private byte enable; @IndexKey @Store(index=0) public int getUserId() { return userId; } @Store(index=1) public String getName() { return name; } @Store(index=2) public byte getEnable() { return status; } Key : Value userId : userId + name + enable2011 5 16
  69. 69. IndexPersister2011 5 16
  70. 70. IndexPersister2011 5 16
  71. 71. IndexPersister2011 5 16
  72. 72. IndexPersister2011 5 16
  73. 73. IndexPersister2011 5 16
  74. 74. IndexPersister2011 5 16
  75. 75. IndexPersister2011 5 16
  76. 76. IndexPersister NDI byte[] : byte[] persister MySQL varbinary : longblob indexPersister persister Application Interface MongoDB persister OK2011 5 16
  77. 77. MySQL Key Value `key` varbinary(255) NOT NULL `value` longblob NOT NULL2011 5 16
  78. 78. MySQL Key Value `key` varbinary(255) NOT NULL `value` longblob NOT NULL Ameba MySQL • MySQL I/O I/O Accerarator(FusionIO)2011 5 16
  79. 79. • • • • • •2011 5 16
  80. 80. Flash2011 5 16
  81. 81. Flash2011 5 16
  82. 82. 2011 5 16
  83. 83. File Store Cluster hadoop cluster MySQL memcached memcached web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  84. 84. File Store Cluster hadoop cluster MySQL memcached memcached web-app server info-socket-server chat-socket-server game-socket-server 10 Flash(ActionScript3)2011 5 16
  85. 85. File Store Cluster hadoop cluster MySQL memcached memcached web-app server info-socket-server chat-socket-server game-socket-server 10 2.2Gbps Flash(ActionScript3)2011 5 16
  86. 86. File Store Cluster hadoop cluster MySQL memcached memcached (Query Per Second) 14 QPS 30 QPS web-app server info-socket-server chat-socket-server game-socket-server 10 2.2Gbps Flash(ActionScript3)2011 5 16
  87. 87. 2011 5 16
  88. 88. 2011 5 16
  89. 89. CPU2011 5 16
  90. 90. CPU2011 5 16
  91. 91. CPU2011 5 16
  92. 92. CPU2011 5 16
  93. 93. 2011 5 16
  94. 94. 2011 5 16
  95. 95. 2011 5 16
  96. 96. 2011 5 16
  97. 97. 2011 5 16
  98. 98. 2011 5 16
  99. 99. 2011 5 16
  100. 100. • • • • etc...2011 5 16
  101. 101. • 100• 3GB/day • • etc...2011 5 16
  102. 102. 2011 5 16
  103. 103. hadoop cluster File Store Cluster MySQL web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  104. 104. hadoop cluster File Store Cluster MySQL web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  105. 105. hadoop cluster File Store Cluster MySQL KVS web-app server info-socket-server chat-socket-server game-socket-server Flash(ActionScript3)2011 5 16
  106. 106. KVS Namura Distributed Index(NDI) 2008 KVS2011 5 16
  107. 107. KVS Namura Distributed Index(NDI) 2008 KVS range search by key auto sharding auto failover on memory2011 5 16
  108. 108. KVS Namura Distributed Index(NDI) 2008 KVS range search by key auto sharding auto failover on memory 200 •2011 5 16
  109. 109. NDI MySQL 200 MySQL × 42011 5 16
  110. 110. NDI MySQL 200 MySQL × 4 MySQL I/O2011 5 16
  111. 111. FusionIO NAND SSD(I/O Accerarator) Read HD 5 Write HD 7 82011 5 16
  112. 112. Fusion-io2011 5 16
  113. 113. SAS RAID5 FusionIO2011 5 16
  114. 114. MySQL QPS CPU Load Average Traffic2011 5 16
  115. 115. MySQL QPS CPU Load Average Traffic2011 5 16
  116. 116. 2011 5 16
  117. 117. • • •2011 5 16
  118. 118. • • • ※2011 5 16
  119. 119. AmebaPigg2011 5 16
  120. 120. 2011 5 16
  121. 121. 2011 5 16
  122. 122. 2011 5 16
  123. 123. 2011 5 16
  124. 124. 2011 5 16
  125. 125. 2011 5 16

×