DocumentDB Flashcards

1
Q

Overview of DOcDB

  • fully managed (non-rlational)document DB for MOngoDB workloads
  • JSON documents(nested key value pairs) stored in collections (~tables)
  • compatible with majority of mongoDB apps, drives, and tools
  • high eprformance, scalability, and availability
  • support for flexible indexing, powerful ad hoc queries and aanlytics
  • storage and compute can scale independently
  • supports 15 low latency read replicas (multi-az)
  • auto scaling of storage from 10GB to 64TB
  • FAULT TOLERANT AND SELF HEALING STORAGE

AUTOMATIC, CONTINUOUS, incremental backups and PITR

A

T

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

docdb stores JSON documents (semi structured data)

A

T

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

key vaue pairs can be nested

A

T

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

why docdb?

  • JSON is the defacto format for data exchange
  • documentDB makes it easy to insert, query, index, and perform aggregations over JSON data
  • store JSON output from APIs straight into DB and start analyzing it
  • flexible document model, data types, and indexing
  • add/remove indexes easily

run ad hoc queries for operational and analytics workloads

for known access patterns - use dynamoDB instead

A

T

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

DocDB architecture

___ copies of your data across ___ AZs

A

6, 3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

DocDB Architecture

_____ optimistic algorithm (quorum model)

A

lock-free

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

docdb architecture

___ copies out of 6 needed for writes (__/6 write quorum - data considered durable whe at least __/6 copies acknowledge the write)

A

4

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

docdb architecture

