SlideShare una empresa de Scribd logo
1 de 43
BecomingaNimbleGiant:
HowAmazonDynamoDBServesNikeatScale
D A T 3 2 0
Zack Owens
Principal Architect
Nike
Adam Farrell
Lead Software Engineer
Nike
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Nike
Digital
Engineering
AGENDA
SCALINGLAUNCHWITHDYNAMODB
TIMEZONEMIGRATIONTODYNAMODB
NIKE’SJOURNEYTOAMAZONDYNAMODB
ACHIEVEMENTSONDYNAMODB
Nike
Digital
Engineering
Nike
Digital
Engineering
SERVINGATHLETES*
THROUGH
DIGITALEXPERIENCES
* I F Y O U H A V E A B O D Y , Y O U A R E A N A T H L E T E .
Nike
Digital
Engineering
Nike
Digital
Engineering
ARCHITECTURE
MICROSERVICE ARCHITECTURE SERVED FROM AWS
Nike
Digital
Engineering
Nike
Digital
Engineering
PRE-2013
Data center monoliths
Problems scaling
Large deploys
2013
Hybrid cloud
Manual deployments
2015
Cloud native
Automated CI/CD
NIKE’S JOURNEY TO AWS
Nike
Digital
Engineering
CORE PRINCIPLES
RESILIENT
RESPONSIVE
OBSERVABLE
ELASTIC
Nike
Digital
Engineering
Nike
Digital
Engineering
GOING CLOUD NATIVE
MICROSERVICES
USE A
DEDICATED
DATABASE
NO LIFT
AND
SHIFT
CASSANDRA
AND
COUCHBASE
Nike
Digital
Engineering
Nike
Digital
Engineering
PROBLEMS WITH CASSANDRA/COUCHBASE AT SCAL
TRIBAL KNOWLEDGE MAINTENANCE
LARGE CLUSTERS OBSERVABILITY
Nike
Digital
Engineering
Nike
Digital
Engineering
SCALINGLAUNCH
WITHDYNAMODB
Nike
Digital
Engineering
Nike
Digital
Engineering
SNKRS LAUNCH
Nike
Digital
Engineering
Nike
Digital
Engineering
LAUNCH IN THE CLOUD
HIGH
DEMAND
PRODUCT
HIGH
THROUGHPUT
TRAFFIC
Nike
Digital
Engineering
Nike
Digital
Engineering
LAUNCH TRAFFIC PATTERN
Nike.com
06:30 07:00 07:30 08:00 08:30 09:00
SNKRs Launch
Nike
Digital
Engineering
Nike
Digital
Engineering
Nike
Digital
Engineering
LAUNCH TRAFFIC PATTERN
06:30 07:00 07:30 08:00 08:30 09:00
Nike.com SNKRs Launch Cassandra Provisioning
Nike
Digital
Engineering
Nike
Digital
Engineering
Nike
Digital
Engineering
CASSANDRA
COUCHBASE
DYNAMODB
…
Nike
Digital
Engineering
2013-2015 2016+
Nike
Digital
Engineering
Nike
Digital
Engineering
MIGRATION TO DYNAMODB
NEW CAPABILITIES
CONDITIONALANDPARTIALUPDATES
GLOBALSECONDARYINDEXES
FLEXIBLESCHEMAEVOLUTION
Nike
Digital
Engineering
MIGRATION TO DYNAMODB
DATA MODELING
CREATE TABLE launch.entry (
user_id text,
launch_id uuid,
entry_time timestamp,
PRIMARY KEY (
(user_id,launch_id), entry_time)
);
Type: AWS::DynamoDB::Table
Properties:
TableName: launch.entry
KeySchema:
- AttributeName: user_id+launch_id
KeyType: HASH
- AttributeName: entry_time
KeyType: RANGE
AttributeDefinitions:
- AttributeName: user_id+launch_id
AttributeType: S
- AttributeName: entry_time
AttributeType: N
Nike
Digital
Engineering
Nike
Digital
Engineering
MIGRATION TO DYNAMODB
Nike
Digital
Engineering
DYNAMODB CAPACITY
CAPACITY PLANNING
SCALE BY READ CAPACITY UNITS AND WRITE CAPACITY UNITS
OBSERVABILITY: BUILT-IN METRICS FOR CONSUMED AND
PROVISIONED CAPACITY
Nike
Digital
Engineering
Nike
Digital
Engineering
DYNAMODB CAPACITY
PRE-SCALE
aws application-autoscaling put-scheduled-action
--service-namespace dynamodb
--schedule "at(2018-11-27T22:00:00)"
--scheduled-action-name ReinventScaling
--resource-id 'table/launch.entries’
--scalable-dimension 'dynamodb:table:ReadCapacityUnits’
--scalable-target-action MinCapacity=XXX,MaxCapacity=YYY
Nike
Digital
Engineering
Nike
Digital
Engineering
Nike
Digital
Engineering
DYNAMODB CAPACITY
HIGH THROUGHPUT ON SINGLE PRODUCT KEY
CASSANDRA AND COUCHBASE: IN-NODE CACHING
DYNAMODB: POSSIBLE THROTTLING
Nike
Digital
Engineering
Nike
Digital
Engineering
Nike
Digital
Engineering
DYNAMODB CAPACITY
MITIGATING HOT KEYS
Nike
Digital
Engineering
Nike
Digital
Engineering
Nike
Digital
Engineering
DYNAMODB CAPACITY
MITIGATING HOT KEYS
Nike
Digital
Engineering
Nike
Digital
Engineering
Nike
Digital
Engineering
DYNAMODB CAPACITY
MITIGATING HOT KEYS
Nike
Digital
Engineering
ACHIEVEMENTS
Nike
Digital
Engineering
RELEASE OF REDESIGNED APP EXPERIENCES
NIKE TRAINING AND NIKE RUNNING
Nike
Digital
Engineering
Nike
Digital
Engineering
ACHIEVEMENTS WAS NOT IN THE CLOUD IN FIRST RELEAS
Nike
Digital
Engineering
SCALABLE
DURABLE
ELASTIC
COSTEFFICIENT
OBSERVABLE
CONDITIONALUPDATES
Nike
Digital
Engineering
ACHIEVEMENTS RUNS WITH DYNAMODB
Nike
Digital
Engineering
OPTIMISTIC LOCKING WITH CONDITIONAL UPDATES
Nike
Digital
Engineering
WITHOUTCONDITIONALUPDATES
1 2 3 4 5 6
{
“type”: “update”,
“distance”: 13.1
}
ACHIEVEMENTS
{
“type”: “update”,
“distance”: 26.2
}
ACHIEVEMENT
S
Write to
DynamoDB
Fastest Marathon
Overwritten
Write to
DynamoDB
Fastest Marathon
Achievement
Unlocked
Message
Processed
Message
Processed
Nike
Digital
Engineering
WITHCONDITIONALUPDATES
1 2 3 4 5 6
{
“type”: “update”,
“distance”: 13.1
}
ACHIEVEMENTS ACHIEVEMENT
S
Message
Processed
Activity has
been updated to
26.2 miles, no
update occurs
Conditional
Update Failed
Message
Processed
Write to
DynamoDB
Fastest Marathon
Achievement
Unlocked
VERSION 1 VERSION 2
{
“type”: “update”,
“distance”: 26.2
}
ACHIEVEMENT
S
CHALLENGES
Nike
Digital
Engineering
ACHIEVEMENTS
ISINPRODUCTION
Nike
Digital
Engineering
TIMEZONE
SERVICE
BUILT WITH CASSANDRA
Responsible for keeping track of an athlete’s time zones as
they move through the world.
All our activity data is stored in UTC time. We use time zones
to adjust the user’s activity data when needed.
Nike
Digital
Engineering
Nike
Digital
Engineering
RUNNING CASSANDRA FOR TWO YEARS
COST
EC2 COSTS WERE INCREASING
AS THE CLUSTER GREW
UPGRADES
DEMANDING AND TIME
CONSUMING TASKS
DEVOPS
DEMANDING AND TIME
CONSUMING TASKS
1 2 3
RETIREMENT NOTIFICATION
Nike
Digital
Engineering
FROM TO
CREATE TABLE
TIMEZONE.TIMEZONE_LOGS (
USER_ID TEXT,
TIMESTAMP TIMESTAMP,
TIMEZONE_ID TEXT,
METADATA MAP<TEXT, TEXT>,
PRIMARY KEY (USER_ID,
TIMESTAMP)
) WITH CLUSTERING ORDER BY
(TIMESTAMP DESC);
TYPE: AWS::DYNAMODB::TABLE
PROPERTIES:
TABLENAME:
TIMEZONE.TIMEZONE_LOGS
KEYSCHEMA:
- ATTRIBUTENAME: USER_ID
KEYTYPE: HASH
- ATTRIBUTENAME:
ENTRYTIMESTAMPMS
KEYTYPE: RANGE
ATTRIBUTEDEFINITIONS:
- ATTRIBUTENAME: USER_ID
ATTRIBUTETYPE: S
- ATTRIBUTENAME:
ENTRYTIMESTAMPMS
ATTRIBUTETYPE: N
Nike
Digital
Engineering
MIGRATE THE DATA
SET UP DUAL WRITES MOVED TO DYNAMODB
Nike
Digital
Engineering
Nike
Digital
Engineering
Nike
Digital
Engineering
98%COSTSAVINGS
DYNAMODB
IS THE NEW DEFAULT
SCALE CONTINUOUS
INNOVATION
Nike
Digital
Engineering
FINDUSONMEDIUM
MEDIUM.COM/NIKEENGINEERING
Nike
Digital
Engineering
Thank you!
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Nike
Digital
Engineering
!
Please complete the session
survey in the mobile app.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Más contenido relacionado

