Page 1
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Chris TaylorDirector, Customer Experience Architecture
Andrew Baird
Solutions Architect, AWS
December 1, 2016
6 Million Registrations in 30 Days
How Chick-fil-A One Scaled on AWS
Page 2
What to Expect from the Session
• Scaling your mobile app with Amazon DynamoDB
• Chick-fil-A One business context
• API tier high-level design overview
• Lessons learned in building and launching
• A peek into plans for the future
Page 3
What is DynamoDB?
Non-Relational Managed
NoSQL Database Service
Page 4
Mobile Dev
+
DynamoDB
4ever
Page 6
Scale what matters
• Only provision and pay for the capacity you require
• Scaling events are exciting, not terrifying
Team Members Dedicated to NoSQL Infrastructure
Pre-App Launch 0
At Scale 0
Page 7
Dead simple, robust depth
Dead Simple
• GetItem(primaryKey)
• PutItem(item)
Robust Depth
• Fine-Grained Access Control
• Streams
• Triggers
• Cross-Region Replication
• DynamoDB local
• Free-text search
• Titan Graph Database integration
• Strong consistency option
• Atomic counters
Page 8
Fine-Grained Access Control
• Use AWS Identity and Access Management Policies for
record and attribute level control
Restrict a mobile device to
only user-specific items
Restrict some clients
from specific attributes
Page 9
Stream of updates to a table
Asynchronous
Exactly once
Strictly ordered
• Per item
Highly durable
• Scale with table
24-hour lifetime
Subsecond latency
DynamoDB Streams
Page 10
Performance where it counts
• Low single-digit millisecond latency
• No limit to table throughput
Page 11
How do high-scale mobile apps
leverage DynamoDB?
Page 12
Leveraging DynamoDB for massive scale apps
User Data Session/App State Transaction Metadata Index for Objects in S3
Page 14
• 2000+ locations
• 43 states
• $6B 2015 revenue
• 48 years positive sales
growth
Page 15
• If you know someone’s story, you
can care for them personally
• Mission: make every digital
interaction with the brand
remarkably convenient in the most
personal way
Page 16
Launch Week: June 1
Page 17
DXE: Digital Experience Engine
• Java
• Spring Boot
• Spring Cloud
• AWS Elastic Beanstalk
• Netflix Zuul - routing
• Netflix Hystrix
• DynamoDB for non-PII
• Microservice Architecture
• Partner API Orchestration
• Custom FunctionalityImage: public domain, credit
https://www.flickr.com/photos/britishlibrary/albums/72157639428882575/with/11230061924/
Page 18
High-Volume Custom Manufacturing
AT PEAK HOUR
1 sandwich every 16 seconds
1 box of nuggets every 25 seconds
1 order of waffle fries every 14 seconds
1 car through the drive thru every 22 seconds
267 total transactions
Page 19
High-Volume Custom Manufacturing
Page 21
Not Just the Cloud
Page 22
Defining Microservices
• Functional isolation and separation of concerns, e.g.:
• DXE:Ordering
• DXE:Payment
• DXE:Favorites
• DXE:Survey
• Targeted QA and regression
• Rapid deployment, even under load if necessary
• Choice of implementation language and infrastructure
• Influenced by Twelve-Factor App methodology (12factor.net)
Page 23
Supporting Cast of Services
Page 24
Scale
Pre-launch
• 75 servers
• Mostly t2.small
Peak
• ~225 servers
• Moved to mix of
c4.large and
t2.medium
• All service tiers
upgraded in 30
minutes
Page 25
Cloud-Native vs. Cloud-Clumsy
Watch out for:
• CPU-based licensing
• Per-year vs. per-hour
• Feature bundling
• Admin by UI, not API
Used by permission of http://www.jekyllislandchronicles.com/
Page 26
Getting Ready for Guests
• Load testing crucial
• Test by use case
• Model based on
forecasts
• Engage AWS support
Used by permission of Getty Images
Page 27
Visibil ity is Crucial
Page 28
Lessons Learned
• Use open source, or choose cloud-savvy software partners
• DynamoDB doesn’t auto-scale, but can be made to
• Deployment to the live EB environment has risks, limits
• Blue-green deployment under load outpaces ELB scaling
• Invest in the ability to pilot new features in a granular way
• Visibility of business metrics is crucial
• Splunk App for AWS 4.x is rate-limited by ingestion mechanism
Page 29
What’s Next?
• 6 Million Menus
• A Hundred Different Ordering Interfaces
• How About Delivery?
• Customer in-Restaurant Engagement Through Beacons (IoT)
• Fully Automated Blue-Green Deployment
• Region Failover Design and Testing
• Netflix Eureka for Service Discovery
• Beyond Java and Beyond Servers for API Endpoints
Page 30
Remember to complete
your evaluations!
Page 31
Thank you!
[email protected]