Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
AWS DynamoDB Accelerator (DAX) 101
Kenju Wagatsuma
February 14, 2020
Programming
2
6.1k
AWS DynamoDB Accelerator (DAX) 101
Introduction to AWS DynamoDB Accelerator (DAX)
Kenju Wagatsuma
February 14, 2020
Tweet
Share
More Decks by Kenju Wagatsuma
See All by Kenju Wagatsuma
Pregel Graph Compute Engines - Supersteps Exampls
kenju
0
88
Kafka on Kubernetes with Strimzi
kenju
0
66
Moden browser introduction
kenju
1
290
Cookpad summer internship 2019 - API
kenju
0
9.5k
Introduction to Design Patterns
kenju
0
9
GraphQL Asia 2019 "Re-architecture of a decade-old app with BFF/GraphQL"
kenju
0
8.6k
Introduction to TypeScript
kenju
0
630
Introduction to Programmatic Ad
kenju
0
100
社内管理システムのための技術選定
kenju
0
690
Other Decks in Programming
See All in Programming
An Advanced Introduction to R
nicetak
0
1.6k
kakutanitalk2022_opening_act
shirotamaki
0
100
ペパカレで入社した私が感じた2つのギャップと向き合い方
kosuke_ito
0
110
GCPでのバッチ処理パターンを考えてみる
satohjohn
1
200
Cloudflare Workersと状態管理
chimame
2
440
ちょうぜつ改め21世紀ふつうのソフトウェア設計
tanakahisateru
7
5.9k
TypeScript 4.9のas const satisfiesが便利
tonkotsuboy_com
9
2.2k
ECS Service Connectでマイクロサービスを繋いでみた
xblood
0
510
Istio⛵️によるサービスディスカバリーの仕組み
hiroki_hasegawa
3
1.3k
フロントエンドで 良いコードを書くために
t_keshi
3
1.6k
Excelの助けを借りて楽にシナリオを作ろう
rpa_niiyama
0
190
社会人 20 年目エンジニア、発信で技術学びなおしてる話
e99h2121
1
130
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
PRO
13
5.4k
GitHub's CSS Performance
jonrohan
1020
430k
Building Your Own Lightsaber
phodgson
96
4.9k
Intergalactic Javascript Robots from Outer Space
tanoku
261
26k
How New CSS Is Changing Everything About Graphic Design on the Web
jensimmons
214
12k
In The Pink: A Labor of Love
frogandcode
132
21k
A designer walks into a library…
pauljervisheath
198
16k
Git: the NoSQL Database
bkeepers
PRO
418
60k
We Have a Design System, Now What?
morganepeng
37
5.9k
Debugging Ruby Performance
tmm1
67
11k
Writing Fast Ruby
sferik
613
58k
Fontdeck: Realign not Redesign
paulrobertlloyd
74
4.3k
Transcript
DAX 101 1 2020/2/15 Kenju Wagatsuma
DAX Wrap Up 2
DAX is… DynamoDB-specific in-memory cache store 3
[DAX] Glossary of Terms 4 5FSN %FTDSJQUJPO /PEFT "OPEFJTUIFNJOJNVNDPNQPOFOUGPSB%"9DMVTUFSl1SJNBSZOPEFzIBOEMFSFBE
XSJUFSFRVFTUTBOElSFQMJDBOPEFTzPOMZIBOEMFSFBESFRVFTUT $MVTUFST "DMVTUFSJTDPNQPTFEGSPN OPEFT 1BSBNFUFS(SPVQT :PVDBODIBOHF55-CZTFUUJOHDVTUPN1BSBNFUFS(SPVQT
[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Ж
[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
Subnet C Subnet B DAX Cluster Subnet A [DAX] Single-leader
Replication - Write 7 Primary Replica Replica
DAX Cluster [DAX] Single-leader Replication - Write 8 Primary Replica
Replica Application DynamoDB Table DynamoDB Table Write Read
DAX Cluster [DAX] Single-leader Replication - Replicate 9 Primary Replica
Replica Application DynamoDB Table DynamoDB Table Write Read
DAX Cluster [DAX] Single-leader Replication - Read 10 Primary Replica
Replica Application DynamoDB Table DynamoDB Table Write Read
[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)
[DAX] Item Cache / Query Cache 12 Item Cache Query
Cache Operation GetItem / BatchGetItem Query / Scan Metrics ItemCacheHits/ItemCacheMisses QueryCacheHits/QueryCacheMisses ScanCacheHits/ScanCacheMisses
[DAX] Write Strategy - Write-Through 13 #write #read Application DAX
DynamoDB Application DAX DynamoDB
[DAX] Write Strategy - Write-Around 14 #write #read Application DynamoDB
Application DAX DynamoDB
[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
[DAX] Within VPC + Multi-A/Z 16
[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.
Monitoring 18
[Monitoring] CloudWatch Metrics 19 NFUSJDT EFTDSJQUJPO $166UJMJ[BUJPO PG$16VUJMJ[BUJPOUTNBMMVTFW$16 ⚠:PVOFFEUPTDBMFVQJGUIJTNFUSJDTJTTBUVSBUFE *UFN$BDIF)JUT
*UFN$BDIF.JTTFT $BMDVMBUF$BDIF)JU3BUJP GSPNUIFTFNFUSJDT ⚠*UFN$BDIF2VFSZ$BDIF
[Monitoring] CloudWatch Metrics 20 NFUSJDT EFTDSJQUJPO 5ISPUUMJOH3FRVFTU$PVOU PGSFRVFTUTUISPUUMFECZUIFOPEFPSDMVTUFS ⚠5ISPUUMFEBU%"95ISPUUMFEBU%ZOBNP%# 'BJMFE3FRVFTU$PVOU
PGSFRVFTUTUIBUSFTVMUFEJOBOFSSPSSFQPSUFE ⚠&SSPS3FR$PVOU5ISPUUMFE 'BJMFE
[Monitoring] CloudWatch Metrics 21 NFUSJDT EFTDSJQUJPO &WJDUFE4J[F ⚠*G$BDIF)JU3BUJP&WJDUFE4J[FJTHSPXJOH UIF XPSLJOHTFUNJHIUJODSFBTF4IPVMEDPOTJEFSTDBMFVQ
$MJFOU$POOFDUJPOT PGTJNVMUBOFPVTDPOOFDUJPOTGSPNDMJFOUT ⚠$MJFOU$PO$PVOU㲈PG3VOOJOH5BTLT
[Monitoring] Grafana 22
[Monitoring] SLI/SLO 23
Alerting 24
[Alerting] CW Alarm - Infrastructure 25 CW Alarm SNS Topic
Lambda Slack
[Alerting] CW Alarm - CPUUtilization 26
[Alerting] CW Alarm - Cache Hit Ratio 27 ItemCacheHitRatio =
ItemCacheHits / ( ItemCacheHits + ItemCacheMisses )
[Alerting] CW Alarm - Cache Hit Ratio 28
[Alerting] DAX Events - Infrastructure 29 DAX Event SNS Topic
Lambda Slack
[Alerting] DAX Events - Infrastructure 30 failure/success in adding a
node changes to the security groups