La actualidad más candente

Amazon Cloud Directory Deep Dive (DAT364) - AWS re:Invent 2018
Amazon Cloud Directory Deep Dive (DAT364) - AWS re:Invent 2018Amazon Cloud Directory Deep Dive (DAT364) - AWS re:Invent 2018
Amazon Cloud Directory Deep Dive (DAT364) - AWS re:Invent 2018Amazon Web Services
 
Transforming Enterprise IT - AWS Transformation Days Raleigh 2018.pdf
Transforming Enterprise IT - AWS Transformation Days Raleigh 2018.pdfTransforming Enterprise IT - AWS Transformation Days Raleigh 2018.pdf
Transforming Enterprise IT - AWS Transformation Days Raleigh 2018.pdfAmazon Web Services
 
What IT Transformation Really Means for the Enterprise
What IT Transformation Really Means for the EnterpriseWhat IT Transformation Really Means for the Enterprise
What IT Transformation Really Means for the EnterpriseTom Laszewski
 
Overcoming the Challenges of Being a Next-Generation MSP (GPSCT312) - AWS re:...
Overcoming the Challenges of Being a Next-Generation MSP (GPSCT312) - AWS re:...Overcoming the Challenges of Being a Next-Generation MSP (GPSCT312) - AWS re:...
Overcoming the Challenges of Being a Next-Generation MSP (GPSCT312) - AWS re:...Amazon Web Services
 
Go Fast and Remain Secure: How Millennium Enables Developers and Upholds Secu...
Go Fast and Remain Secure: How Millennium Enables Developers and Upholds Secu...Go Fast and Remain Secure: How Millennium Enables Developers and Upholds Secu...
Go Fast and Remain Secure: How Millennium Enables Developers and Upholds Secu...Amazon Web Services
 
