Upgrade to Pro — share decks privately, control downloads, hide ads and more …

AWS DynamoDB Accelerator (DAX) 101

Ken Wagatsuma
February 14, 2020

AWS DynamoDB Accelerator (DAX) 101

Introduction to AWS DynamoDB Accelerator (DAX)

Ken Wagatsuma

February 14, 2020
Tweet

More Decks by Ken Wagatsuma

Other Decks in Programming

Transcript

  1. [DAX] Glossary of Terms 4 5FSN %FTDSJQUJPO /PEFT "OPEFJTUIFNJOJNVNDPNQPOFOUGPSB%"9DMVTUFSl1SJNBSZOPEFzIBOEMFSFBE 

    XSJUFSFRVFTUTBOElSFQMJDBOPEFTzPOMZIBOEMFSFBESFRVFTUT $MVTUFST "DMVTUFSJTDPNQPTFEGSPN OPEFT 1BSBNFUFS(SPVQT :PVDBODIBOHF55-CZTFUUJOHDVTUPN1BSBNFUFS(SPVQT
  2. [DAX] Comparison to other cache store 5 %"9 &MBTUJDBDIFNFNDBDIFE JONFNPSZ

    .BOBHFE ✅ ✅  4IBSFEDBDIF ✅ ✅  #BDLFOEEBUBTPVSDF %ZOBNP%#POMZ BOZUIJOH .Z42- %JTL 31$ FUD .FUSJDT ✅ ✅  55- ⚠ HMPCBM55- ✅ ⚠ IBSEXPSLSFRVJSFE 1FSGPSNBODF ЖdNT dNT ЖdЖ
  3. [DAX] Single-leader Replication 6 +3 nodes for different Multi-A/Z for

    production Background replication (eventually consistent model) Single “primary node” handles all write requests
  4. Subnet C Subnet B DAX Cluster Subnet A [DAX] Single-leader

    Replication - Write 7 Primary Replica Replica
  5. DAX Cluster [DAX] Single-leader Replication - Write 8 Primary Replica

    Replica Application DynamoDB Table DynamoDB Table Write Read
  6. DAX Cluster [DAX] Single-leader Replication - Replicate 9 Primary Replica

    Replica Application DynamoDB Table DynamoDB Table Write Read
  7. DAX Cluster [DAX] Single-leader Replication - Read 10 Primary Replica

    Replica Application DynamoDB Table DynamoDB Table Write Read
  8. [DAX] Cache Algorithm 11 Least Recently Used (LRU) cache Negative

    cache also implemented Eviction happens when items are taken & cache is full Global Time-To-Live (TTL)
  9. [DAX] Item Cache / Query Cache 12 Item Cache Query

    Cache Operation GetItem / BatchGetItem Query / Scan Metrics ItemCacheHits/ItemCacheMisses QueryCacheHits/QueryCacheMisses ScanCacheHits/ScanCacheMisses
  10. [DAX] Write Strategy 15 8SJUF5ISPVHI 8SJUF"SPVOE 1SPT 4ZODISPOJ[FEJUFNTCFUXFFO%"9 BOE%ZOBNP%# 8SJUFDBOTDBMF

    FHCVMLVQEBUF $POT ☹8SJUFPQFSBUJPOIBTPWFSIFBE ☹*UFNTDBOCFJODPOTJTUFOU JGPUIFS BQQXSJUFUP%ZOBNP%#EJSFDUMZ ☹&WFOUVBMMZ$POTJTUFOU JUFNTJO%"9 OPEFTDBOCFPVUEBUFE
  11. [DAX] Limitation 17 Maximum nodes is 10 (1 primary node

    + ~9 replica nodes) Maximum nodes is 50 per Region. Maximum Parameter Groups is 20 per Region Maximum DAX Subnet Groups is 50 per Region. Maximum subnets per groups is 20.
  12. [Alerting] CW Alarm - Cache Hit Ratio 27 ItemCacheHitRatio =

    ItemCacheHits / ( ItemCacheHits + ItemCacheMisses )