• Stars
    star
    615
  • Rank 70,692 (Top 2 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 11 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Dynamic DynamoDB provides auto scaling for AWS DynamoDB

Dynamic DynamoDB

AWS NoSQL database DynamoDB is a great service, but it lacks automated throughput scaling. This is where Dynamic DynamoDB enters the stage. It provides automatic read and write provisioning for DynamoDB.

All you need to do is to tell Dynamic DynamoDB is at which point and how much you want to scale up or down your DynamoDB tables. An example is in place. Letโ€™s say you have way more traffic on your database during sales hours 4pm - 10pm. DynamicDB can monitor the increased throughput on your DynamoDB instance (via CloudWatch) and provision more throughput as needed. When the load is reducing Dynamic DynamoDB will sense that and automatically reduce your provisioning.

See an example of how to configure Dynamic DynamoDB under Basic usage or checkout dynamic-dynamodb --help.

Features in short

  • Scale up and down DynamoDB automatically
  • Restrict scaling to certain time slots
  • Monitor multiple DynamoDB tables at the same time
  • Gives you control over how much reads and writes you want to scale up and down with
  • Dynamic DynamoDB has support for max and min limits so that you always knows how much money you spend at most and how much capacity you can be guaranteed
  • Support for circuit breaker API call. If your service is experiencing disturbances, Dynamic DynamoDB will not scale down your DynamoDB tables

Documentation

Project documentation is hosted at dynamic-dynamodb.readthedocs.org.

Basic usage

This example will configure Dynamic DynamoDB to:

  • Scale up your DynamoDB table when the consumed reads 90% of the total provisioned reads
  • Scale up your DynamoDB table when the consumed writes 90% of the total provisioned writes
  • Scale up your reads with 50%
  • Scale up your writes with 40%
  • Scale down your DynamoDB table when the consumed reads 30% of the total provisioned reads
  • Scale down your DynamoDB table when the consumed writes 40% of the total provisioned writes
  • Scale down your reads with 40%
  • Scale down your writes with 70%
  • Check for changes every 5 minutes

Command:

dynamic-dynamodb --table-name my-table \
                 --reads-upper-threshold 90 \
                 --reads-lower-threshold 30 \
                 --increase-reads-with 50 \
                 --decrease-reads-with 40 \
                 --writes-upper-threshold 90 \
                 --writes-lower-threshold 40 \
                 --increase-writes-with 40 \
                 --decrease-writes-with 70 \
                 --check-interval 300

Please note that using configuration files instead of command line options will give you even more control over the service.

Installation instructions

The easiest way to install Dynamic DynamoDB is through PyPI:

pip install dynamic-dynamodb

Required privileges

If you want to set up a separate IAM user for Dynamic DynamoDB, then you need to grant the user the following privileges:

  • cloudwatch:GetMetricStatistics
  • dynamodb:DescribeTable
  • dynamodb:ListTables
  • dynamodb:UpdateTable
  • sns:Publish (used by the SNS notifications feature)

An example policy could look like this:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "dynamodb:DescribeTable",
        "dynamodb:ListTables",
        "dynamodb:UpdateTable",
        "cloudwatch:GetMetricStatistics"
      ],
      "Resource": [
        "*"
      ]
    },
    {
      "Effect": "Allow",
      "Action": [
        "sns:Publish"
      ],
      "Resource": [
        "arn:aws:sns:*::dynamic-dynamodb"
      ]
    }
  ]
}

Community applications

There are a few community applications for managing Dynamic DynamoDB.

Reporting bugs

Please help me by providing feedback and bug reports. You can file bugs in the project's GitHub Issues page.

Provide as much details as possible to make bug fixing as swift as possible.

Author

This project is maintained by Sebastian Dahlgren (GitHub | Twitter | LinkedIn)

License

APACHE LICENSE 2.0 Copyright 2013-2014 Sebastian Dahlgren

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

More Repositories

1

vim-delve

Neovim / Vim integration for Delve
Vim Script
489
star
2

scrapy-mongodb

MongoDB pipeline for Scrapy. This module supports both MongoDB in standalone setups and replica sets. scrapy-mongodb will insert the items to MongoDB as soon as your spider finds data to extract.
Python
355
star
3

goldie

Golden file testing for Go
Go
219
star
4

meteor-chat-tutorial

Example Meteor chat application supporting GitHub authentication.
JavaScript
186
star
5

aws-ec2-assign-elastic-ip

Automatically assign Elastic IPs to AWS EC2 Auto Scaling Group instances
Python
176
star
6

git-pylint-commit-hook

Git pre-commit hook to check Python code quality with pylint. You can use this hook to prohibit Python code with a bad syntax to be checked in.
Python
143
star
7

dotfiles

My dotfiles
Vim Script
130
star
8

automated-ebs-snapshots

Script for managing automated AWS EBS snapshots
Python
89
star
9

meteor-autocompletion

Autocompletion using data from MeteorJS collections
JavaScript
48
star
10

markdown-toc

Table of Contents generator for Markdown
Go
22
star
11

pok3r-layout

Vortex Pok3r layout for Linux users
16
star
12

elliot.js

Near real time graph library, see web page or demo.html for examples
JavaScript
11
star
13

dynamodb-config-store

Store your configuration in DynamoDB
Python
11
star
14

vim-ide

Sebastian's vim IDE
Vim Script
8
star
15

password-generator

Simple password generator module for Python
Python
8
star
16

yayson

Yay! Beautiful JSON on the command line!
Python
3
star
17

procmon

Simple utility for checking if processes are running
Python
3
star
18

markdown-docs

markdown-docs is a documentation generator for projects using Markdown. The problem with having Markdown files spread around your project is that it is hard to get an overview of all your documentation. markdown-docs solves this by collecting all of your Markdown files into one browsable HTML hierarchy.
Python
3
star
19

github-kanban

JavaScript
2
star
20

python-inspector

Used to track down which Python module and script that called your method / function. It will show you the exact Python file, line number and the actual line that made the call. The module is plug'n'playable, just import it and place a non-interfering hook in your code.
Python
2
star
21

relic

AWS Cloud management tool written in Python 2.7 and Django
JavaScript
1
star
22

recharged

Electrical vehicle charging system
Go
1
star
23

watchtower

Pythonic monitoring software
Python
1
star
24

chartista.js

JavaScript library for graphing
JavaScript
1
star
25

answering-robot

Fooling around with Python and text searching
Python
1
star
26

meteor-parent-data-example

Example showing how to access parent data in MeteorJS.
JavaScript
1
star