ENT205 Preparing Your Team for a Cloud Transformation
ENT205 Preparing Your Team for a Cloud TransformationENT205 Preparing Your Team for a Cloud Transformation
ENT205 Preparing Your Team for a Cloud TransformationAmazon Web Services
 
The Future of Enterprise IT - Lessons Learned
The Future of Enterprise IT - Lessons LearnedThe Future of Enterprise IT - Lessons Learned
The Future of Enterprise IT - Lessons LearnedAmazon Web Services
 
Cloud Choices Quantifying the Cost and Risk Implications of Cloud
Cloud Choices Quantifying the Cost and Risk Implications of CloudCloud Choices Quantifying the Cost and Risk Implications of Cloud
Cloud Choices Quantifying the Cost and Risk Implications of CloudAmazon Web Services
 
Enterprise DevOps: Begin with Production-Ready Migration (ENT217-R1) - AWS re...
Enterprise DevOps: Begin with Production-Ready Migration (ENT217-R1) - AWS re...Enterprise DevOps: Begin with Production-Ready Migration (ENT217-R1) - AWS re...
Enterprise DevOps: Begin with Production-Ready Migration (ENT217-R1) - AWS re...Amazon Web Services
 
Releasing Mission-Critical Software at Amazon (DEV209-R1) - AWS re:Invent 2018
Releasing Mission-Critical Software at Amazon (DEV209-R1) - AWS re:Invent 2018Releasing Mission-Critical Software at Amazon (DEV209-R1) - AWS re:Invent 2018
Releasing Mission-Critical Software at Amazon (DEV209-R1) - AWS re:Invent 2018Amazon Web Services
 
Modernize Your Desktop and Application Delivery with AWS - AWS Online Tech Talks
Modernize Your Desktop and Application Delivery with AWS - AWS Online Tech TalksModernize Your Desktop and Application Delivery with AWS - AWS Online Tech Talks
Modernize Your Desktop and Application Delivery with AWS - AWS Online Tech TalksAmazon Web Services
 
AWS and Symantec: Cyber Defense at Scale (SEC311-S) - AWS re:Invent 2018
AWS and Symantec: Cyber Defense at Scale (SEC311-S) - AWS re:Invent 2018AWS and Symantec: Cyber Defense at Scale (SEC311-S) - AWS re:Invent 2018
AWS and Symantec: Cyber Defense at Scale (SEC311-S) - AWS re:Invent 2018Amazon Web Services
 
Cloud cost optimization an essential guide to aws cloud migration
Cloud cost optimization  an essential guide to aws cloud migrationCloud cost optimization  an essential guide to aws cloud migration
Cloud cost optimization an essential guide to aws cloud migrationKaty Slemon
 
Go-to Market with AWS for Startups
Go-to Market with AWS for StartupsGo-to Market with AWS for Startups
Go-to Market with AWS for StartupsAmazon Web Services
 
Improve Productivity with Continuous Integration & Delivery
Improve Productivity with Continuous Integration & DeliveryImprove Productivity with Continuous Integration & Delivery
Improve Productivity with Continuous Integration & DeliveryAmazon Web Services
 
Trends in Digital Transformation (ARC212) - AWS re:Invent 2018
Trends in Digital Transformation (ARC212) - AWS re:Invent 2018Trends in Digital Transformation (ARC212) - AWS re:Invent 2018
Trends in Digital Transformation (ARC212) - AWS re:Invent 2018Amazon Web Services
 
91APP 之API 經濟學與API Gateway與導入之旅
91APP 之API 經濟學與API Gateway與導入之旅91APP 之API 經濟學與API Gateway與導入之旅
91APP 之API 經濟學與API Gateway與導入之旅Amazon Web Services
 
An Overview of the AWS Cloud Adoption Framework - May 2017 AWS Online Tech Talks
An Overview of the AWS Cloud Adoption Framework - May 2017 AWS Online Tech TalksAn Overview of the AWS Cloud Adoption Framework - May 2017 AWS Online Tech Talks
An Overview of the AWS Cloud Adoption Framework - May 2017 AWS Online Tech TalksAmazon Web Services
 
Leadership Session: Developing Mobile & Web Apps on AWS (MOB202-L) - AWS re:I...
Leadership Session: Developing Mobile & Web Apps on AWS (MOB202-L) - AWS re:I...Leadership Session: Developing Mobile & Web Apps on AWS (MOB202-L) - AWS re:I...
Leadership Session: Developing Mobile & Web Apps on AWS (MOB202-L) - AWS re:I...Amazon Web Services
 

La actualidad más candente (20)

Amazon Cloud Directory Deep Dive (DAT364) - AWS re:Invent 2018
Amazon Cloud Directory Deep Dive (DAT364) - AWS re:Invent 2018Amazon Cloud Directory Deep Dive (DAT364) - AWS re:Invent 2018
Amazon Cloud Directory Deep Dive (DAT364) - AWS re:Invent 2018
 
Transforming Enterprise IT - AWS Transformation Days Raleigh 2018.pdf
Transforming Enterprise IT - AWS Transformation Days Raleigh 2018.pdfTransforming Enterprise IT - AWS Transformation Days Raleigh 2018.pdf
Transforming Enterprise IT - AWS Transformation Days Raleigh 2018.pdf
 
What IT Transformation Really Means for the Enterprise
What IT Transformation Really Means for the EnterpriseWhat IT Transformation Really Means for the Enterprise
What IT Transformation Really Means for the Enterprise
 
Overcoming the Challenges of Being a Next-Generation MSP (GPSCT312) - AWS re:...
Overcoming the Challenges of Being a Next-Generation MSP (GPSCT312) - AWS re:...Overcoming the Challenges of Being a Next-Generation MSP (GPSCT312) - AWS re:...
Overcoming the Challenges of Being a Next-Generation MSP (GPSCT312) - AWS re:...
 
