Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Accelerating DynamoDB with DAX

252 views

Published on

Amazon DynamoDB Accelerator (DAX) is a fully managed, highly available, in-memory cache for DynamoDB that delivers up to a 10x performance improvement – from milliseconds to microseconds – even at millions of requests per second. DAX does all the heavy lifting required to add in-memory acceleration to your DynamoDB tables, without requiring developers to manage cache invalidation, data population, or cluster management.

  • Be the first to comment

  • Be the first to like this

Accelerating DynamoDB with DAX

  1. 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved Amazon DynamoDB Accelerator (DAX) Sean Shriver NoSQL Solutions Architect Amazon Web Services
  2. 2. Amazon DynamoDB Fast and flexible NoSQL database service for any scale
  3. 3. Scaling high-velocity use cases with DynamoDB Ad Tech Gaming MobileIoT Web
  4. 4. Scalability Performance Security Availability Manageability Developer Platform
  5. 5. Performance Scalability Performance Security Availability & Data Protection Manageability Development Platform
  6. 6. DynamoDB: consistent performance at scale ConsistentSingle-Digit Millisecond Latency Requests(millions) Latency(milliseconds) Scalability Performance Security Availability & Data Protection Manageability Development Platform “We cannot afford to waste a 3 or 4 milliseconds...” “We have 20ms to make a decision… ”
  7. 7. Scalability Performance Security Availability & Data Protection Manageability Development Platform
  8. 8. Scalability Performance Security Availability & Data Protection Manageability Development Platform
  9. 9. Scalability Performance Security Availability & Data Protection Manageability Development Platform DynamoDB Cache Your Applications Traditional side cache DynamoDB Your Applications Caching made simple DynamoDB Accelerator
  10. 10. DAX Demo
  11. 11. Scalability Performance Security Availability & Data Protection Manageability Development Platform Milliseconds to microseconds
  12. 12. Scalability Performance Security Availability & Data Protection Manageability Development Platform • Fully managed, highly available: handles all software management, fault tolerant, replication across multi-AZs within a region • DynamoDB API compatible: seamlessly caches DynamoDB API calls, no application re-writes required • Write-through: DAX handles caching for writes • Flexible: Configure DAX for one table or many • Scalable: scales-out to any workload with up to 10 read replicas • Manageability: fully integrated AWS service: Amazon CloudWatch, Tagging for DynamoDB, AWS Console • Security: Amazon VPC, AWS IAM, AWS CloudTrail, AWS Organizations Features DynamoDB Accelerator (DAX) DynamoDB Your Applications DynamoDB Accelerator
  13. 13. What did we just do? Scalability Performance Security Availability & Data Protection Manageability Development Platform AWS VPC EC2 App DDB SDK DynamoDB DAX SDK DAX
  14. 14. Fully managed, highly available
  15. 15. High Availability Scalability Performance Security Availability & Data Protection Manageability Development Platform AMAZON VPC EC2 App DAX SDK DynamoDB AZ1 AZ2 AZ3
  16. 16. DynamoDB API compatible
  17. 17. Q: How easy is it to add in- memory caching with DAX? A: Comment out the this code and add this code Scalability Performance Security Availability & Data Protection Manageability Development Platform
  18. 18. DAX is API compatible with DynamoDB • Read APIs: GetItem, BatchGetItem, Query, Scan • Modify APIs: PutItem, UpdateItem, DeleteItem, BatchWriteItem • Control plane APIs: Not supported (CreateTable, DeleteTable, etc.) Scalability Performance Security Availability & Data Protection Manageability Development Platform
  19. 19. Scalability Performance Security Availability & Data Protection Manageability Development Platform DAX has two caches Query Cache {query, scan} Item Cache {GetItem, PutItem} key, value query text, result set
  20. 20. Write-through
  21. 21. Scalability Performance Security Availability & Data Protection Manageability Development Platform DynamoDB Accelerator (DAX): Reads DynamoDB Your Applications DynamoDB Accelerator t=1 GetItem t=2 Cache Miss t=3 GetItem t=4 Populate cache t=5 Return item
  22. 22. Scalability Performance Security Availability & Data Protection Manageability Development Platform DynamoDB Accelerator (DAX): Reads DynamoDB Your Applications DynamoDB Accelerator t=1 GetItem t=2 Cache Hit t=3 Return item
  23. 23. Scalability Performance Security Availability & Data Protection Manageability Development Platform DynamoDB Accelerator (DAX): Write-through DynamoDB Your Applications DynamoDB Accelerator t=1 PutItem t=2 Write t=3 Populate cache t=4 Return item
  24. 24. Scalability Performance Security Availability & Data Protection Manageability Development Platform DynamoDB Accelerator (DAX): Read after Write DynamoDB Your Applications DynamoDB Accelerator t=1 GetItem t=2 Cache Hit t=3 Return item
  25. 25. Flexible
  26. 26. Scalability Performance Security Availability & Data Protection Manageability Development Platform DynamoDB Accelerator (DAX): Flexible DynamoDB Your Application DynamoDB Accelerator Table #1 DynamoDB Your Application DynamoDB Accelerator Table #1 Table #2 DynamoDB Your Applications DynamoDB Accelerator Table #1 DynamoDB Your Applications DynamoDB Accelerator Table #1 Table #2 One-to-One One-to-Many Many-to-One Many-to-Many
  27. 27. Scalable
  28. 28. Scaling DAX Scale-up . . . Scale Up (15.25 GiB to 244 GiB) Scale-out Scale Out (up to 10 replicas) . . . Scalability Performance Security Availability & Data Protection Manageability Development Platform
  29. 29. Manageability
  30. 30. Scalability Performance Security Availability & Data Protection Manageability Development Platform Amazon CloudWatch AWS Management Console Cost-based Tagging
  31. 31. Cache Eviction Scalability Performance Security Availability & Data Protection Manageability Development Platform Time-to-live (TTL) Least Recently Used (LRU) Write-through eviction
  32. 32. Security
  33. 33. VPC subnet IAM AWS CloudTrail Scalability Performance Security Availability & Data Protection Manageability Development Platform
  34. 34. Customer scenarios
  35. 35. Scalability Performance Security Availability & Data Protection Manageability Development Platform Customer Use Case #1: Unpredictable spikes
  36. 36. Scalability Performance Security Availability & Data Protection Manageability Development Platform Customer Use Case #2: Speed Response times in microseconds
  37. 37. Scalability Performance Security Availability & Data Protection Manageability Development Platform Customer Use Case #3: Hot keys RequestsPerSecond Item Primary Key Request Distribution Per Partition Key DynamoDB Requests Cache Hits
  38. 38. Scalability Performance Security Availability & Data Protection Manageability Development Platform Customer Use Cases DynamoDB App DAX DynamoDB App DynamoDB App Write-Through Cache Read-Through Cache Write-Back Cache (not available today) 1 2 34 1 3 42 1 23 DAX DAX
  39. 39. Scalability Performance Security Availability & Data Protection Manageability Development Platform Repeated users are now being handled by the DAX cache without making the more expensive (in both latency & cost) call to DynamoDB Shahar Kobrinky VP of Architecture and Scale at Eyeview “ ” DAX represents a big opportunity for us to find the optimal balance between infrastructure cost and system performance Brandon O’Brien Principle Software Engineer, Expedia, Inc. “ ” DynamoDB Accelerator (DAX)
  40. 40. Scalability Performance Security Availability & Data Protection Manageability Development Platform The AWS team has taken a best-practice architectural pattern and turned it into something repeatable and valuable for its customers Glenn Nethercutt Chief Architect, Genesys “ ” The ability to supercharge DynamoDB with DAX is something we're looking forward to Pat Malatack General Manager of Twilio Messaging “ ” DynamoDB Accelerator (DAX)
  41. 41. Scalability Performance Security Availability & Data Protection Manageability Development Platform Key Benefits • Fast performance: Microseconds response times at millions of reads/sec from single DAX cluster • Ease of use: DynamoDB API compatible - requires minimal code change for existing applications, simplifying developer experience • Lower costs: Reduce provisioned read capacity for DynamoDB tables for tables with hot data DynamoDB Accelerator (DAX) DynamoDB Your Applications DynamoDB Accelerator
  42. 42. Learn more Sign up for the DAX Preview https://goo.gl/txHZmQ Google ”DAX preview form”
  43. 43. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved aws.amazon.com/activate Don’t forget to take the survey! Up next: 11:30AM-12:00PM | Guest presentation: Amazon Fresh

×