4. BACKGROUND-CLOUD
WHY PUBLIC CLOUD?
Cost savings Scalabilty Flexibility Training
Pay only for operational
costs vs ownership
costs
Rapid expansion
local & global
Change hardware
configurations
Set up lab instantly
Pay only for usage vs
over provisioning
Disaster recovery
Adapt hardware to
baseline dynamically
Try new features
5. BACKGROUND-CLOUD
CLOUD USAGE MODEL - HYBRID CLOUDS
AWS
Google
Azure
IBM
VMware
Fujitsu
SunGard
Rackspace
ATT Verizon
Quest
Unisys
your own servers
CSC
Hyperscale Cloud ProvidersNormal Cloud Providers
Public Cloud
Private Cloud
6. BACKGROUND-CLOUD
CLOUD USAGE MODEL - HYBRID CLOUDS
AWS
Google
Azure
IBM
VMware
Fujitsu
SunGard
Rackspace
ATT Verizon
Quest
Unisys
your own servers
CSC
Hyperscale Cloud ProvidersNormal Cloud Providers
Public Cloud
Private Cloud
2009
2%
98%
7. BACKGROUND-CLOUD
CLOUD USAGE MODEL - HYBRID CLOUDS
AWS
Google
Azure
IBM
VMware
Fujitsu
SunGard
Rackspace
ATT Verizon
Quest
Unisys
your own servers
CSC
Hyperscale Cloud ProvidersNormal Cloud Providers
Public Cloud
Private Cloud
2014
6%
94%
8. BACKGROUND-CLOUD
CLOUD USAGE MODEL - HYBRID CLOUDS
AWS
Google
Azure
IBM
VMware
Fujitsu
SunGard
Rackspace
ATT Verizon
Quest
Unisys
your own servers
CSC
Hyperscale Cloud ProvidersNormal Cloud Providers
Public Cloud
Private Cloud
2099?
~90%
~10%
9. BACKGROUND-CLOUD
DEVELOPER’S ROLE IN CLOUD
▸ Sounds like IT Pros’ problems rather than developers’? No
▸ Costs / Security / Integration / …
▸ Developer one of main target users
▸ Code applications aware of infrastructure (Assume infrastructure can fail e.g. Netflix)
▸ Host dev env / Deploy web app / Leverage cloud database…
22. AWS GLOBAL INFRASTRUCTURE
11 Regions & 30 Availability Zones - December 2015
5 More Regions & 10 More Availability Zones
23. A DETAILED EXAMPLE
REGIONS AND ZONES
▸ Region: a geographical area
▸ Availability Zone: a data center
▸ Different regions may have different services/prices
25. A DETAILED EXAMPLE
AWS COMPUTE SERVICES
▸ EC2
▸ Auto Scaling
▸ Lambda
▸ EC2 Container Service (for integration with docker)
▸ EMR (Amazon’s Hadoop implementation)
26. A DETAILED EXAMPLE
ELASTIC COMPUTER CLOUD ( EC2 )
▸ Def: Instance provisioning and shutting down service
▸ AMI def: Amazon Machine Image, virtual disk template (OVA, OVF)
▸ AMI instance types: (Support Windows / Linux)
▸ AMI pricing types:
Micro
instances
General
purpose
Compute
optimized
GPU
instances
Memory
optimized
Storage
optimized
On-demand
Instances
Reserved Instances Spot Instances
27. A DETAILED EXAMPLE
AUTO SCALING
▸ Def: expand or shrink EC2 instances on demand
▸ Triggers: Manual schedule or integrated with monitoring
load balancer
dns
28. A DETAILED EXAMPLE
AUTO SCALING
▸ Def: expand or shrink EC2 instances on demand
▸ Triggers: Manual schedule or integrated with monitoring (CloudWatch)
load balancer
dns
29. A DETAILED EXAMPLE
LAMBDA
▸ Def: Event-Driven compute service
▸ Does not require an instance, simplifying response to events
▸ Type of events: (Any API call or resource transition)
▸ Put objects in S3
▸ Transition in an EC2 instance
▸ Write to a database table
▸ Use cases:
▸ Generate thumbnail images as arriving in S3
▸ …
32. A DETAILED EXAMPLE
STORAGE SERVICES
▸ Ephemeral storage
▸ EBS
▸ S3 ( simple storage service)
▸ Glacier
▸ CloudFront
} Block Storage
Access through OS at device level
} Object Storage
Access through HTTP at user level
} Specialized purpose storage
33. A DETAILED EXAMPLE
Definition Durability Accessibility IOPS Snapshot
Storage coming
with EC2 instance
Just C drive
coming with PC
lost once instance
terminated
(not reboot)
Locked to one
instance
No performance
guarantee
Support with
instance
Elastic block
storage
Just like external
disk for PC
persist until
deleted
independently
Can attached to
multiple instances
one at a time
SLA
Support
independently
BLOCK STORAGE
34. A DETAILED EXAMPLE
SIMPLE STORAGE SERVICE (S3)
▸ History: First service by AWS
▸ Def: An storage bucket for objects
▸ Size: Unlimited bucket size, Up to 5TB object size
▸ Accessibility: HTTP/HTTPS
▸ Not: a file system (vs Dropbox)
35. A DETAILED EXAMPLE
SIMPLE STORAGE SERVICE (S3)
▸ Types:
▸ Standard storage:
▸ 99.999,999,999% durability
▸ $0.03 per GB / month
▸ Use cases: Master storage
▸ Reduced redundancy storage:
▸ 99.99% durability
▸ $0.024 per GB / month
▸ Use cases: Slave storage
36. A DETAILED EXAMPLE
GLACIER
▸ Price: Very cheap, $0.007 per GB / month (Region: Virginia)
▸ Usage: Ideal for backup
▸ Retrieval time: Very, very slow (4-6 hours)
37. A DETAILED EXAMPLE
CLOUDFRONT
▸ Definition: Global content delivery network service
▸ Infrastructure behind: Edge locations (CDN endpoints for CloudFront)
▸ Number: Over 50 Edge Locations, many more than regions
Blue: edge locations
Yellow: regions
41. A DETAILED EXAMPLE
RDS
▸ Def: Provision database instances
▸ Engines:
▸ Storage options:
MySQL PostgreSQL Oracle
Microsoft SQL
Server
Amazon
Aurora
Storage Size IOPS Price
General purpose SSD 5GB — 3TB 3 IOPS per GB storage only
Elastic block storage 100GB — 3TB 1,000 ~ 30,000 IOPS per GB storage + IOPS
Magnetic storage 5GB — 3TB ~100 IOPS per GB Storage + I/O rate
42. A DETAILED EXAMPLE
RDS
▸ Hardware acquisition and upkeep (spacing, cooling)
▸ OS configuration and maintenance
▸ Database installation
▸ Database configuration
▸ Database patch
▸ Database backup
▸ Database scaling (give you powerful tools)
What aspects are managed?
What are left over?
▸ Design schema
▸ Optimizing
▸ Scaling (with baked-in powerful tools)
43. A DETAILED EXAMPLE
RDS — SCALE UP
▸ Increase storage amount
▸ Increase storage type (SSD, Magnetic, ..)
▸ Change instance class (CPU, RAM)
44. A DETAILED EXAMPLE
RDS — SCALE OUT
▸ Read replica: DB replica for read access
▸ Use case: read-intensive applications / source for reports or analytics
▸ Can add additional indexes
▸ At least be same size as source DB instance
▸ Multi-AZ deployment: Synchronous standby (not eventually) in different AZ
▸ Use cases: Reduce latency during maintenance, automatic failover
45. A DETAILED EXAMPLE
DYNAMODB
▸ Key-based noSQL DB
▸ When creating table, just need define primary keys, not schema
▸ Additional replica (happens behind scenes)
▸ Scaling up / out (happens behind scenes)
46. A DETAILED EXAMPLE
ELASTICACHE
▸ Def: Cluster tied to single AZ,Distributed in-memory cache service
▸ Implemented based on Memcached
▸ Managed (Automatically fix failure nodes)
▸ Scale out (Add/Remove nodes)
54. A DETAILED EXAMPLE
ELASTIC LOAD BALANCE
▸ Usage: Distribute traffic across EC2 instances in one AZ, or multiple
▸ Distributed and fault tolerant built in
55. A DETAILED EXAMPLE
ROUTE 53
▸ Def: DNS web service from AWS
▸ Usage: Map names to IP addresses / Load balancing between regions
▸ Not a domain registrar
▸ Routing targets: Route to CloudFront / ELB / websites running in S3
59. A DETAILED EXAMPLE
SIMPLE QUEUE SERVICE (SQS)
▸ Def: Highly available, scalable queue storage
▸ Usage:flow control / buffer / decoupling apps
▸ Size: Queue unlimited in queue size, single message up to 256 kb in size
▸ Costs: $0.50 / million SQS requests
60. A DETAILED EXAMPLE
SIMPLE NOTIFICATION SERVICE (SNS)
▸ Def: High available, scalable message broadcasting service
▸ Subscript to a topic, subscribers notified by HTTP/HTTPS/SMTP/SMS/SQS
when new messages are available
▸ Usage: time-sensitive info updates, mobile app updates
65. A DETAILED EXAMPLE
INSTANCE SECURITY
▸ Subnet layer - NACL (like firewalls for subnets)
▸ Instance layer - Security group (like firewall for instances)
71. A DETAILED EXAMPLE
CLOUDFORMATION / BEANSTALK
▸ Def: Automate stack of AWS resource provisioning / deleting
▸ Comparison: Similar purpose. Later one more for developers (Infrastructure as code in
different sdks)
74. SUMMARY
▸ Many cloud services are high scalable by default (S3, ELB,
SQS, …). Some is ready for high scalability, but needs a
little more work (RDS, EC2)
▸ AWS supports accessing service via GUI, SDK, Native APIs
▸ Utilizing AWS cloud in developing