# Tweaking DynamoDB Tables for Fun and Profit

DevFeed: [Tweaking DynamoDB Tables for Fun and Profit](<https://devfeed.tech/articles/tweaking-dynamodb-tables-for-fun-and-profit-28635.md>)

Original publisher: [Read original article](<https://eng.localytics.com/tweaking-dynamodb-tables/>)

Author: Joanna Solmon

Published: 2017-01-04T14:45:00Z

Content type: article

Language: en

Sources: [Localytics](<https://devfeed.tech/sources/localytics.md>)

Topics: [Amazon DynamoDB](<https://devfeed.tech/topics/amazon-dynamodb.md>), [big-data](<https://devfeed.tech/topics/big-data.md>)

Tags: [aging](<https://devfeed.tech/tags/aging.md>), [app](<https://devfeed.tech/tags/app.md>), [aws](<https://devfeed.tech/tags/aws.md>), [cost](<https://devfeed.tech/tags/cost.md>), [daily](<https://devfeed.tech/tags/daily.md>), [data](<https://devfeed.tech/tags/data.md>), [database](<https://devfeed.tech/tags/database.md>), [dedupe](<https://devfeed.tech/tags/dedupe.md>), [deduplication](<https://devfeed.tech/tags/deduplication.md>), [devices](<https://devfeed.tech/tags/devices.md>), [dynamo](<https://devfeed.tech/tags/dynamo.md>), [dynamodb](<https://devfeed.tech/tags/dynamodb.md>), [effective](<https://devfeed.tech/tags/effective.md>), [fixed](<https://devfeed.tech/tags/fixed.md>), [history](<https://devfeed.tech/tags/history.md>), [ignore](<https://devfeed.tech/tags/ignore.md>), [ops](<https://devfeed.tech/tags/ops.md>), [storage](<https://devfeed.tech/tags/storage.md>), [tables](<https://devfeed.tech/tags/tables.md>), [throughput](<https://devfeed.tech/tags/throughput.md>), [tweaking](<https://devfeed.tech/tags/tweaking.md>), [volume](<https://devfeed.tech/tags/volume.md>)

## AI overview

Localytics receives billions of datapoints daily, with duplicates from mobile devices retrying uploads; the excerpt says duplicates can reach 10% of traffic. A straightforward DynamoDB deduplication scheme checks each datapoint's UUID against stored UUIDs and uses a conditional write to combine the check and insertion. At 5 billion datapoints per day, that means at least that many daily table operations and about 150 billion UUIDs for a 30-day history, which accommodates retries delayed until users reopen apps. The excerpt identifies storage as the cost that schema tweaks may control, but stops before describing those changes or quantifying savings. It also notes the naive one-UUID-per-row schema has no way to age out records.

## Source excerpt

Amazon's DynamoDB is a great technology: it's easy to set up and provides all the benefits of an infinitely scalable distributed database without the operational overhead. Unfortunately, DynamoDB can also be very expensive for high volume, high throughput storage. This post will show how we were