Top Banner
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Chris Taylor Director, 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
31

AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil-A One App Scaled with AWS (DAT313)

Jan 06, 2017

Download

Technology

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil-A One App Scaled with AWS (DAT313)

© 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: AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil-A One App Scaled with AWS (DAT313)

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: AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil-A One App Scaled with AWS (DAT313)

What is DynamoDB?

Non-Relational Managed

NoSQL Database Service

Page 4: AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil-A One App Scaled with AWS (DAT313)

Mobile Dev

+

DynamoDB

4ever

Page 5: AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil-A One App Scaled with AWS (DAT313)

But why?

Page 6: AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil-A One App Scaled with AWS (DAT313)

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: AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil-A One App Scaled with AWS (DAT313)

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: AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil-A One App Scaled with AWS (DAT313)

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: AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil-A One App Scaled with AWS (DAT313)

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: AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil-A One App Scaled with AWS (DAT313)

Performance where it counts

• Low single-digit millisecond latency

• No limit to table throughput

Page 11: AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil-A One App Scaled with AWS (DAT313)

How do high-scale mobile apps

leverage DynamoDB?

Page 12: AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil-A One App Scaled with AWS (DAT313)

Leveraging DynamoDB for massive scale apps

User Data Session/App State Transaction Metadata Index for Objects in S3

Page 13: AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil-A One App Scaled with AWS (DAT313)
Page 14: AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil-A One App Scaled with AWS (DAT313)

• 2000+ locations

• 43 states

• $6B 2015 revenue

• 48 years positive sales

growth

Page 15: AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil-A One App Scaled with AWS (DAT313)

• 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: AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil-A One App Scaled with AWS (DAT313)

Launch Week: June 1

Page 17: AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil-A One App Scaled with AWS (DAT313)

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: AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil-A One App Scaled with AWS (DAT313)

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: AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil-A One App Scaled with AWS (DAT313)

High-Volume Custom Manufacturing

Page 20: AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil-A One App Scaled with AWS (DAT313)

Topology Diagram

Page 21: AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil-A One App Scaled with AWS (DAT313)

Not Just the Cloud

Page 22: AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil-A One App Scaled with AWS (DAT313)

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: AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil-A One App Scaled with AWS (DAT313)

Supporting Cast of Services

Page 24: AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil-A One App Scaled with AWS (DAT313)

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: AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil-A One App Scaled with AWS (DAT313)

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: AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil-A One App Scaled with AWS (DAT313)

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: AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil-A One App Scaled with AWS (DAT313)

Visibil ity is Crucial

Page 28: AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil-A One App Scaled with AWS (DAT313)

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: AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil-A One App Scaled with AWS (DAT313)

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: AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil-A One App Scaled with AWS (DAT313)

Remember to complete

your evaluations!