Mais conteúdo relacionado Semelhante a Scaling Up To and Beyond 10M Users (20) Mais de Amazon Web Services (20) Scaling Up To and Beyond 10M Users1. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Giorgio Bonfiglio (bonfigg@amazon.com)
Sr. TAM - Enterprise Support - AWS
Scaling up to 10M users… and beyond!
(how to be ready in case your application gets as
successful as you were hoping)
Thursday, Sept 20th 2018
2. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
3. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
4. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Now that’s a lot
of things to read!
This is NOT
where we
want to start!
5. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
It’s not the single thing that
fixes everything.
6. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
What do we need first?
7. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Some basics…
8. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
AWS Global Infrastructure
Region (# of Zones)
Coming Soon!
9. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
AWS Global Infrastructure
Region (# of Zones)
Coming Soon!
125+ Edge
Locations
10. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
ENTERPRISE
APPS
DEVELOPMENT & OPERATIONSMOBILE SERVICESAPP SERVICESANALYTICS
Data
Warehousin
g
Hadoop
/Spark
Streaming
Data Collection
Machine
Learning
Elastic
Search
Virtual
Desktops
Sharing &
Collaboratio
n
Corporate
Email
Backup
Queuing &
Notification
s
Workflo
w
Search
Email
Transcoding
One-click
App
Deployment
Identity
Sync
Single
Integrated
Console
Push
Notification
s
DevOps Resource
Management
Application
Lifecycle
Management
Containers
Triggers
Resource
Templates
TECHNICAL &
BUSINESS
SUPPORT
Account
Managemen
t
Support
Professional
Services
Training &
Certificatio
n
Security
& Pricing
Reports
Partner
Ecosystem
Solutions
Architects
MARKETPLACE
Business
Apps
Business
Intelligenc
e
Databases
DevOps
Tools
Networkin
g
Securit
y
Storage
Regions
Availability
Zones
Points of
Presence
INFRASTRUCTURE
CORE SERVICES
Compute
VMs, Auto-scaling,
& Load Balancing
Storage
Object, Blocks,
Archival,
Import/Export
Databases
Relational, NoSQL,
Caching, Migration
Networkin
g
VPC, DX, DNS
CDN
Access
Control
Identity
Management
Key
Management
& Storage
Monitoring
& Logs
Assessment
and reporting
Resource &
Usage Auditing
SECURITY & COMPLIANCE
Configuration
Compliance
Web
application
firewall
HYBRID
ARCHITECTURE
Data Backups
Integrated
App
Deployments
Direct
Connect
Identity
Federation
Integrated
Resource
Management
Integrated
Networkin
g
API
Gateway
IoT
Rules
Engine
Device
Shadows
Device
SDKs
Registry
Device
Gateway
Streaming
Data Analysis
Business
Intelligence
Mobile
Analytics
Most Robust, Fully-Featured Technology Infrastructure Platform
11. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
AWS building blocks
Inherently highly scalable, available and
fault-tolerant services
Highly scalable,
available with the right
architecture
a Amazon CloudFront
a Amazon Route 53
a Amazon S3
a Amazon DynamoDB
a Elastic Load Balancing
a Amazon EFS
a AWS Lambda
a Amazon SQS
a Amazon SNS
a Amazon SES
a AWS Step Functions
a …
4 Amazon EC2
4 Amazon EBS
4 Amazon RDS
4 Amazon VPC
12. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Considerations
Rex Boggs
https://creativecommons.org/licenses/by-nd/2.0/
13. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
“Many decisions are
reversible, two-way
doors.”
-- Jeff Bezos
14. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Build Measure
Learn
15. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
So let’s start from…
16. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
You
17. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
1 User
Amazon
EC2
instance
Elastic IP
User
Amazon
Route 53
18. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Lightsail: the easiest way to get started on AWS
• Choose from five plans that include bundled
compute, storage, and networking
• Benefit from a low, predictable price
• Spin up a fully configured server in seconds
• Manage from the intuitive Lightsail console
• Scale with access to AWS services
• Automate with Lightsail API & CLI
19. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
“We’re gonna need a bigger box”
• Simplest approach
• High I/O instances
• High memory instances
• High CPU instances
• High storage instances
• Easy to change instance sizes
• Will hit an endpoint eventually
c4.8xlarge
m4.2xlarge
t2.micro
20. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
“We’re gonna need a bigger box”
• Simplest approach
• High I/O instances
• High memory instances
• High CPU instances
• High storage instances
• Easy to change instance sizes
• Will hit an endpoint eventually
c4.8xlarge
m4.2xlarge
t2.micro
21. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
1 User
• No failover
• No redundancy
• Too many eggs in one
basket
EC2
Instance
Elastic IP
User
Amazon
Route 53
22. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Users >1
23. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Users > 1
Web
Instance
Database
Instance
Elastic IP
User
Amazon
Route 53
24. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Self-managed Fully managed
Amazon EC2 Amazon
DynamoDB
Amazon RDS Amazon
Redshift
Database options
25. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
• MySQL or Postgres compatible
• Automatic storage scaling (up to 64 TB)
• Up to 15 read-replicas
• Continuous backups to Amazon S3
• 6-way replication across 3 zones
• Comes into a serverless flavor!
• (available soon: Multi-Master)
Amazon Aurora
26. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
To NoSQL, or not to NoSQL?
27. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Start with SQL databases
28. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Why start with SQL?
• Established and well-worn technology
• Lots of existing code, communities, books, and tools
• You aren’t going to break SQL DBs in your first millions
of users
• No, really, you won’t*
• Clear scalability patterns
*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.
29. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
AH HA! You said
“massive
amounts”
30. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Why might you need NoSQL?
• > 5TB data in first year
• Super low-latency applications
• Metadata-driven datasets
• Highly non-relational data
• Need schema-less data constructs*
• Rapid ingest of data (thousands of records/sec)
• Massive amounts of data (in the TB range)
*Need != “It’s easier to do dev without schemas”
31. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Users >100
32. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Users >100
Web
instance
Elastic IP
Amazon
RDS DB
instance
User
Amazon
Route 53
33. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Users >1000
34. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Users >1000
Web
Instance
Amazon RDS DB Instance
Active (Multi-AZ)
Availability Zone Availability Zone
Web
Instance
Amazon RDS DB Instance
Standby (Multi-AZ)
Load
balancer
User
Amazon
Route 53
35. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Load Balancers
Classic Load BalancerApplication Load Balancer Network Load Balancer
36. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Application Load Balancer
• Highly available
• Health checks
• Session stickiness
• Monitoring / logging
• Content-based routing
• Container-based apps
• WebSockets
• HTTP/2
Recommended
37. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Network Load Balancer
• Layer 4
• Elastic / Static IP
• Preserve source
• Extreme performance
• Ultra-low latency
• Volatile workloads
38. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
horizontally
vertically
39. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Users >100,000
40. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Users >100,000s
Amazon RDS DB
Instance
Active (Multi-AZ)
Availability Zone Availability Zone
Amazon RDS DB
Instance Standby
(Multi-AZ)
Amazon RDS DB
Instance Read
Replica
Amazon RDS DB
Instance Read
Replica
Amazon RDS DB
Instance Read
Replica
Amazon RDS DB
Instance Read
Replica
Web
Instance
Web
Instance
Web
Instance
Web
Instance
Web
Instance
Web
Instance
Web
Instance
Web
Instance
Amazon
Route 53 User
41. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Amazon RDS DB Instance
Active (Multi-AZ)
Availability Zone
Load
balancer
Amazon S3
Amazon
CloudFront
Amazon
Route 53
User
Shift some load around
Web Instances
Availability Zone
Web Instances
Amazon RDS DB Instance
Standby (Multi-AZ)
42. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
• Object-based storage
• Highly durable
• Great for static assets
• “Infinitely scalable”
• Objects up to 5 TB in size
• Encryption at rest and in
transit
Amazon Simple Storage Service (S3)
43. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
• Cache content for faster
delivery
• Lower load on origin
• Dynamic and static content
• Streaming video
• Custom SSL certificates
• Low TTLs (as short as 0
seconds)
Amazon CloudFront
44. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Amazon CloudFront
Response
Time
ServerLoad
Response
Time
Serve
r
Load
Response
Time
Server
Load
No CDN CDN for Static
Content
CDN for Static
& Dynamic
Content
0
10
20
30
40
50
60
70
80
8:00
A
M9:00
A
M
10:00
AM
11:00
AM
12:00
PM1:00
P
M2:00
P
M3:00
P
M4:00
P
M5:00
P
M6:00
P
M7:00
P
M8:00
P
M9:00
P
M
VolumeofData
Delivered(Gbps)
45. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Shift some load around
Amazon RDS DB Instance
Active (Multi-AZ)
Availability Zone
Load
balancer
Amazon S3
Amazon
CloudFront
Amazon
Route 53
User
Web Instances
Amazon
ElastiCache
46. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Amazon ElastiCache
• Managed Memcached or Redis
• Scale from one to many nodes
• Self-healing
• Single digit ms speeds
• Multi-AZ possible with Redis
47. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Shift some load around
Amazon RDS DB Instance
Active (Multi-AZ)
Availability Zone
Load
balancer
Amazon S3
Amazon
CloudFront
Amazon
Route 53
User
Amazon
ElastiCache
Amazon
DynamoDB
Web Instances
48. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Amazon DynamoDB
• Managed NoSQL database
• Provisioned throughput
• Fast, predictable performance
• Fully distributed, fault tolerant
• JSON support
• Items up to 400 KB
• Time-to-live (TTL)
• Streams and Triggers
• Can scale automatically!
49. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Amazon DynamoDB Accelerator
DynamoDB
Your Applications
DynamoDB Accelerator
• Read performance and scale: Microseconds
response times at millions of reads/sec from
single DAX cluster
• Lower costs: Reduce provisioned read capacity
for DynamoDB tables for tables with hot data
50. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Now that our web tier is
much more lightweight,
we can revisit the beginning
of our talk…
51. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Auto Scaling!
52. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
Typical weekly traffic to Amazon.com
53. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
Typical weekly traffic to Amazon.com
Provisioned capacity
54. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
November
November traffic to Amazon.com
55. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Provisioned capacity
November
November traffic to Amazon.com
56. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
November traffic to Amazon.com
76%
24%
November
Provisioned capacity
57. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
November traffic to Amazon.com
November
58. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Auto Scaling
lets you do this!
59. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Automatic resizing of instance fleets
Define min/max pool sizes
CloudWatch metrics drive scaling
On-Demand and/or Spot Instances
aws autoscaling create-auto-scaling-group
--auto-scaling-group-name MyGroup
--launch-configuration-name MyConfig
--min-size 4
--max-size 200
--availability-zones eu-west-2a, eu-west-2b
Auto Scaling
60. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Users > 500,000+
Availability Zone
Amazon
Route 53
User
Amazon S3
Amazon
CloudFront
Availability Zone
Load
balancer
Amazon
DynamoDBAmazon RDS DB
Instance Read
Replica
Web
Instance
Web
Instance
Web
Instance
Amazon
ElastiCache
Amazon RDS DB
Instance Read
Replica
Web
Instance
Web
Instance
Web
Instance
Amazon
ElastiCache
Amazon RDS DB
Instance Standby
(Multi-AZ)
Amazon RDS DB
Instance
Active (Multi-AZ)
61. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Users > 500,000+
Availability Zone
Amazon
Route 53
User
Amazon S3
Amazon
CloudFront
Availability Zone
Load
balancer
Amazon
DynamoDBAmazon RDS DB
Instance Read
Replica
Web
Instance
Web
Instance
Web
Instance
Amazon
ElastiCache
Amazon RDS DB
Instance Read
Replica
Web
Instance
Web
Instance
Web
Instance
Amazon
ElastiCache
Amazon RDS DB
Instance Standby
(Multi-AZ)
Amazon RDS DB
Instance
Active (Multi-AZ)
62. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Use automation
63. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
AWS application management solutions
Convenience Control
Higher-level services Do it yourself
AWS
Elastic Beanstalk
AWS
OpsWorks
AWS
CloudFormation
Amazon EC2
64. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Users >500,000+
• Monitoring, metrics, and logging
• What are customers saying?
• Try to squeeze as much performance
out of each service/component
65. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
AGGREGATE
LEVEL
METRICS
LOG
ANALYSIS
EXTERNAL
SITE PERFORMANCE
HOST
LEVEL
METRICS
66. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
CloudWatch percentiles
67. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
There are further
improvements to be made in
breaking apart our
web/app layer
68. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
The Monolithic Architecture
User Interface
Business Logic
Data Access
69. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
SOA
What does this mean?
70. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
The Service-Oriented Architecture
Presentation Tier Logic Tier
Data Tier
71. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
SOAing
Move services into their own tiers
• Treat them separately
• Scale them independently
It offers flexibility and greater
understanding of each component
72. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Loose coupling + Serverless = winning
DON’T REINVENT THE WHEEL
• Email
• Queuing
• Transcoding
• Search
• Databases
• Monitoring
• Metrics
• Logging
• Compute
Amazon SQSAmazon SNS
Amazon Elastic
Transcoder
AWS Step
Functions
Amazon SESAWS Lambda
Amazon Elastic
Search
Amazon API
Gateway
73. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
• Reliable (Multi-AZ)
• Scalable (unlimited messages)
• Secure (queue authentication)
• Simple (simple APIs)
Application Services – Amazon SQS
Amazon
SQS
messages
Get
message
Instance
Put
message
Instance
Amazon SNS Topic
Publish
notification
Queue is subscribed
to topic
74. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Event Driven Compute – AWS Lambda
• Functions triggered by events
• Node.js, Java, Python, and C#
• Managed
• Implicit scaling
S3 bucket
Lambda
Push: event
notification
DynamoDB
Pull: DynamoDB
Stream
Amazon
Kinesis
Pull:
Amazon Kinesis
stream
75. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Loose coupling sets you free!
The looser they're coupled, the bigger they scale
• Independent components
• Design everything as a black box
• Decouple interactions
• Favor services with built-in redundancy and scalability
• Don’t build your own!
S3 bucket
Lambda
Push: event
notification
DynamoDB
Pull: DynamoDB
Stream
Amazon
Kinesis
Amazon
SQS
messages
Get
message
Instance
Put
message
Instance
Amazon SNS Topic
Publish
notification
Queue is subscribed
to topic
Pull:
Amazon Kinesis
stream
76. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Serverless Web application
Data stored in
Amazon
DynamoDB
Dynamic content
in AWS Lambda
Amazon API
Gateway
Browser
Amazon
CloudFront
Amazon
S3
77. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
The Microservices Architecture
78. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Microservices in AWS
79. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
AWS X-Ray
• Identify performance bottlenecks and errors
• Pinpoint issues to specific service(s) in your
application
• Identify impact of issues on users of the application
• Visualize the service call graph of your application
80. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Visualize service call graph
81. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Users >1,000,000
82. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Users >1 million+
Reaching a million and above is going to require some bit
of all the previous things:
• Multi-AZ
• Elastic Load Balancing between tiers
• Auto Scaling
• Service oriented architecture (SOA)
• Serving content smartly (Amazon S3/CloudFront)
• Caching off DB
• Moving state off tiers that auto scale
83. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Users >1 million+
Amazon RDS DB
Instance
Active (Multi-AZ)
Availability Zone
Amazon RDS DB
Instance Read
Replica
Amazon RDS DB
Instance Read
Replica
Web
Instance
Web
Instance
Web
Instance
Web
Instance
User
Amazon S3
Amazon
DynamoDB
Amazon SQS
ElastiCache
Worker
Instance
Worker
Instance
Amazon
CloudWatch
Internal App
Instance
Internal App
Instance Amazon SES
AWS Lambda
Amazon
Route 53
Amazon
CloudFront
Load
balancer
84. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Users >1 million+
Amazon RDS DB
Instance
Active (Multi-AZ)
Availability Zone
Amazon RDS DB
Instance Read
Replica
Amazon RDS DB
Instance Read
Replica
Web
Instance
Web
Instance
Web
Instance
Web
Instance
User
Amazon S3
Amazon
DynamoDB
Amazon SQS
ElastiCache
Worker
Instance
Worker
Instance
Amazon
CloudWatch
Internal App
Instance
Internal App
Instance Amazon SES
AWS Lambda
Amazon
Route 53
Amazon
CloudFront
Load
balancer
Amazon
DynamoDB
Amazon API
Gateway
85. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
The next big steps
86. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Users >5 million - 10 million
Database Issues?
How can you solve it?
• Federation: splitting into multiple DBs based on function
• Sharding: splitting one dataset up across multiple hosts
• Moving some functionality to other types of DBs (NoSQL, Graph)
87. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Database federation
• Split up databases by function/purpose
• Harder to do cross-function queries
• Essentially delays sharding/NoSQL
• Won’t help with single huge functions/tables
Forums DB
Users DB
Products
DB
88. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Sharded horizontal scaling
• More complex at the application layer
• No practical limit on scalability
• Operation complexity/sophistication
• Shard by function or key space
• RDBMS or NoSQL
User ShardID
002345 A
002346 B
002347 C
002348 B
002349 A
CBA
89. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Shifting functionality to NoSQL
• Similar in a sense to federation
• NoSQL vs. SQL
• Leverage managed services like
DynamoDB
Some use cases:
• Leaderboards/scoring
• Rapid ingest of clickstream/log data
• Temporary data needs (cart data)
• “Hot” tables
• Metadata/lookup tables
DynamoDB
90. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
A quick review
91. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
A quick review
• Multi-AZ your infrastructure
• Make use of self-scaling services: ALB, Amazon S3, AWS
Lambda, Amazon SNS, Amazon SQS, AWS Step Functions,
etc
• Build in redundancy at every level
• Start with SQL. Seriously.
• Cache data both inside and outside your infrastructure
• Use automation tools in your infrastructure
92. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
A quick review continued
• Make sure you have good metrics/monitoring/logging
• Split tiers into individual services (SOA)
• Use Auto Scaling once you’re ready for it
• Don’t reinvent the wheel
• Move to NoSQL if and when it makes sense
93. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
10+ million users!
94. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Time to Go Global!
95. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
User >10 million
• More fine-tuning of your application
• More SOA of features/functionality
• Going from Multi-AZ to multi-region
• Deep analysis of your entire stack
96. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Amazon CloudFront Global Content Delivery Network
136 PoPs (125 Edge Locations + 11 Regional Edge Caches)
97. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Amazon CloudFrontAWS Lambda
Lambda@Edge
Lambda@Edge
98. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Lambda@Edge
Content-based routing
to any origin
Response generation
• Generate custom responses at the
edge
• Read and write access to headers,
query string, and cookies
Network calls
• Origin events
• Viewer events
99. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Transparent global expansion
Region A
customers
Region A
deployment
Region B
customers Region B
deployment
https://saas.example.com
100. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Lambda@Edge
Origin
AWS Location
AWS Location
AWS Location
AWS Location
AWS Location
AWS Location
Compute
Storage
Database
101. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
DynamoDB Global Tables
Fully managed, multimaster, multiregion
database
Build high-performance, globally distributed
applications
Low latency reads & writes to locally available
tables
Disaster proof with multi-region redundancy
Easy to set up, and no application rewrites
required
102. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
To infinity...
103. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Next steps?
READ!
aws.amazon.com/documentation
aws.amazon.com/architecture
aws.amazon.com/solutions
aws.amazon.com/quickstart
START USING AWS:
aws.amazon.com/free
104. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
You’re not alone!
forums.aws.amazon.com
aws.amazon.com/premiumsupport
Your (Technical) Account Manager
A Solutions Architect
105. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Thank you!
Giorgio Bonfiglio – bonfigg@amazon.com