Journey to Outcomes
Journey to OutcomesJourney to Outcomes
Journey to Outcomes
 
Go Fast and Remain Secure: How Millennium Enables Developers and Upholds Secu...
Go Fast and Remain Secure: How Millennium Enables Developers and Upholds Secu...Go Fast and Remain Secure: How Millennium Enables Developers and Upholds Secu...
Go Fast and Remain Secure: How Millennium Enables Developers and Upholds Secu...
 
ENT205 Preparing Your Team for a Cloud Transformation
ENT205 Preparing Your Team for a Cloud TransformationENT205 Preparing Your Team for a Cloud Transformation
ENT205 Preparing Your Team for a Cloud Transformation
 
The Future of Enterprise IT - Lessons Learned
The Future of Enterprise IT - Lessons LearnedThe Future of Enterprise IT - Lessons Learned
The Future of Enterprise IT - Lessons Learned
 
Cloud Choices Quantifying the Cost and Risk Implications of Cloud
Cloud Choices Quantifying the Cost and Risk Implications of CloudCloud Choices Quantifying the Cost and Risk Implications of Cloud
Cloud Choices Quantifying the Cost and Risk Implications of Cloud
 
Enterprise DevOps: Begin with Production-Ready Migration (ENT217-R1) - AWS re...
Enterprise DevOps: Begin with Production-Ready Migration (ENT217-R1) - AWS re...Enterprise DevOps: Begin with Production-Ready Migration (ENT217-R1) - AWS re...
Enterprise DevOps: Begin with Production-Ready Migration (ENT217-R1) - AWS re...
 
Releasing Mission-Critical Software at Amazon (DEV209-R1) - AWS re:Invent 2018
Releasing Mission-Critical Software at Amazon (DEV209-R1) - AWS re:Invent 2018Releasing Mission-Critical Software at Amazon (DEV209-R1) - AWS re:Invent 2018
Releasing Mission-Critical Software at Amazon (DEV209-R1) - AWS re:Invent 2018
 
Modernize Your Desktop and Application Delivery with AWS - AWS Online Tech Talks
Modernize Your Desktop and Application Delivery with AWS - AWS Online Tech TalksModernize Your Desktop and Application Delivery with AWS - AWS Online Tech Talks
Modernize Your Desktop and Application Delivery with AWS - AWS Online Tech Talks
 
AWS and Symantec: Cyber Defense at Scale (SEC311-S) - AWS re:Invent 2018
AWS and Symantec: Cyber Defense at Scale (SEC311-S) - AWS re:Invent 2018AWS and Symantec: Cyber Defense at Scale (SEC311-S) - AWS re:Invent 2018
AWS and Symantec: Cyber Defense at Scale (SEC311-S) - AWS re:Invent 2018
 
Cloud cost optimization an essential guide to aws cloud migration
Cloud cost optimization  an essential guide to aws cloud migrationCloud cost optimization  an essential guide to aws cloud migration
Cloud cost optimization an essential guide to aws cloud migration
 
Go-to Market with AWS for Startups
Go-to Market with AWS for StartupsGo-to Market with AWS for Startups
Go-to Market with AWS for Startups
 
Improve Productivity with Continuous Integration & Delivery
Improve Productivity with Continuous Integration & DeliveryImprove Productivity with Continuous Integration & Delivery
Improve Productivity with Continuous Integration & Delivery
 
Trends in Digital Transformation (ARC212) - AWS re:Invent 2018
Trends in Digital Transformation (ARC212) - AWS re:Invent 2018Trends in Digital Transformation (ARC212) - AWS re:Invent 2018
Trends in Digital Transformation (ARC212) - AWS re:Invent 2018
 
91APP 之API 經濟學與API Gateway與導入之旅
91APP 之API 經濟學與API Gateway與導入之旅91APP 之API 經濟學與API Gateway與導入之旅
91APP 之API 經濟學與API Gateway與導入之旅
 
An Overview of the AWS Cloud Adoption Framework - May 2017 AWS Online Tech Talks
An Overview of the AWS Cloud Adoption Framework - May 2017 AWS Online Tech TalksAn Overview of the AWS Cloud Adoption Framework - May 2017 AWS Online Tech Talks
An Overview of the AWS Cloud Adoption Framework - May 2017 AWS Online Tech Talks
 
Leadership Session: Developing Mobile & Web Apps on AWS (MOB202-L) - AWS re:I...
Leadership Session: Developing Mobile & Web Apps on AWS (MOB202-L) - AWS re:I...Leadership Session: Developing Mobile & Web Apps on AWS (MOB202-L) - AWS re:I...
Leadership Session: Developing Mobile & Web Apps on AWS (MOB202-L) - AWS re:I...
 

Similar a Becoming a Nimble Giant: How Amazon DynamoDB Serves Nike at Scale (DAT320) - AWS re:Invent 2018

Ret301 Nike AWS ReInvent Real-Time monitoring
Ret301 Nike AWS ReInvent Real-Time monitoring Ret301 Nike AWS ReInvent Real-Time monitoring
Ret301 Nike AWS ReInvent Real-Time monitoring Muralidhar Narahari
 
Nike retail aws_re_invent_presentation
Nike retail aws_re_invent_presentationNike retail aws_re_invent_presentation
Nike retail aws_re_invent_presentationMuralidhar Narahari
 
Building powerful apps with ArangoDB & KeyLines
Building powerful apps with ArangoDB & KeyLinesBuilding powerful apps with ArangoDB & KeyLines
Building powerful apps with ArangoDB & KeyLinesCambridge Intelligence
 
From Zero to still Zero: The most beautiful mistakes going into the cloud.
From Zero to still Zero: The most beautiful mistakes going into the cloud. From Zero to still Zero: The most beautiful mistakes going into the cloud.
From Zero to still Zero: The most beautiful mistakes going into the cloud. OPEN KNOWLEDGE GmbH
 
