2013 Devsisters Corp.
2
3
4
5
6
7
8
>>> import boto >>> import time >>> s3 = boto.connect_s3() # Create a new bucket. Buckets must have a globally unique name >>> bucket = s3.create_bucket('kgc-demo') # Create a new key/value pair. >>> key = bucket.new_key('mykey') >>> key.set_contents_from_string("hello World!") # Sleep to ensure the data is eventually there. >>> time.sleep(2) # Retrieve the contents of ``mykey``. >>> print key.get_contents_as_string() 'Hello World!' # $ curl http://kgc-demo.s3.amazonaws.com/mykey # Hello World! 9
10
11
12
Internet Log archives Patches & Game Data S3 Buckets Mobile Game user Availability Zone-1 Availability Zone-2 Chef & Git Conf. Management Game & Server Monitoring Front-end game service ELB Auto-scaling group EC2 EC2 EC2 EC2 Database group RDS (MySQL) CloudFormation CloudWatch 13
14
90,000 67,500 45,000 22,500 0 9:00 24:00 15
1,500,000 1,125,000 750,000 375,000 0 4/1 4/2 4/3 4/4 4/5 4/6 4/7 16
Internet Log archives Patches & Game Data S3 Buckets Mobile Game user Availability Zone-1 Availability Zone-2 Apple / Google Push Service EC2 Game & Server Monitoring EC2 Front-end game service Auto-scaling group EC2 ELB EC2 1.mod_jk pooling failure 2.mod_proxy failure 3.Tomcat JVM OOM 4.Spring MySQL connection pooling 5.GCM push server timeout 6.etc... Chef & Git Conf. Management Database group EC2 RDS (MySQL) CloudFormation 1.Master instance failure 2.Slave instance failure 3.Parameter problems (trx,...) 4.Performance problems CloudWatch 17
18
19
20
@Timed(timingNotes = "") public void earncoin(int memberseq, int amount, String fromwhere) statsdclient.increment("stat.after_play_earned_coin", earnedcoin); 21
22
23
24
CloudFront Edge Internet Log archives Patches & Game Data S3 Buckets CloudFront Download Distribution Mobile Game user Availability Zone-1 Availability Zone-2 Apple / Google Push Service Log Search (realtime) Front-end game service ELB Auto-scaling group EC2 EC2 EC2 EC2 Chef & Git Conf. Management Game & Server Monitoring Database group RDS CloudFormation EC2 EC2 Couchbase Cluster EC2 redis instance CloudWatch M S 25
26 # instances vs. CPU utilization
27
28
29
30
31
32
33
34
35