DynamoDB at HasOffers
Upcoming SlideShare
Loading in...5
×
 

DynamoDB at HasOffers

on

  • 221 views

How HasOffers uses DynamoDB

How HasOffers uses DynamoDB

Statistics

Views

Total Views
221
Views on SlideShare
221
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

DynamoDB at HasOffers DynamoDB at HasOffers Presentation Transcript

  • DynamoDB at HasOffers
  • • Attribution for web & mobile marketing • Tons of data • Ad-hoc analysis • Near real-time
  • DynamoDB at HasOffers 18 months in production 207 billion items 87 TB of data
  • Use Cases Tracking sessions Deduplication Attribution
  • Tracking Sessions
  • Use Case: Tracking Sessions Session Data 671c6a9a-bed0-4cec-a465-613cca8c9832 • Impression • Click
  • Use Case: Tracking Sessions • Ideal for NoSQL • KV lookups • Scalability • Availability
  • Deduplication
  • Use Case: Event Deduplication 671c6a9a-bed0-4cec-a465-613cca8c9832 ebe0efef-aa71-471c-b3f8-7b66b458bd79 ebe0efef-aa71-471c-b3f8-7b66b458bd79 d149e52c-d2b3-49bc-b6af-f304b5fab57f DEDUPE! (Idempotency)
  • Use Case: Event Deduplication Hash uuid Range <none> Write capacity = X, Read capacity = 1 Conditional puts
  • Use Case: Event Deduplication def is_duplicate( dynamo_tbl, uuid ): row_data = {‘host’: socket.gethostname(), ‘created’: int(time.time())} row = dynamo_tbl.new_item( hash_key=uuid, attrs=row_data ) DEDUPE! try: row.put( expected_value={‘host’: False} ) except DynamoDBConditionalCheckFailedError: return True # not a duplicate return False
  • Use Case: Event Deduplication • Real-time dedupe • Conditional put • Writes only; no read • Extra debug info {uuid: d149e52c-d2b3-49bc-b6af-f304b5fab57f, host: server03.hasoffers.com, created: 1398884990} DEDUPE!
  • Why NoSQL SaaS?
  • Cluster Resizing • Upsize and downsize trivial in DynamoDB • Infrequent on own cluster = limits operational experience
  • Cluster Software Updates 0.7 1.0 • Production depends on NoSQL solution being available. • Software version updates somewhere between nail-biting and terrifying
  • Dynamo Operations
  • DynamoDB Capacity Per table R/W capacity Capacity units Exceed = throttling
  • DynamoDB Throttling CloudWatch = 5 minutes DynamoDB = 1 second
  • DynamoDB Throttling • Double capacity on table • Root cause from log analysis – capacity usage – key hot-spotting • Fix root cause • Reduce capacity on table
  • Closing Thoughts
  • Closing Thoughts • Compelling offering • Simple operations • Avoid hammer syndrome • Very happy
  • Thank you! niek@hasoffers.com