Securing the Digital Double - The Path to a Trusted Digital Ecosystem
Securing the Digital Double - The Path to a Trusted Digital Ecosystem Securing the Digital Double - The Path to a Trusted Digital Ecosystem
Securing the Digital Double - The Path to a Trusted Digital Ecosystem Asanka Abeysinghe
 
[EIC 2021] Securing the Digital Double - The Path to a Trusted Digital Ecosystem
[EIC 2021] Securing the Digital Double - The Path to a Trusted Digital Ecosystem[EIC 2021] Securing the Digital Double - The Path to a Trusted Digital Ecosystem
[EIC 2021] Securing the Digital Double - The Path to a Trusted Digital EcosystemWSO2
 
Acquia Platform Updates: New Features and Capabilities
 Acquia Platform Updates: New Features and Capabilities Acquia Platform Updates: New Features and Capabilities
Acquia Platform Updates: New Features and CapabilitiesRachel Wandishin
 
Rethinking Your Migration Strategy to Your Competitive Advantage
Rethinking Your Migration Strategy to Your Competitive AdvantageRethinking Your Migration Strategy to Your Competitive Advantage
Rethinking Your Migration Strategy to Your Competitive AdvantageAmazon Web Services
 
Observability Best Practices for Your Cloud DBaaS
Observability Best Practices for Your Cloud DBaaSObservability Best Practices for Your Cloud DBaaS
Observability Best Practices for Your Cloud DBaaSScyllaDB
 
Writing plugins for Nagios and Opsview - CAPSiDE Tech Talks
Writing plugins for Nagios and Opsview - CAPSiDE Tech TalksWriting plugins for Nagios and Opsview - CAPSiDE Tech Talks
Writing plugins for Nagios and Opsview - CAPSiDE Tech TalksJose Luis Martínez
 
"Why Micro Services adoption is crucial for SaaS companies?"
"Why Micro Services adoption is crucial for SaaS companies?""Why Micro Services adoption is crucial for SaaS companies?"
"Why Micro Services adoption is crucial for SaaS companies?"Vignesh Manivannan
 
NAV 2018 and NAV New Technology - Fast Tracks - 14 dicembre 2017
NAV 2018 and NAV New Technology - Fast Tracks - 14 dicembre 2017NAV 2018 and NAV New Technology - Fast Tracks - 14 dicembre 2017
NAV 2018 and NAV New Technology - Fast Tracks - 14 dicembre 2017Roberto Stefanetti
 
Migrating to Cloud Native Solutions
Migrating to Cloud Native SolutionsMigrating to Cloud Native Solutions
Migrating to Cloud Native Solutionsinwin stack
 
AWS re:Invent 2016: Microservices, Macro Security Needs: How Nike Uses a Mult...
AWS re:Invent 2016: Microservices, Macro Security Needs: How Nike Uses a Mult...AWS re:Invent 2016: Microservices, Macro Security Needs: How Nike Uses a Mult...
AWS re:Invent 2016: Microservices, Macro Security Needs: How Nike Uses a Mult...Amazon Web Services
 
Angular for the Enterprise - ngAtlanta 2019
Angular for the Enterprise - ngAtlanta 2019Angular for the Enterprise - ngAtlanta 2019
Angular for the Enterprise - ngAtlanta 2019Jeeyun Lim
 
The Definitive Guide to Low-Code Platform
The Definitive Guide to Low-Code PlatformThe Definitive Guide to Low-Code Platform
The Definitive Guide to Low-Code PlatformPratikMistry38
 
Our Journey to 100% Agile and a BizDevOps Product Portfolio - Dr. Frank Ramsa...
Our Journey to 100% Agile and a BizDevOps Product Portfolio - Dr. Frank Ramsa...Our Journey to 100% Agile and a BizDevOps Product Portfolio - Dr. Frank Ramsa...
Our Journey to 100% Agile and a BizDevOps Product Portfolio - Dr. Frank Ramsa...Marilyne Huret
 
Architecting Web Applications for the Cloud - Design Principles and Practical...
Architecting Web Applications for the Cloud - Design Principles and Practical...Architecting Web Applications for the Cloud - Design Principles and Practical...
Architecting Web Applications for the Cloud - Design Principles and Practical...Adnene Guabtni
 
Driving success in the cloud with NGINX
Driving success in the cloud with NGINXDriving success in the cloud with NGINX
Driving success in the cloud with NGINXNGINX, Inc.
 

Similar a Becoming a Nimble Giant: How Amazon DynamoDB Serves Nike at Scale (DAT320) - AWS re:Invent 2018 (20)

Ret301 Nike AWS ReInvent Real-Time monitoring
Ret301 Nike AWS ReInvent Real-Time monitoring Ret301 Nike AWS ReInvent Real-Time monitoring
Ret301 Nike AWS ReInvent Real-Time monitoring
 
Nike retail aws_re_invent_presentation
Nike retail aws_re_invent_presentationNike retail aws_re_invent_presentation
Nike retail aws_re_invent_presentation
 
Building powerful apps with ArangoDB & KeyLines
Building powerful apps with ArangoDB & KeyLinesBuilding powerful apps with ArangoDB & KeyLines
Building powerful apps with ArangoDB & KeyLines
 
From Zero to still Zero: The most beautiful mistakes going into the cloud.
From Zero to still Zero: The most beautiful mistakes going into the cloud. From Zero to still Zero: The most beautiful mistakes going into the cloud.
From Zero to still Zero: The most beautiful mistakes going into the cloud.
 
Securing the Digital Double - The Path to a Trusted Digital Ecosystem
Securing the Digital Double - The Path to a Trusted Digital Ecosystem Securing the Digital Double - The Path to a Trusted Digital Ecosystem
Securing the Digital Double - The Path to a Trusted Digital Ecosystem
 