___ copies out of 6 needed for reads (__/6 read quorum

A

3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

docdb architecture

self healing with ____ replication, storage is striped across 100s of volumes

A

peer to peer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

docdb architecture

___ docdb isntance takes writes(master)

A

1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

___ nodes on replicas do not need to write/replicate (=improved read performance)

A

compute

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

docdb architecture

log-structured distributed storage layer - passes ___ log records from compute to stroage layer (=faster)

A

incremental

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

docdb architecture

master + up to ___ read replicas server reads

A

15

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

docdb architecture

data is continuously backed up to __ in real time, using storage nodes (compute nore perfomance is unaffected)

A

s3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

docdb cluster

  • recommended to connect using the cluster endpoint in replica set mode (enables your SDK to auto discover the cluster arrangement as instances get added or removed from the cluster)
A

T

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

docdb replication

  • up to ___ read replicas
A

15

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

docdb replication

____ repliaction

A

ASYNC

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

docdb replication

replicas share the same underlying storage layer

A

T

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

docdb replication

typically take 10s of milliseconds (replication lag)

A

T

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

docdb replication

minimal performance impact on the primary due to replication process

A

T

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

docdb HA failovers

-failovers occur automatically

A

T

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

docdb HA failovers

-a replica is automatically promoted to be the new primary during DR

A

T

23
Q

docdb HA failovers

docdb flops the CNAME of the DB instance to point ot the replica and promotes it

A

T

24
Q

docdb HA failovers

failover to a replica typically takes 30 seconds ( minimal downtime)

A

t

25
Q

docdb HA failovers

creating a new instance takes about 8-10 minutes (post failover)

A

t

26
Q

docdb backup and restore

  • supports automatic backups
A

`T

27
Q

docdb backupa dn restore

continuously backs up your data to s3 for PITR (max retention period of __days)

A

35

28
Q

docdb backup and restore

latest restorable time for a PITR can be up to 5 minutes in the past

A

T

29
Q

docdb backup and restore

  • the first backup is a full backup
  • subsequent backups are ____
A

incremental

30
Q

docdb backup and restore

take manual snapshots to retain beyond 35 days

A

T

31
Q

docdb backup and restore

backup process dfoesnot impact cluster performance

A

t

32
Q

docdb backup and restore

  • can only restore to a new cluster
A

T

33
Q

docdb backup and restore

can restore an unencrypted snapshot to an encrypted cluster (but not hte other way round)

A

T

34
Q

docdb backup and restore

to restore a cluster from an encrypted snapshot, you must have access to the KMS key

A

T

35
Q

docdb backup and restore

can only share manual snapshots (can copy and share auto ones)

A

T

36
Q

docdb backup and restore

can’t share a snaptho encrypted using the defaut KMS keys of teh a/c

A

T

37
Q

docdb backup and restore

shapshots can be shared across accounts, but within the same region

A

T

38
Q

docdb scaling

  • mongoDB sharding not supported (instead offers read replicas/vertical scaling/storage scaling)
  • vertical scaling (scale up/down - by resizing instances
  • horizontal scaling (scale out/in) by adding /removing up to 15 replicas
  • can scale up a replica independently from other replicas (typically for analytical workloads
A

T

39
Q

docdb security - IAM and Network

  • you use IAM to manage docdb resources
A

T

40
Q

docdb security - IAM and Network

supports mongodb default auth ____ for db authentication

A

SCRAM(Salted Challenge Respose Authentication Mechanism)

41
Q

docdb security - IAM and Network

supports built in roles for DB users with ____

A

RBAC(role based access control)

42
Q

docdb security - IAM and Network

docdb clusters are VPC only (use private subnets)

A

T

43
Q

docdb security - IAM and Network

clients (mongodb shell) can run on ec2 in public subnets wihtin VPC

A

T

44
Q

docdb security - IAM and Network

can connect to your on prem IT infra via VPN

A

T

45
Q

Docdb security - encryption

encryption at rest - AES-256 using KMS

-applied to cluster data/replicas/indexes/logs/backups/snapshots

encryption in transit - using TLS

-to enable TLS, set tls parameter in cluster param group

to conenct over TLS:

download the cert (public key) from AWS

-pass the cert key while connecting to the cluter

A

T

46
Q

docdb pricing

  • on demand instances - pricing per second with a 10 min minimum
  • IOPS - per million IO requests
  • each DB page reads operation from teh storage volume counts as one IO (one page = 8KB)
  • write IOs are counted in 4KB units

DB storage - per GB per month

backups - per GB per month(backups up to 100% of your clusters data storage is free)

data tarnsfer - per GB

can temporarily stop compute instances for up to 7 days

A

T

47
Q

docdb monitoring

API calls logged with ____

A

cloudtrail

48
Q

docdb monitoring

common CW metrics

  • CPU or RAM utilization - CPUUtilization/FreeableMemory
  • IOPS metrics - VolumeReadIOPS/VulumeWriteIOPS/WriteIOPS/ReadIOPS
  • Databaes conenctions - DatabaseConnections
  • Network Traffic - NetworkThroughput
  • Storage volume consumption - VolumeBytesUsed
A

T

49
Q

docdb monitoring

-two types of logs can be published/exported to CW logs

profiler logs

audit logs

A

T

50
Q

docdb profiler

  • logs (into CW logs) the details of ops performed on your cluster
  • helps identify slow operations and improve quey performance
  • accesible from CW logs
  • to anable:
  • set parameters, profiler, profiler_threshold_ms, and profiler_sampling_rate
  • enable logs exports for audit logs by modifying the intance
  • both the steps above are mandatory
A

T

51
Q

docdb audit logs

  • records DDL statements, authentication, authorization, and user mgmt events to CW logs
  • exports your cluster’s auditing records (JSON docs) to CW logs
  • accessible from CW logs

to enable:

  • set parameter audit_logs=enabled
  • enable logs exports for audit logs by modifying the instance
A

T

52
Q

docdb performance management

  • use explain command to identify slow queries
    db. runComamnd({explain: {<query>}})</query>
  • can use db.adminCommand to find and terminate queries
    example: to terminate long running /blocked queries
    db. adminCommand({killOp: 1, op: <opid>});</opid>
A

t

53
Q
A