forked from aws-samples/custom-lens-wa-hub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustom-lens-documentDB.json
2198 lines (2197 loc) · 140 KB
/
custom-lens-documentDB.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"schemaVersion": "2021-11-01",
"_version":"1.1",
"_release_date":"2023-06-01",
"_release_note":"Added Sustainability pillar",
"_teams":{
"_authors":[
{
"name":"Karthik Vijayraghavan, Sr.Manager NoSQL DB Specialist SA, WWSO Database, AWS",
"email":"[email protected]"
},
{
"name":"Jack Hsu, Partner Solutions Architect, Taiwan, AWS",
"email":"[email protected]"
}
],
"_tech_reviewers":[
{
"name":"Bob Yeh, Well-Architected Geo SA, APAC",
"note":"Issue found - 'dollar-sign' required to describe the variable in the question. "
}
]
},
"name": "Amazon DocumentDB Best Practices",
"description": "Amazon DocumentDB Best Practices",
"pillars": [
{
"id": "docdb_ops",
"name": "Operational Excellence",
"questions": [
{
"id": "docdb_ops1",
"title": "How do you deploy Amazon DocumentDB clusters across regions / environments?",
"description": "Critical workloads with a global footprint have strict availability requirements and may need to tolerate a region-wide outage",
"choices": [
{
"id": "docdb_ops1_1",
"title": "Use Cloud Formation template for consistent environment configuration across regions / accounts.",
"helpfulResource": {
"displayText": "AWS CloudFormation is a service that helps you model and set up your AWS resources so that you can spend less time managing those resources and more time focusing on your applications that run in AWS.",
"url": "https://docs.aws.amazon.com/en_us/AWSCloudFormation/latest/UserGuide/Welcome.html"
},
"improvementPlan": {
"displayText": "Use Cloud Formation template for consistent environment configuration across regions / accounts.",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/quick_start_cfn.html"
}
},
{
"id": "docdb_ops1_3",
"title": "Configure subnet groups with 3 AZs with minimum 2 instances.",
"helpfulResource": {
"displayText": "Each DB subnet group should have subnets in at least two Availability Zones in a given Region. When creating a DB cluster in a VPC, you must select a DB subnet group. Amazon DocumentDB uses that DB subnet group and your preferred Availability Zone to select a subnet and an IP address within that subnet to associate with your cluster.",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/document-db-subnet-groups.html"
},
"improvementPlan": {
"displayText": "Amazon DocumentDB instances can be provisioned in up to three AZs.",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/document-db-subnet-group-create.html"
}
},
{
"id": "docdb_ops1_4",
"title": "Use Cluster endpoint",
"helpfulResource": {
"displayText": "A cluster endpoint is an endpoint for an Amazon DocumentDB cluster that connects to the current primary instance for the cluster.",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/endpoints.html"
},
"improvementPlan": {
"displayText": "You can find a cluster's cluster endpoint and reader endpoint using the Amazon DocumentDB console or AWS CLI.",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/db-cluster-endpoints-find.html"
}
},
{
"id": "docdb_ops1_5",
"title": "Script global cluster failover and externalize endpoint lookup for applications",
"helpfulResource": {
"displayText": "Failover is automatically handled by Amazon DocumentDB so that your applications can resume database operations as quickly as possible without administrative intervention.",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/failover.html"
},
"improvementPlan": {
"displayText": "Amazon DocumentDB provides multiple connection options to serve a wide range of use cases.",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/how-it-works.html#how-it-works.endpoints"
}
},
{
"id": "docdb_ops1_6",
"title": "None of above",
"helpfulResource": {
"displayText": "-"
},
"improvementPlan": {
"displayText": "-"
}
}
],
"riskRules": [
{
"condition": "docdb_ops1_1 && docdb_ops1_3 && docdb_ops1_4 && docdb_ops1_5 && docdb_ops1_6",
"risk": "NO_RISK"
},
{
"condition": "(!docdb_ops1_1) || (!docdb_ops1_3) || (!docdb_ops1_4) || (!docdb_ops1_6)",
"risk": "HIGH_RISK"
},
{
"condition": "default",
"risk": "MEDIUM_RISK"
}
]
},
{
"id": "docdb_ops2",
"title": "How do you track and test changes to cluster configuration?",
"description": "Controlled changes are necessary to deploy new functionality. If these changes are uncontrolled, then it makes it difficult to predict the effect of these changes or to address issues that arise because of them.",
"choices": [
{
"id": "docdb_ops2_1",
"title": "Define AWS config rules to validate Amazon DocumentDB best practices",
"helpfulResource": {
"displayText": "AWS Config allows you to create rules and configure resources so they comply with the standards enforced by your organization.",
"url": "https://aws.amazon.com/blogs/database/evaluate-amazon-documentdb-with-mongodb-compatibility-configurations-using-aws-config/"
},
"improvementPlan": {
"displayText": "Use AWS Config managed rules for evaluating and validating Amazon DocumentDB for best practices",
"url": "https://aws.amazon.com/blogs/database/evaluate-amazon-documentdb-with-mongodb-compatibility-configurations-using-aws-config/"
}
},
{
"id": "docdb_ops2_2",
"title": "Trigger AWS CloudWatch events rules for AWS config events",
"helpfulResource": {
"displayText": "When the trigger for a rule occurs, AWS Config invokes the rule's AWS Lambda function by publishing an event",
"url": "https://docs.aws.amazon.com/config/latest/developerguide/evaluate-config_develop-rules_example-events.html"
},
"improvementPlan": {
"displayText": "Trigger AWS CloudWatch events rules for AWS config events",
"url": "https://docs.aws.amazon.com/config/latest/developerguide/evaluate-config_develop-rules_example-events.html"
}
},
{
"id": "docdb_ops2_3",
"title": "Benchmark Amazon DocumentDB cluster for performance",
"helpfulResource": {
"displayText": "Monitor performance metrics on a regular basis to see the average, maximum, and minimum values for a variety of time ranges.",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/best_practices.html#best_practices-performance"
},
"improvementPlan": {
"displayText": "Benchmark Amazon DocumentDB cluster for performance",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/best_practices.html#best_practices-performance"
}
},
{
"id": "docdb_ops2_4",
"title": "None of above",
"helpfulResource": {
"displayText": "-"
},
"improvementPlan": {
"displayText": "-"
}
}
],
"riskRules": [
{
"condition": "docdb_ops2_1 && docdb_ops2_2 && docdb_ops2_3 && docdb_ops2_4",
"risk": "NO_RISK"
},
{
"condition": "(!docdb_ops2_3) || (!docdb_ops2_4)",
"risk": "HIGH_RISK"
},
{
"condition": "default",
"risk": "MEDIUM_RISK"
}
]
},
{
"id": "docdb_ops3",
"title": "How do you evaluate operational readiness of your workload?",
"description": "\nEvaluate the operational readiness of your workload, processes, procedures and personnel to understand the operational risks related to your workload.",
"choices": [
{
"id": "docdb_ops3_1",
"title": "Use AWS IAM to control access to Amazon DocumentDB resources",
"helpfulResource": {
"displayText": "Every AWS resource is owned by an AWS account and permissions to create or access the resources are governed by permissions policies. An account administrator can attach permissions policies to IAM identities.",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/UsingWithRDS.IAM.AccessControl.Overview.html"
},
"improvementPlan": {
"displayText": "Use AWS IAM to control access to Amazon DocumentDB resources",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/UsingWithRDS.IAM.AccessControl.Overview.html"
}
},
{
"id": "docdb_ops3_2",
"title": "Use playbooks to define operational readiness",
"helpfulResource": {
"displayText": "Runbooks are documented procedures to achieve specific outcomes. Enable consistent and prompt responses to well-understood events by documenting procedures in runbooks.",
"url": "https://docs.aws.amazon.com/wellarchitected/latest/framework/a-prepare.html"
},
"improvementPlan": {
"displayText": "Use playbooks to define operational readiness. ",
"url": "https://docs.aws.amazon.com/wellarchitected/latest/framework/a-prepare.html"
}
},
{
"id": "docdb_ops3_3",
"title": "Run periodic readiness tests, according to existing playbooks",
"helpfulResource": {
"displayText": "Implement runbooks as code and trigger the execution of runbooks in response to events, where appropriate, to ensure consistency, speed responses and reduce errors caused by manual processes.",
"url": "https://docs.aws.amazon.com/wellarchitected/latest/framework/a-prepare.html"
},
"improvementPlan": {
"displayText": "Periodically running readiness tests according to existing playbooks",
"url": "https://docs.aws.amazon.com/wellarchitected/latest/framework/a-prepare.html"
}
},
{
"id": "docdb_ops3_4",
"title": "None of above",
"helpfulResource": {
"displayText": "-"
},
"improvementPlan": {
"displayText": "-"
}
}
],
"riskRules": [
{
"condition": "docdb_ops3_1 && docdb_ops3_2 && docdb_ops3_3 && docdb_ops3_4",
"risk": "NO_RISK"
},
{
"condition": "(!docdb_ops3_4)",
"risk": "HIGH_RISK"
},
{
"condition": "default",
"risk": "MEDIUM_RISK"
}
]
},
{
"id": "docdb_ops4",
"title": "How do you monitor your Amazon DocumentDB cluster(s)?",
"description": "Define, capture, and analyze workload metrics to gain visibility to workload events and take appropriate action.",
"choices": [
{
"id": "docdb_ops4_1",
"title": "Configure application to log database connectivity response times & errors.",
"helpfulResource": {
"displayText": "-"
},
"improvementPlan": {
"displayText": "-"
}
},
{
"id": "docdb_ops4_2",
"title": "Create AWS CloudWatch dashboard and alarms for key metrics and application logs.",
"helpfulResource": {
"displayText": "Amazon CloudWatch dashboards are customizable home pages in the CloudWatch console that you can use to monitor your resources in a single view, even those resources that are spread across different Regions.",
"url": "https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Dashboards.html"
},
"improvementPlan": {
"displayText": "Create AWS CloudWatch dashboard and alarms for key metrics and application logs.",
"url": "https://catalog.us-east-1.prod.workshops.aws/workshops/464d6c17-9faa-4fef-ac9f-dd49610174d3/monitoring"
}
},
{
"id": "docdb_ops4_3",
"title": "Define log insight queries for profiler and audit logs",
"helpfulResource": {
"displayText": "Amazon DocumentDB has a profiler that logs any database operations that take longer than some period of time (e.g. 100 ms). You can use the profiler logs to identify queries that are taking a long time to run.",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/profiling.html"
},
"improvementPlan": {
"displayText": "Define log insight queries for profiler and audit logs",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/profiling.html"
}
},
{
"id": "docdb_ops4_4",
"title": "Tag instances for organization, identification and cost accounting",
"helpfulResource": {
"displayText": "You can use Amazon DocumentDB (with MongoDB compatibility) tags to add metadata to your Amazon DocumentDB resources. These tags can be used with AWS Identity and Access Management (IAM) policies to manage access to Amazon DocumentDB resources and to control what actions can be applied to the resources.",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/tagging.html"
},
"improvementPlan": {
"displayText": "Tag instances for organization, identification and cost accounting",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/tagging.html"
}
},
{
"id": "docdb_ops4_5",
"title": "None of above",
"helpfulResource": {
"displayText": "-"
},
"improvementPlan": {
"displayText": "-"
}
}
],
"riskRules": [
{
"condition": "docdb_ops4_1 && docdb_ops4_2 && docdb_ops4_3",
"risk": "NO_RISK"
},
{
"condition": "(!docdb_ops4_2) || (!docdb_ops4_3)",
"risk": "HIGH_RISK"
},
{
"condition": "default",
"risk": "MEDIUM_RISK"
}
]
},
{
"id": "docdb_ops6",
"title": "How do you manage lifecycle of manual snapshots?",
"description": "A manual snapshot is a full backup that is deleted only when you manually delete it using the AWS Management Console or AWS CLI. You cannot manually delete an automatic snapshot because automatic snapshots are deleted only when the snapshot's retention period expires or you delete the snapshot's cluster.",
"choices": [
{
"id": "docdb_ops6_2",
"title": "Create jobs to periodically remove manual snapshots",
"helpfulResource": {
"displayText": "A manual snapshot is a full backup that is deleted only when you manually delete it using the AWS Management Console or AWS CLI.",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/backup_restore-compare_automatic_manual_snapshots.html"
},
"improvementPlan": {
"displayText": "Create jobs to periodically remove manual snapshots.",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/best_practices.html#best_practices-cost_optimization"
}
},
{
"id": "docdb_ops6_3",
"title": "Use AWS Backup to centrally manage Amazon DocumentDB backup",
"helpfulResource": {
"displayText": "With AWS Backup you can centrally manage and govern the data protection policy of Amazon DocumentDB snapshots, alongside other supported AWS services.",
"url": "https://aws.amazon.com/blogs/storage/manage-backup-and-restore-of-amazon-documentdb-with-aws-backup/"
},
"improvementPlan": {
"displayText": "Use AWS Backup to centrally manage Amazon DocumentDB backup.",
"url": "https://aws.amazon.com/blogs/storage/manage-backup-and-restore-of-amazon-documentdb-with-aws-backup/"
}
},
{
"id": "docdb_ops6_4",
"title": "None of above",
"helpfulResource": {
"displayText": "-"
},
"improvementPlan": {
"displayText": "-"
}
}
],
"riskRules": [
{
"condition": "docdb_ops6_2 && docdb_ops6_3 && docdb_ops6_4",
"risk": "NO_RISK"
},
{
"condition": "(!docdb_ops6_4)",
"risk": "HIGH_RISK"
},
{
"condition": "default",
"risk": "MEDIUM_RISK"
}
]
}
]
},
{
"id": "docdb_perf",
"name": "Performance Efficiency",
"questions": [
{
"id": "docdb_perf1",
"title": "What are your query access patterns?",
"description": "Access patterns for the application dictate the schema structure of documents stored in the database. Schema flexibility offered by JSON allows you to make changes quickly, making document databases an ideal choice for agile development.",
"choices": [
{
"id": "docdb_perf1_1",
"title": "Optimize access patterns for compute, NOT storage",
"helpfulResource": {
"displayText": "Storing infrequently accessed fields in a separate document helps reduce I/O utilization and improve performance.",
"url": "https://aws.amazon.com/blogs/database/document-modeling-with-amazon-documentdb-and-hackolade/"
},
"improvementPlan": {
"displayText": "When mutable and immutable parts of the documents are separated, performance and I/O optimization is optimized because updates modify smaller mutable documents."
}
},
{
"id": "docdb_perf1_2",
"title": "Document size smaller than 8KB",
"helpfulResource": {
"displayText": "I/Os are input/output operations performed by Amazon DocumentDB against a solid state drive (SSD)-based virtualized storage layer. Every database page read operation counts as one I/O.",
"url": "https://aws.amazon.com/documentdb/faqs/?nc1=h_ls"
},
"improvementPlan": {
"displayText": "-"
}
},
{
"id": "docdb_perf1_3",
"title": "Separate mutable & immutable parts of document",
"helpfulResource": {
"displayText": "Amazon DocumentDB issues reads against the storage layer in order to fetch pages not present in the buffer cache. Each page is 8 KB in Amazon DocumentDB. When mutable and immutable parts of the documents are separated, performance and I/O optimization is optimized because updates modify smaller mutable documents.",
"url": "https://aws.amazon.com/blogs/database/document-modeling-with-amazon-documentdb-and-hackolade/"
},
"improvementPlan": {
"displayText": "Separate mutable & immutable parts of document",
"url": "https://aws.amazon.com/blogs/database/document-modeling-with-amazon-documentdb-and-hackolade/"
}
},
{
"id": "docdb_perf1_4",
"title": "Use logical modeling and selective denormalization",
"helpfulResource": {
"displayText": "Use selective denormalization to logically model your entity. In document databases, its a common practice to duplicate data. But ensure that you dont increase the document size significantly by excessive denormalization",
"url": "https://aws.amazon.com/blogs/database/document-modeling-with-amazon-documentdb-and-hackolade/"
},
"improvementPlan": {
"displayText": "Use logical modeling and selective denormalization",
"url": "https://aws.amazon.com/blogs/database/document-modeling-with-amazon-documentdb-and-hackolade/"
}
},
{
"id": "docdb_perf1_5",
"title": "Use index in fields with high cardinality",
"helpfulResource": {
"displayText": "By choosing fields that have high cardinality, such as an identity field, you increase the index selectivity. Conversely, choosing a low cardinality field, such as Boolean where there are only two unique values, can retrieve more information than is needed, which increases memory usage and the risk of going into the distributed storage volume. The goal with index selectivity is to allow the query to filter as much data as possible up front, thereby letting the query processor do less work.",
"url": "https://aws.amazon.com/blogs/database/how-to-index-on-amazon-documentdb-with-mongodb-compatibility/"
},
"improvementPlan": {
"displayText": "Use index in fields with high cardinality",
"url": "https://aws.amazon.com/blogs/database/how-to-index-on-amazon-documentdb-with-mongodb-compatibility/"
}
},
{
"id": "docdb_perf1_6",
"title": "None of above",
"helpfulResource": {
"displayText": "-"
},
"improvementPlan": {
"displayText": "-"
}
}
],
"riskRules": [
{
"condition": "docdb_perf1_1 && docdb_perf1_2 && docdb_perf1_3 && docdb_perf1_4 && docdb_perf1_5 && docdb_perf1_6",
"risk": "NO_RISK"
},
{
"condition": "(!docdb_perf1_1) || (!docdb_perf1_3) || (!docdb_perf1_5) || (!docdb_perf1_6)",
"risk": "HIGH_RISK"
},
{
"condition": "default",
"risk": "MEDIUM_RISK"
}
]
},
{
"id": "docdb_perf2",
"title": "How does your application access data?",
"description": "How you access data will affect how the application performs. Access patterns define how the users and the system access the data to satisfy business needs.",
"choices": [
{
"id": "docdb_perf2_1",
"title": "Use bulk operations over individual",
"helpfulResource": {
"displayText": "You can run bulk update and insert operations for multiple records using a multi-statement. This will reduce the amount of connections and roundtrips between the database and client."
},
"improvementPlan": {
"displayText": "Use bulk operations over individual"
}
},
{
"id": "docdb_perf2_2",
"title": "Use operators with optimizations such as hint and project",
"helpfulResource": {
"displayText": "Customers who want control over their query plan can use the hint() operator to enforce selection of a preferred index. Use the project() operator return only those fields you need so as to avoid processing more data than is necessary."
},
"improvementPlan": {
"displayText": "Use operators with optimizations such as hint() and project()"
}
},
{
"id": "docdb_perf2_3",
"title": "Avoid sub optimal operators such as distinct(), ne(), nin()",
"helpfulResource": {
"displayText": "Avoid sub-optimal operators such as aggregation operator distinct(), Comparison Operators ne(), nin()"
},
"improvementPlan": {
"displayText": "Avoid sub optimal operators like $distinct (for multi key), $ne, $nin"
}
},
{
"id": "docdb_perf2_4",
"title": "None of above",
"helpfulResource": {
"displayText": "-"
},
"improvementPlan": {
"displayText": "-"
}
}
],
"riskRules": [
{
"condition": "docdb_perf2_1 && docdb_perf2_2 && docdb_perf2_3 && docdb_perf2_4",
"risk": "NO_RISK"
},
{
"condition": "(!docdb_perf2_2) || (!docdb_perf2_4)",
"risk": "HIGH_RISK"
},
{
"condition": "default",
"risk": "MEDIUM_RISK"
}
]
},
{
"id": "docdb_perf3",
"title": "How do your customers, across the globe, access data?",
"description": "If you have offices around the world, you can use a global cluster to keep your main sources of information updated in the primary region.",
"choices": [
{
"id": "docdb_perf3_1",
"title": "Leverage global clusters for local reads per region.",
"helpfulResource": {
"displayText": "A global cluster consists of one primary region and up to five, read-only, secondary regions.",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/global-clusters.html"
},
"improvementPlan": {
"displayText": "Issue write operations directly to the primary cluster in the primary region and Amazon DocumentDB automatically replicates the data to the secondary regions using dedicated infrastructure."
}
},
{
"id": "docdb_perf3_2",
"title": "None of above",
"helpfulResource": {
"displayText": "-"
},
"improvementPlan": {
"displayText": "-"
}
}
],
"riskRules": [
{
"condition": "docdb_perf3_1 && docdb_perf3_2",
"risk": "NO_RISK"
},
{
"condition": "(!docdb_perf3_2)",
"risk": "HIGH_RISK"
},
{
"condition": "default",
"risk": "MEDIUM_RISK"
}
]
},
{
"id": "docdb_perf4",
"title": "How does your application connect to your Amazon DocumentDB cluster(s)?",
"description": "_",
"choices": [
{
"id": "docdb_perf4_1",
"title": "Connect as replica set and use replica reads for scalability.",
"helpfulResource": {
"displayText": "Amazon DocumentDB has three endpoints that you can use to connect to your cluster:\nCluster endpoint\nReader endpoint\nInstance endpoints",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/connect-to-replica-set.html"
},
"improvementPlan": {
"displayText": "If the application can handle eventual consistency, we recommend that you connect to your cluster as a replica set and distribute reads to replica instances using the built-in read preference capabilities of your driver."
}
},
{
"id": "docdb_perf4_2",
"title": "Deploy the application in same AZs as the Amazon DocumentDB cluster.",
"helpfulResource": {
"displayText": "Amazon DocumentDB provides you the ability to place resources, such as instances, and data in multiple locations.",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/regions-and-azs.html"
},
"improvementPlan": {
"displayText": "Deploy the application in same AZs as the Amazon DocumentDB cluster."
}
},
{
"id": "docdb_perf4_3",
"title": "None of above",
"helpfulResource": {
"displayText": "-"
},
"improvementPlan": {
"displayText": "-"
}
}
],
"riskRules": [
{
"condition": "docdb_perf4_1 && docdb_perf4_2 && docdb_perf4_3",
"risk": "NO_RISK"
},
{
"condition": "(!docdb_perf4_1) || (!docdb_perf4_3)",
"risk": "HIGH_RISK"
},
{
"condition": "default",
"risk": "MEDIUM_RISK"
}
]
},
{
"id": "docdb_perf5",
"title": "How many concurrent requests does the application support?",
"description": "To optimize instance performance and response time, it is recommended to evaluate database connection constraints when observing a significant increase in user connections. The appropriate number of user connections for your instance depends on factors such as the instance class and the complexity of the operations being executed.",
"choices": [
{
"id": "docdb_perf5_1",
"title": "Configure workload specific connection parameters.",
"helpfulResource": {
"displayText": "Configure workload specific connection parameters.",
"url": "https://aws.amazon.com/blogs/database/building-resilient-applications-with-amazon-documentdb-with-mongodb-compatibility-part-1-client-configuration/"
},
"improvementPlan": {
"displayText": "Configure workload specific connection parameters.",
"url": "https://aws.amazon.com/blogs/database/building-resilient-applications-with-amazon-documentdb-with-mongodb-compatibility-part-1-client-configuration/"
}
},
{
"id": "docdb_perf5_2",
"title": "Validate instance size against connection limits.",
"helpfulResource": {
"displayText": "The following table describes Amazon DocumentDB limits per instance.",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/limits.html#limits.instance"
},
"improvementPlan": {
"displayText": "Validate instance size against connection limits\n\nLimit Connections : CoudWatch metrics DatabaseConnectionsMax\nThe maximum number of open database connections on an instance in a one-minute period.\n",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/limits.html#limits.instance"
}
},
{
"id": "docdb_perf5_3",
"title": "None of above",
"helpfulResource": {
"displayText": "-"
},
"improvementPlan": {
"displayText": "-"
}
}
],
"riskRules": [
{
"condition": "docdb_perf5_1 && docdb_perf5_2 && docdb_perf5_3",
"risk": "NO_RISK"
},
{
"condition": "(!docdb_perf5_1) || (!docdb_perf5_2) || (!docdb_perf5_3)",
"risk": "HIGH_RISK"
},
{
"condition": "default",
"risk": "MEDIUM_RISK"
}
]
},
{
"id": "docdb_perf6",
"title": "How did you size your cluster?",
"description": "Continuous right sizing is a crucial practice for cost control in the cloud environment. It entails regularly assessing the performance, usage patterns, and requirements of instances, and taking appropriate actions such as turning off idle instances and optimizing instances that are either overprovisioned or not well-suited for the workload. By adopting this approach, you can effectively manage cloud costs while ensuring optimal resource allocation.",
"choices": [
{
"id": "docdb_perf6_1",
"title": "Use data characteristics to size workload.",
"helpfulResource": {
"displayText": "Use this simple form to provide aggregated input for your workload to determine cluster sizing.\n\nThis form provides sizing recommendation for a single collection in the cluster.",
"url": "https://sizing.cloudnativedb.com/"
},
"improvementPlan": {
"displayText": "Use data characteristics to size workload.",
"url": "https://sizing.cloudnativedb.com/"
}
},
{
"id": "docdb_perf6_2",
"title": "Ensure Indices and working set fit in cache.",
"helpfulResource": {
"displayText": "One of Amazon DocumentDB best practice is to choose an instance type with enough RAM to fit your working set (i.e., data and indexes) in memory.",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/best_practices.html"
},
"improvementPlan": {
"displayText": "Having properly sized instances will help optimize for overall performance and potentially minimize I/O cost."
}
},
{
"id": "docdb_perf6_3",
"title": "Validate sizing by performing load test and scale as needed.",
"helpfulResource": {
"displayText": "Visualize the load to determine when and where the load is on the database",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/performance-insights.html"
},
"improvementPlan": {
"displayText": "Performance Insights adds to the existing Amazon DocumentDB monitoring features to illustrate your cluster performance and help you analyze any issues that affect it. With the Performance Insights dashboard, you can visualize the database load and filter the load by waits, query statements, hosts, or application."
}
},
{
"id": "docdb_perf6_4",
"title": "None of above",
"helpfulResource": {
"displayText": "-"
},
"improvementPlan": {
"displayText": "-"
}
}
],
"riskRules": [
{
"condition": "docdb_perf6_1 && docdb_perf6_2 && docdb_perf6_3 && docdb_perf6_4",
"risk": "NO_RISK"
},
{
"condition": "(!docdb_perf6_2) || (!docdb_perf6_3) || (!docdb_perf6_4)",
"risk": "HIGH_RISK"
},
{
"condition": "default",
"risk": "MEDIUM_RISK"
}
]
},
{
"id": "docdb_perf7",
"title": "How do you monitor performance of your cluster?",
"description": "Monitor performance metrics on a regular basis to see the average, maximum, and minimum values for a variety of time ranges. This helps you identify when performance is degraded.",
"choices": [
{
"id": "docdb_perf7_1",
"title": "Monitor performance to determine scaling needs.",
"helpfulResource": {
"displayText": "Amazon DocumentDB best practice is to choose an instance type with enough RAM to fit your working set (i.e. most frequently accessed data and indexes). Having properly sized instances will help optimize for overall performance and potentially minimize I/O cost.",
"url": "https://aws.amazon.com/blogs/database/monitoring-metrics-and-setting-up-alarms-on-your-amazon-documentdb-with-mongodb-compatibility-clusters/"
},
"improvementPlan": {
"displayText": "You can monitor Amazon DocumentDB Metrics at the cluster or instance level. In addition, other services can use the metrics, such as Amazon Simple Notification Service (Amazon SNS) to set notification alarms when a metric breaches a predefined threshold.",
"url": "https://aws.amazon.com/blogs/database/monitoring-metrics-and-setting-up-alarms-on-your-amazon-documentdb-with-mongodb-compatibility-clusters/"
}
},
{
"id": "docdb_perf7_2",
"title": "Implement autoscaling",
"helpfulResource": {
"displayText": "Automatically add or remove read replicas based on cluster load.",
"url": "https://aws.amazon.com/blogs/database/amazon-documentdb-with-mongodb-compatibility-read-autoscaling/"
},
"improvementPlan": {
"displayText": "Implement autoscaling.",
"url": "https://aws.amazon.com/blogs/database/amazon-documentdb-with-mongodb-compatibility-read-autoscaling/"
}
},
{
"id": "docdb_perf7_3",
"title": "None of above",
"helpfulResource": {
"displayText": "-"
},
"improvementPlan": {
"displayText": "-"
}
}
],
"riskRules": [
{
"condition": "docdb_perf7_1 && docdb_perf7_2 && docdb_perf7_3",
"risk": "NO_RISK"
},
{
"condition": "(!docdb_perf7_1) || (!docdb_perf7_3)",
"risk": "HIGH_RISK"
},
{
"condition": "default",
"risk": "MEDIUM_RISK"
}
]
}
]
},
{
"id": "docdb_rel",
"name": "Reliability",
"questions": [
{
"id": "docdb_rel1",
"title": "How are you meeting your RPO and RTO with Amazon DocumentDB?",
"description": "Recovery from disaster is typically measured using values for RTO and RPO.\nRecovery time objective (RTO) is the maximum acceptable delay between the interruption of service and restoration of service. In other words, RTO measures downtime. For a global cluster, RTO can be in the order of minutes.\nRecovery point objective (RPO) is the maximum acceptable amount of time since the last data recovery point. For a global cluster, RPO is typically measured in seconds.",
"choices": [
{
"id": "docdb_rel1_1",
"title": "Select backup retention period based on RPO",
"helpfulResource": {
"displayText": "Amazon DocumentDB (with MongoDB compatibility) continuously backs up your data to Amazon Simple Storage Service (Amazon S3) for up to 35 days, so that you can quickly restore to any point within the backup retention period.",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/backup_restore.html"
},
"improvementPlan": {
"displayText": "Select backup retention period based on RPO",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/backup_restore.html"
}
},
{
"id": "docdb_rel1_2",
"title": "Use global clusters for low RTO requirements",
"helpfulResource": {
"displayText": "A global cluster consists of one primary region and up to five read-only secondary regions. You issue write operations directly to the primary cluster in the primary region and Amazon DocumentDB automatically replicates the data to the secondary regions using dedicated infrastructure. Latency is typically under a second.",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/global-clusters.html"
},
"improvementPlan": {
"displayText": "A global cluster consists of one primary region and up to five read-only secondary regions. You issue write operations directly to the primary cluster in the primary region and Amazon DocumentDB automatically replicates the data to the secondary regions using dedicated infrastructure. Latency is typically under a second.",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/global-clusters.html"
}
},
{
"id": "docdb_rel1_3",
"title": "Retain manual snapshots beyond retention period based on purge requirements",
"helpfulResource": {
"displayText": "You can create a manual snapshot using either the AWS Management Console or AWS CLI. The amount of time it takes to create a snapshot varies with the size of your databases. When you create a snapshot, you must do the following:",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/backup_restore-create_manual_cluster_snapshot.html"
},
"improvementPlan": {
"displayText": "Retain manual snapshots beyond retention period based on purge requirements",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/backup_restore-create_manual_cluster_snapshot.html"
}
},
{
"id": "docdb_rel1_4",
"title": "None of above",
"helpfulResource": {
"displayText": "-"
},
"improvementPlan": {
"displayText": "-"
}
}
],
"riskRules": [
{
"condition": "docdb_rel1_1 && docdb_rel1_2 && docdb_rel1_3 && docdb_rel1_4",
"risk": "NO_RISK"
},
{
"condition": "(!docdb_rel1_1) || (!docdb_rel1_2) || (!docdb_rel1_4)",
"risk": "HIGH_RISK"
},
{
"condition": "default",
"risk": "MEDIUM_RISK"
}
]
},
{
"id": "docdb_rel2",
"title": "How do you support Disaster Recovery (DR) requirements?",
"description": "Disaster recovery strategies available to you within AWS can be broadly categorized into four approaches, ranging from the low cost and low complexity of making backups to more complex strategies using multiple active Regions.",
"choices": [
{
"id": "docdb_rel2_1",
"title": "Use global clusters for DR requirements",
"helpfulResource": {
"displayText": "A global cluster consists of one primary region and up to five read-only secondary regions. You issue write operations directly to the primary cluster in the primary region and Amazon DocumentDB automatically replicates the data to the secondary regions using dedicated infrastructure. Latency is typically under a second.",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/global-clusters.html"
},
"improvementPlan": {
"displayText": "Use global clusters for DR requirements",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/global-clusters.html"
}
},
{
"id": "docdb_rel2_2",
"title": "Use cluster snapshot copy for flexible RTO requirements",
"helpfulResource": {
"displayText": "In Amazon DocumentDB, you can copy manual and automatic snapshots within the same AWS Region or to a different AWS Region within the same account. You can also share snapshots owned by other AWS accounts in the same AWS Region.",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/backup_restore-copy_cluster_snapshot.html"
},
"improvementPlan": {
"displayText": "Use cluster snapshot copy for flexible RTO requirements",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/backup_restore-copy_cluster_snapshot.html"
}
},
{
"id": "docdb_rel2_3",
"title": "None of above",
"helpfulResource": {
"displayText": "-"
},
"improvementPlan": {
"displayText": "-"
}
}
],
"riskRules": [
{
"condition": "docdb_rel2_1 && docdb_rel2_2 && docdb_rel2_3",
"risk": "NO_RISK"
},
{
"condition": "(!docdb_rel2_1) || (!docdb_rel2_3)",
"risk": "HIGH_RISK"
},
{
"condition": "default",
"risk": "MEDIUM_RISK"
}
]
},
{
"id": "docdb_rel3",
"title": "How does your application handle exceptions from Amazon DocumentDB?",
"description": "In certain cases, such as certain types of planned maintenance, or in the unlikely event of a primary node or Availability Zone failure, Amazon DocumentDB (with MongoDB compatibility) detects the failure and replaces the primary node. So that your applications can resume database operations as quickly as possible without administrative intervention.",
"choices": [
{
"id": "docdb_rel3_1",
"title": "Implement exception handling with retry techniques",
"helpfulResource": {
"displayText": "It's important to understand the exceptions that an application should tolerate and how to handle them efficiently.",
"url": "https://aws.amazon.com/blogs/database/building-resilient-applications-with-amazon-documentdb-with-mongodb-compatibility-part-2-exception-handling/"
},
"improvementPlan": {
"displayText": "Implement exception handling with retry techniques.",
"url": "https://aws.amazon.com/blogs/database/building-resilient-applications-with-amazon-documentdb-with-mongodb-compatibility-part-2-exception-handling/"
}
},
{
"id": "docdb_rel3_2",
"title": "None of above",
"helpfulResource": {
"displayText": "-"
},
"improvementPlan": {
"displayText": "-"
}
}
],
"riskRules": [
{
"condition": "docdb_rel3_1 && docdb_rel3_2",
"risk": "NO_RISK"
},
{
"condition": "(!docdb_rel3_1) || (!docdb_rel3_2)",
"risk": "HIGH_RISK"
},
{
"condition": "default",
"risk": "MEDIUM_RISK"
}
]
},
{
"id": "docdb_rel4",
"title": "How do you manage client connections to clusters?",
"description": "Consider constraining database connections if you see high numbers of user connections in conjunction with decreases in instance performance and response time. The best number of user connections for your instance will vary based on your instance class and the complexity of the operations being performed.",
"choices": [
{
"id": "docdb_rel4_1",
"title": "Configure clients for connection and cursor management:",
"helpfulResource": {
"displayText": "The MongoDB drivers you use to connect to Amazon DocumentDB provide different parameters and it’s important to understand how these parameters impact your application behavior and what to consider when determining appropriate values for these configurations. Follow the link below to find more information.",
"url": "https://aws.amazon.com/blogs/database/building-resilient-applications-with-amazon-documentdb-with-mongodb-compatibility-part-1-client-configuration/"
},
"improvementPlan": {
"displayText": "Configure clients for connection and cursor management:",
"url": "https://aws.amazon.com/blogs/database/building-resilient-applications-with-amazon-documentdb-with-mongodb-compatibility-part-1-client-configuration/"
}
},
{
"id": "docdb_rel4_2",
"title": "Use (allowDiskUse: true) for aggregate queries",
"helpfulResource": {
"displayText": "By default, Amazon DocumentDB will utilize the hash algorithm when allowDiskUse:false is used and sort merge when allowDiskUse:true is used. For some use cases, it may be desirable to force the query optimizer to use a different algorithm.",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/functional-differences.html"
},
"improvementPlan": {
"displayText": "Use (allowDiskUse: true) for aggregate queries",
"url": "https://docs.aws.amazon.com/documentdb/latest/developerguide/functional-differences.html"
}