8. The “Must” from Day 1
• High quality code
• Version controlled
• CI/CD pipeline
• Infrastructure as code
• Security at every layer
• Cost conscious
• Test everything
• DR procedure
Operational Excellence
13. Amazon Route53
• Traffic Flow
• Latency Based Routing
• Geo DNS
• Private DNS for Amazon VPC
• DNS Failover
• Health Checks and Monitoring
• Domain Registration
• CloudFront Zone Apex Support
• S3 Zone Apex Support
• Weighted Round Robin
Highly available and scalable DNS web service.
25. Why start with SQL?
• Easy to change your data access needs
• Established and well-worn technology.
• Lots of existing code, communities, books, and tools.
• You aren’t going to break SQL DBs in your first 10 million
users. No, really, you won’t.*
• Clear patterns to scalability.
*Unless you are doing something SUPER peculiar with the data or you have MASSIVE amounts of it.
…but even then SQL will have a place in your stack.
26. Why you might need NoSQL?
• Super low-latency applications
• Metadata-driven datasets
• Highly nonrelational data
• Need schema-less data constructs*
• Rapid ingest of data (thousands of records/sec)
• Massive amounts of data (again, in the TB range)
*Need!= “It’s easier to do dev without schemas”
33. Web
Instance
RDS DB Instance
Active (Multi-AZ)
Availability Zone Availability Zone
Web
Instance
RDS DB Instance
Standby (Multi-AZ)
Load
balancer
App 0.4
Available & redundant application
User
Amazon
Route 53
Amazon
CloudFront
Amazon S3
35. Amazon Elasticache
• Redis and Memcached Compatible
• Fully Managed
• Easily Scalable
• Transient session data
• Shared state
• High-frequency counters
• Queues
• Leaderboards
• Pub/Sub
• Lists, sets, …
In-memory data store and cache
36. Amazon
ElastiCache
RDS DB Instance
Active (Multi-AZ)
Availability Zone Availability Zone
RDS DB Instance
Standby (Multi-AZ)
ELB
User
Amazon
Route 53
Amazon
CloudFront
Amazon S3
App 0.5
Stateless application
Web
Instance
Web
Instance
39. Auto Scaling
• Maintain your Amazon EC2 instance availability
• Automatically Scale Up and Down your EC2 Fleet
• Scale based on CPU, Memory or Custom metrics
40. RDS DB Instance
Active (Multi-AZ)
Availability Zone Availability Zone
RDS DB Instance
Standby (Multi-AZ)
ELB
App 0.6
Auto scaling groups
User
Amazon
Route 53
Amazon
CloudFront
Amazon S3
Web
Instances
Web
Instances ElastiCache
Auto-Scaling group
55. How Lambda works
S3 event
notifications
DynamoDB
Streams
Kinesis
events
Cognito
events
SNS
events
Custom
events
CloudTrail
events
LambdaDynamoDB
Kinesis S3
Any custom
Invoked in response to events
- Changes in data
- Changes in state
Redshift
SNS
Access any service,
including your own
Such as…
Lambda functions
CloudWatch
events
56. Event-driven using Lambda
AWS Lambda:
Resize Images
Users upload photos
S3:
Source Bucket
S3:
Destination Bucket
Triggered on
PUTs
80. 2010: Scaling issues
No more space
Software quality and quantity improved
Shared hosting could not extend
Server room under kitchen has not enough power
Next step: buy rack in data centre
87. 2013: Scaling issues
Losing control
50+ servers in data centre
Operations team managing infrastructure
Manually created, undocumented and inconsistent configuration
Next step: configuration management
94. 2015: Scaling issues
Ops team bottleneck
75+ servers in configuration management
Time to deliver under stress
Lot of teams dependent on ops team
Next step: use the force!
99. Scaling for Christmas 2016
Find appropriate hardware
Get offers and approval
Buy hardware
Install hardware
Install and configure software
1 day
2 months
Ordering new hardware
100. 2016: Scaling issues
Peak scaling
Easy to roll out new systems
Complex infrastructure environment
Big difference in peak and low usage
Next step: go to the cloud