[EIC 2021] Securing the Digital Double - The Path to a Trusted Digital Ecosystem
[EIC 2021] Securing the Digital Double - The Path to a Trusted Digital Ecosystem[EIC 2021] Securing the Digital Double - The Path to a Trusted Digital Ecosystem
[EIC 2021] Securing the Digital Double - The Path to a Trusted Digital Ecosystem
 
Acquia Platform Updates: New Features and Capabilities
 Acquia Platform Updates: New Features and Capabilities Acquia Platform Updates: New Features and Capabilities
Acquia Platform Updates: New Features and Capabilities
 
Rethinking Your Migration Strategy to Your Competitive Advantage
Rethinking Your Migration Strategy to Your Competitive AdvantageRethinking Your Migration Strategy to Your Competitive Advantage
Rethinking Your Migration Strategy to Your Competitive Advantage
 
Observability Best Practices for Your Cloud DBaaS
Observability Best Practices for Your Cloud DBaaSObservability Best Practices for Your Cloud DBaaS
Observability Best Practices for Your Cloud DBaaS
 
Writing plugins for Nagios and Opsview - CAPSiDE Tech Talks
Writing plugins for Nagios and Opsview - CAPSiDE Tech TalksWriting plugins for Nagios and Opsview - CAPSiDE Tech Talks
Writing plugins for Nagios and Opsview - CAPSiDE Tech Talks
 
"Why Micro Services adoption is crucial for SaaS companies?"
"Why Micro Services adoption is crucial for SaaS companies?""Why Micro Services adoption is crucial for SaaS companies?"
"Why Micro Services adoption is crucial for SaaS companies?"
 
NAV 2018 and NAV New Technology - Fast Tracks - 14 dicembre 2017
NAV 2018 and NAV New Technology - Fast Tracks - 14 dicembre 2017NAV 2018 and NAV New Technology - Fast Tracks - 14 dicembre 2017
NAV 2018 and NAV New Technology - Fast Tracks - 14 dicembre 2017
 
Migrating to Cloud Native Solutions
Migrating to Cloud Native SolutionsMigrating to Cloud Native Solutions
Migrating to Cloud Native Solutions
 
AWS re:Invent 2016: Microservices, Macro Security Needs: How Nike Uses a Mult...
AWS re:Invent 2016: Microservices, Macro Security Needs: How Nike Uses a Mult...AWS re:Invent 2016: Microservices, Macro Security Needs: How Nike Uses a Mult...
AWS re:Invent 2016: Microservices, Macro Security Needs: How Nike Uses a Mult...
 
Angular for the Enterprise - ngAtlanta 2019
Angular for the Enterprise - ngAtlanta 2019Angular for the Enterprise - ngAtlanta 2019
Angular for the Enterprise - ngAtlanta 2019
 
The Definitive Guide to Low-Code Platform
The Definitive Guide to Low-Code PlatformThe Definitive Guide to Low-Code Platform
The Definitive Guide to Low-Code Platform
 
Our Journey to 100% Agile and a BizDevOps Product Portfolio - Dr. Frank Ramsa...
Our Journey to 100% Agile and a BizDevOps Product Portfolio - Dr. Frank Ramsa...Our Journey to 100% Agile and a BizDevOps Product Portfolio - Dr. Frank Ramsa...
Our Journey to 100% Agile and a BizDevOps Product Portfolio - Dr. Frank Ramsa...
 
Wearable Tech Trends
Wearable Tech TrendsWearable Tech Trends
Wearable Tech Trends
 
Architecting Web Applications for the Cloud - Design Principles and Practical...
Architecting Web Applications for the Cloud - Design Principles and Practical...Architecting Web Applications for the Cloud - Design Principles and Practical...
Architecting Web Applications for the Cloud - Design Principles and Practical...
 
Driving success in the cloud with NGINX
Driving success in the cloud with NGINXDriving success in the cloud with NGINX
Driving success in the cloud with NGINX
 

Más de Amazon Web Services

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Amazon Web Services
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Amazon Web Services
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateAmazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSAmazon Web Services
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Amazon Web Services
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Amazon Web Services
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...Amazon Web Services
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsAmazon Web Services
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareAmazon Web Services
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSAmazon Web Services
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAmazon Web Services
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareAmazon Web Services
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWSAmazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckAmazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without serversAmazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...Amazon Web Services
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceAmazon Web Services
 

Más de Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Becoming a Nimble Giant: How Amazon DynamoDB Serves Nike at Scale (DAT320) - AWS re:Invent 2018

