12
Auto scale DynamoDB with Dynamic DynamoDB Sebastian Dahlgren @sebdah

Autoscale DynamoDB with Dynamic DynamoDB

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Autoscale DynamoDB with Dynamic DynamoDB

Auto scale DynamoDB with

Dynamic DynamoDB

Sebastian Dahlgren!@sebdah

Page 2: Autoscale DynamoDB with Dynamic DynamoDB

Project overviewThroughput metrics via CloudWatch

Supports auto scaling oftables & global secondary indexes

Live for about a year

>10.000 monthly downloads

Open source

Page 3: Autoscale DynamoDB with Dynamic DynamoDB

Background

Auto scaling is important!- Saves money- Saves your skin

No auto scaling in DynamoDB

Page 4: Autoscale DynamoDB with Dynamic DynamoDB

Basic config example

Page 5: Autoscale DynamoDB with Dynamic DynamoDB

Configuration• [global]  

o AWS credentials o Check interval o Circuit breaker • [logging]  

o Logging settings o Supports external logging config • [table:  my_table]  

o Rules for scaling a certain table o Maintenance windows • [gsi:  my_gsi  table:  my_table]  

o Rules for scaling Global Secondary Indexes

Page 6: Autoscale DynamoDB with Dynamic DynamoDB

Handling many tables or dynamic table names

• Table list refreshed for every iteration o Addition of new tables o Removal of old tables

• Use regular expressions in your configuration

[table:  ^daily_data.*$]

Page 7: Autoscale DynamoDB with Dynamic DynamoDB

Scaling down• DynamoDB limits down scaling to 4 times per UTC

day • Optimize downscaling by using

o reads-­‐lower-­‐threshold

o writes-­‐lower-­‐threshold

o always-­‐decrease-­‐rw-­‐together

o maintenance-­‐windows

Page 8: Autoscale DynamoDB with Dynamic DynamoDB

SNS notifications

• Get an email when your provisioning is updated

• Currently supports: o scale-up o scale-down

Page 9: Autoscale DynamoDB with Dynamic DynamoDB

Circuit breaker

• Dynamic DynamoDB can poll an URL to check system health

• All scaling is paused if the URL does not return HTTP 200  OK

Page 10: Autoscale DynamoDB with Dynamic DynamoDB

CloudFormation template• Launches a t1.micro

instance (<$15/mo) • Auto Scaling Group

min: 1, max: 1 • Running Dynamic

DynamoDB in daemon mode • Configuration on S3

Page 11: Autoscale DynamoDB with Dynamic DynamoDB

TadaaImage publishing service

Page 12: Autoscale DynamoDB with Dynamic DynamoDB

Thank you!

sebdah / dynamic-dynamodb