Notas del editor

  1. * Set context * First talk about our group at Nike, what we do, where we started on our cloud journey. * Then talk about SNKRs: premium experience for sneaker heads. Specific engineering challenges on DBs * Adam will talk about Achievements, born with DynamoDB. * He'll then shift and talk about one of our DynamoDB migration stories for timezone.
  2. Nike's mission statement focuses on innovation and inspiration, because that's how we help athletes reach their full potential. Nike believes, "If you have a body, you are an athlete." Nike Digital Engineering powers the future of sport - serving athletes in our digital experiences. ​
  3. * At this point, Nike digital is built around a microservices architecture. * Built this up over many years * Spans many different domains and experiences: activity, commerce, order management, logistics. * Served from AWS: large footprint * Chose AWS because of their vast array of offerings, including DynamoDB
  4. * But, we didn't start this way * To give perspective: started with monoliths in a traditional colo * As the digital business grew => challenges scaling * 6 months worth of changes going out in big batches * 2013: started our cloud journey as an experiment w/ small number of teams * Not mature yet: technology choices or automation * Fast forward to 2015, we mature to a full fledged, cloud-first organization * Focusing on automation to to scale deploys and teams
  5. Migration into the cloud​ migrating to the cloud , core principles, grounded in a singular mission – Serve Athletes. We apply these principals to all of our work​ Responsive    Resilient Elastic, Observable​ Moving features instead of tackling everything​ features still running on the monolith, sent new  to the old platform. We quickly learned the scalability, throttle the writes back to  the old service to prevent database pressure​
  6. * Along with some of our core principals => starting direction * Explicitly no lift and shift: rearchitect around cloud native * Start with C* and Couchbase, taking cues from companies like Netflix * C* was chosen to support multi-regional clusters in the future * Had a lot of automation around cluster creation and some maintenance * new model: dedicated databases, shared-nothing architecture * DevOps: Each team operated their clusters
  7. * As we grew, the choice of using a database cluster on EC2 provided some challenges * More clusters given more teams building services * Early engineering teams had deep knowledge of C*, lost some of that with growth * Upgrades, backups and restore non-trivial * We have a culture of sharing best practices between teams * => But we still found C* to be operationally intensive * C* and couchbase were a large part of EC2 spend * Many overprovisioned, underutilized
  8. * As you'll see throughout the presentation, we've moved many workloads over from DynamoDB * Let's talk about a specific example: SNKRs launch
  9. * Start from the consumer end * SNKRs is a premium experience where we launch our most coveted product * Launches happen 52 weeks a year, around the globe * From browsing, to checkout, to payment, the services supporting launches are all in AWS
  10. * If you know anything about sneakerheads, you know how passionate they are * The analog analogy would be a massive line at a store * Today, we can serve these athletes digitally * We see our largest surges in traffic from launches * Which presents specific engineering challenges around scale
  11. * Here you see the traffic pattern we face * Before the big spike, you're seeing Nike.com traffic * NOTE: This is not zero! * Largest spike at launch start time: 7am * Aftershocks, but shows how massive launches are * Again, 52 weeks a year, across geographies
  12. * To make this work, overprovision Cassandra and Couchbase clusters * Ensure that consumers have a good experience * To handle the spike, the cluster has excess capacity before and after the spike * This translates into $$$ we could be spending elsewhere * Provisioning and configuration is challenging in order to meet the spike * Also highlight need to forecast
  13. * All teams in the launch path migrated * We migrated to DynamoDB to solve some specific challenges for launch * Relieved of ongoing cluster maintenance * DynamoDB's ability to horizontally scale
  14. * With the migration, we did need to rethink some of our data models * Some key DynamoDB features that enabled our data needs include... * GSIs: before we'd need to actually coordinate secondary indexing via code, but moved this to the DB layer * Conditional and partial updates with UpdateItem are a huge win * Adam has a great story here with achievements * Launch: optimistic locking for our fairness process * Flexible schema without ALTER TABLE
  15. * One particular case we had to solve for is compound hash keys * In C* we get multi-attribute primary keys * In DynamoDB we have to do this with string concat in code * One example of a minor difference in the data modeling changes we needed to make * DynamoDB is slightly less forgiving of hot keys => pay attention to hash key
  16. * DynamoDB's ability to scale up and down horizontally is a key unlock for launch * Previously, we'd need to scale up and down EC2s to vary capacity * We'd need to do so in each AZ, in the right order * No more idle capacity: we pay for what we use
  17. * Horizontal scalability is not free: still need capacity planning * In general, we also need enough headroom * The RCU and WCUs vary per use case: read heavy services may be product data, write heavy checkout * Observability from Cloudwatch metrics for DDB * Run experiments to determine correct capacity for various expected loads
  18. * DDB Autoscaling looks at the last 5min of activity to determine future scale * Although we use autoscaling, still need to prescale * In the case of launch, the orders of magnitude increase dictate that we increase this ourselves * We happen to know when the spikes will happen, since we're the ones setting the date * Here's the specific API call we use: use the same autoscaling service to setup scheduled scaling actions * Set the minimum value to the expected peak + headroom
  19. * Capacity Units: evenly divided by partition * High traffic in a short period of time on a single product * Hot keys in product-centric services (product info or pricing) * previous databases: in-node caching capabilities * In DynamoDB: hot keys = partiton-level throttling * We have a few strategies to solve this problem w/ low latency
  20. * Our first tool we reach to is the CDN * Used for low changing resources, such as product data * Problem: Points of Presence burst at launch start
  21. * A traditional approach to solve this is via a side cache * Puts caching logic in the service (read through/write through/write behind/ etc) * Some teams use this still * In some cases, we can use DynamoDB streams to update the cache * This effectively handles bursts
  22. * Ultimately the easiest option to solve hot key issues on read is DAX * DAX is a provisioned cache cluster with the right logic for caching results * Reduction of consistency issues and code complexity * Problems with Query Cache vs. Item Cache, usually use short TTL to mitigate
  23. Achievements​ --Az Zach mentioned earlier the old platform is a monolith software stack​ -- old achievements backed by a series of Oracle Rac and many Coherence servers. ​ --implemented as code, difficult to scale, deployments occurred every six months.​ --taken down for database maintenance during the night. low traffic periods started to dry up. harder to find.​ --Coherence , in-memory cache, state locked for athlete. Locks contentious as background processes, bottleneck, throughput.​ --Processes were hard to debug not observable. calls from athletes with no way of explaining what happened. update the database. ​
  24. Release of redesigned app experiences​ Started journey mid 2016 Nike, existing apps, released NRC and NTC, cloud enabled​ New service great,  only the start of our team’s journey to the cloud.​
  25. Achievements was not in the cloud in first release​ apps – NTC and NRC –called “achievements”. keep athletes motivated, first mile, fifth marathon. cheering them through achievements.​ re-design with two key services.​ The rules engine, world to define custom localized, various filters over activity data.​ The ingest service processing incoming activity messages applying  rules to determine had and writing it to the database. ​ The rules engine, and the ingest service distributed tracing to ensure they were observable,​ Don’t have time to dig deeper, one of our engineers wrote a fantastic article hosted on medium under nike engineering​
  26. Database behind the Achievements system was DynamoDB​ Power, team decided to use Dynamo for a number of reasons.​ Scalability. thousands of requests​ Durability. Never patch or update late at night during low traffic times. core principle responsive.​ Elasticity, being able to adjust our capacity dynamicly, another core principle.​ Cost. With the ability to auto-scale, scale up and down to only pay for what we use​ Dynamo’s Update api conditional updates  for optimistic locking.​
  27. Conditional updates and optimistic locking​ When processing multiple updates to a single achievement at the same time, concurrency can become a problem when trying to maintain a state of a single record.​ First what is optimistic locking. ​ method of maintaining state, records, with a version number. ​ record is read special attention is applied version number.​ attempting to write a record. If version of record doesn’t match ead then state has changed while being processed.​ record reprocessed given that state has been changed. ​ locking methodologies additional infrastructure, leverage the database.​
  28. Without conditional updates​ Imagine you’ve been training for months. ​ Today is race day.​ Four hours and 45 minutes, 26.2 miles later you just completed your first marathon. Nike wants to celebrate your achievement so let’s look what would happen if conditional updates was not used.​ … Through steps​ This is a last write wins model which doesn’t ensure consistency of the data which can will result in a terrible experience for our runners. ​ ​
  29. With conditional updates Let’s look at this scenario with conditional updates.  Each update now reads the version 1 of the achievement record. The quicker update successfully writes its update as the records version is still 1. The second write, now a conditional update, fails because the record version has been updated to 2. Achievements sends the message to be reprocessed. The update comes back to achievements and sees that the activity has a distance of 26.2 miles. Nike is there to celebrate your first marathon achievement. DynamoDB is enabling achievements to be resilient checking off the last core principle.
  30. Challenges Row size, To keep costs manageable that meant keeping row size low. Since the read capacity is also tied to the data size of a record the team GZIP'd a large column to drop consumed read capacity with a quick code change. DAX. We attempted to use DAX. Launch successfully used DAX but the data and access patterns are very different. Launch is very read heavy with small records. Achievements is on average 97% read and 3% write with large records. With decreased visibility into the metrics of DAX cluster the team instead decided to rework the table schema by adding a second table to enable development of new features for the achievements service. (Need AWS word smithing here to best explain why DAX didn’t fit our use case)
  31. Monolith system Achievements has been in production for over a year and has been a success. With the team’s hard work the monolith system was able to be shutdown earlier this year.  But this does not complete our journey in the cloud just finishes a chapter Achievements is one example where we started with Dynamo, but what about services that didn’t start with Dynamo from the design.​ Remember when Zach mentioned that teams quick to the cloud used Cassandra as their data store? We were one of those teams.​ One of the earliest services we moved to the cloud was Timezone
  32. Timezone Time is always an engineers worst nightmare, right? For our athletes, sport never stops, and we need to support that need with our apps. So we developed Timezone. Timezone is a web service responsible for keeping a timeline of an athlete’s timezone journey as they move through the world. Our running and training apps send activity data to our new cloud services the apps would tell the platform what timezone the athlete was in. This data allows the platform to give the athlete timezone adjusted data when needed while handling all data with the UTC timezone for easier storage and processing. Cassandra is a great datastore. It could scale to handling very large traffic loads with ease. But we’ve learned a lot since Timezone was launched in 2016.
  33. Working with Cassandra for two years We’re a Devops group and Cassandra was the most demanding and time consuming task team members had to deal with. Costs were rising. EC2 costs were going up as the team grew the cluster to accomodate the increasing data size. Upgrading a Cassandra version meant a rolling push that could easily occupy a week of a team member’s time to push the code to production.  Retirement Notifications.
  34. The retirement notification There you are at your desk, working hard on some code. You're on-call, and your rotation has been awesome. Ding! An email notification comes in and says…. EC2 retirement.. For all our other cloud services it’s easy. The team can let our auto-scale groups do the work for us, but Cassandra was a different story. You quickly scramble to the AWS console Head over to EC2 and to the Events section just hoping you don’t see a Cassandra node. And your rotation was going so well!  Time to spend a couple hours going through the documented node replacement process.  The team began to ponder if we could move from Cassandra to DynamoDB. (Looking for a way out)
  35. We setup the service to do dual writes to Cassandra and DynamoDB, and read from Cassandra Using a combo of different technologies. AWS EMR, Spark, and the DynamoDB Spark Connector from AWS. Show link to connector on slide It took approximately three days to move all the data over. Validated the migrated data Updated the service to still perform dual writes, but instead read from DynamoDB. Ensured the service was operating normally with the read path changed. Updated the service to remove Cassandra Terminated the Cassandra cluster
  36. Cost savings were substantial.  Because of DynamoDB’s we dropped our overall database cost by 98%. Yes we’re spending only 2% of what we did with Cassandra. Able to achieve this without giving up anything after migrating Our devops around managing the timezone database dropped from being measured in hours or sometimes days to just minutes. (Engineering cost, loose cost)
  37. DynamoDB is the new default DynamoDB was a big win for Timezone, the team and for Nike. Whether starting from scratch or starting with an existing datastore. ---------- * As you've seen, we can achieve the necessary levels of scaling * For product launch, we have to optimize for peak throughput scaling * For something like Timezone, we have scalability on storage * Overall, DynamoDB has helped us grow the organization's footprint: * less time spent scaling clusters means more services and experiences ------- * DynamoDB continues to add features over time. * DAX, Backups, Adaptive Capacity, TTL * As a result, Nike can continue to innovate for our consumer * For Nike, our experiences are the differentiator