RDS Flashcards

1
Q

Which databases are supported by RDS?

A

Postgres, MySQL, MariaDB, Oracle, MS SQL Server, Aurora (AWS proprietary Database)

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

How many read replicas can you have in Aurora?

A

you can have 15 replicas, while MySQL has five. The replication process is faster.

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

How Aurora ensures high availability?

A

there are 6 copies of your data across 3 AZ.
- 4 copies out of 6 needed for writes
- 3 copies out of 6 needed for reads
- self-healing with peer-to-peer replication

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

What’s the advantage of using RDS over deploying databases on EC2?

A
  • Automated provisioning, OS patching
  • Continuous backups and restore to specific timestamp (Point in Time Restore)!
  • Monitoring dashboards
  • Read replicas for improved read performance
  • Multi-AZ setup for DR (Disaster Recovery)
  • Maintenance windows for upgrades
  • Scaling capability (vertical and horizontal)
  • Storage backed by EBS (gp2 or io1)
  • Automated Backup

But you cannot SSH into the instance.

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

What is storage autoscaling in RDS?

A

RDS storage autoscaling helps you increase the storage on your DB instance dynamically. When RDS detects you are running out of free database storage, it scales automatically. You have to set the maximum storage threshold so your database does not grow infinitely. This is useful for applications with unpredictable workloads.

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

How many read replicas can be there in RDS?

A

There can be up to 5 read replicas

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

Can RDS read replicas be in the same AZ?

A

The replicas can be within the same AZ, cross AZ or cross-region

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

Are replicas in-sync with the main RDS DB instance?

A

The replication to replicas is asynchronous, but they are eventually consistent

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

What is the use of RDS read replicas?

A

Replicas provide better performance for reading the data from the RDS for the stop it can be used by the reporting or any analytical tool that only needs to read the data.

Replicas can be promoted to their own DB. Applications must update the connection string to leverage the read replicas

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

Is there a network cost when data goes from one AZ to another?

A

The data synchronization between same or different AZ free. But there is a cost when data is synchronized across regions. Data synchronization within the same region is free but It’s not free between different regions.

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

How is disaster recovery configured in RDS?

A

The disaster recovery is configured across the AZs (Multi-AZ) with synchronous replication (instantly). One DNS name is configured for the application to the main RDS database instance. In the event of failure, the automation failover will occur and DNS will point to the DR instance. There won’t be any interruption in the application. The DR instance becomes the master DB Instance.
The DR instance cannot be used for scaling (no one can read or write to it, it’s just here for the failover if anything goes wrong with the master database).

Read Replicas can be setup as a Multi-AZ for disaster recovery (DR). It’s a common exam question.

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

Can RDS be changed from a single AZ to multiple AZ?

A

The RDS settings can be modified to make the database from a single AZ to multiple AZ. Behind the scene, AWS will take that snapshot of the master instance and restore it in the new AZ. A synchronization is set up between the master and the standby DB instances.

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

What is the difference between RDS and RDS custom?

A

In RDS, the entire database at the OS is managed by AWS.

In RDS custom, you have access to the database and the OS. You don’t have control over the hardware. You also have access to the EC2 instance. RDS custom is available only for Oracle and Microsoft SQL Server. You can customize the instance or the database. But you must disable the automation mode before you perform any customization.

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

Aurora is compatible with which databases?

A

It’s compatible Postgres and MySQL

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

What is the writer endpoint and reader endpoint in Aurora DB?

A

The writer endpoint is a DNS name that is used for writing the data to the master DB instance. In case of failure, the writer endpoint may point to the read replica and promote it as a master DB instance. The application pointing to the master DB instance would not require any change.

Reader endpoint is also a DNS name used by the applications to read the data from the read replicas. The Aurora database automatically performs the auto-scaling, and new replicas are set up to ensure the desired performance.

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

Is it possible to backtrack data in Aurora?

A

Yes the database can be restored at any point of time without using backup put a stop. Aurora uses a different method to do that.

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

What is Aurora replicas autoscaling?

A

If there are multiple read requests AWS creates more replicas depending upon the higher CPU usage of the existing read replicas.

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

What are Aurora’s custom endpoints?

A

The custom endpoints provide load balancing and high availability for each group of DB instances within your cluster. If one of the DB instances within a group becomes unavailable, Aurora directs subsequent custom endpoint connections to one of the other DB instances associated with the same endpoint.

The custom endpoints can be created to run analytical queries or any other specific purpose. These read replicas can be larger instances compared to other existing replicas.

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

What is Aurora serverless?

A

Amazon Aurora Serverless is an on-demand, autoscaling configuration for Amazon Aurora. It automatically starts up, shuts down, and scales capacity up or down based on your application’s needs. You can run your database on AWS without managing database capacity.

Manually managing database capacity can take up valuable time and can lead to inefficient use of database resources. With Aurora Serverless, you create a database, specify the desired database capacity range, and connect your applications. You pay on a per-second basis for the database capacity that you use when the database is active, and migrate between standard and serverless configurations with a few steps in the Amazon Relational Database Service (Amazon RDS) console.

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

What is Aurora multi-master?

A

Most kinds of Aurora clusters are single-master clusters. For example, provisioned, Aurora Serverless, parallel query, and Global Database clusters are all single-master clusters. In a single-master cluster, a single DB instance performs all write operations and any other DB instances are read-only. If the writer DB instance becomes unavailable, a failover mechanism promotes one of the read-only instances to be the new writer.

In a multi-master cluster, all DB instances can perform write operations. The notions of a single read/write primary instance and multiple read-only Aurora Replicas don’t apply. There isn’t any failover when a writer DB instance becomes unavailable, because another writer DB instance is immediately available to take over the work of the failed instance. We refer to this type of availability as continuous availability, to distinguish it from the high availability (with brief downtime during failover) offered by a single-master cluster

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

What is global Aurora?

A

Amazon Aurora Global Database is designed for globally distributed applications, allowing a single Amazon Aurora database to span multiple AWS Regions. It replicates your data with no impact on database performance, enables fast local reads with low latency in each Region, and provides disaster recovery from Region-wide outages.

22
Q

What is Aurora Machine Learning?

A

Amazon Aurora machine learning enables you to add ML-based predictions to applications via the familiar SQL programming language, so you don’t need to learn separate tools or have a prior machine learning experience. It provides simple, optimized, and secure integration between Aurora and AWS ML services without having to build custom integrations or move data around.

23
Q

Which database takes less than one second for cross-region replication?

A

Global Aurora database. Cross-region replication within one second is a hint in the exam for the global Aurora database

24
Q

how many backup options are there in RDS?

A

Automated backup and manual backup.

In automated backup full backup is taken every day and transaction logs are backed up every five minutes. It gives the ability to restore the backup any point in time. The automated backup can be retained from 1 to 35 days.

The manual database snapshots are triggered by the users. The backups are retained as long as the user wants them.

A trick that can come up in the exam: if you have a requirement of having an RDS database at a specific time frame, you can reduce the cost by taking its backup and then deleting it. When you again need to have the database, you can restore it and start using it. This way, you can reduce the cost of having an RDS database. but you will still have to pay for the storage

25
Q

How the backup in Aurora is different than the backup in RDS?

A

Automated backup in Aurora cannot be disabled as it can be disabled in RDS by setting the retention period to zero.
Similar to RDS the backup in Aurora is retained from 1-35 days.

26
Q

What is Aurora Database Cloning?

A

By using Aurora cloning, you can create a new cluster that uses the same Aurora cluster volume and has the same data as the original. The process is designed to be fast and cost-effective. The new cluster with its associated data volume is known as a clone. Creating a clone is faster and more space-efficient than physically copying the data using other techniques, such as restoring a snapshot.

It is useful for creating a staging database from production database without it.

27
Q

Can RDS or Aurora databases can be encrypted?

A

Yes, they can be encrypted by using AWS KMS.

28
Q

Can read replicas be encrypted if master is not encrypted?

A

No, if the master is not encrypted, read replicas cannot be encrypted

29
Q

How to encrypt an unencrypted database?

A

To encrypt an unencrypted database, take a DB snapshot and restore it as encrypted

30
Q

What are the security options for RDS and Aurora?

A
  1. The database can be encrypted (at rest) by using AWS KMS, and it must be defined at the time of launching the database.
  2. RDS and Aurora uses TLS by default for inflight encryption.
  3. IAM roles to connect to the databases without using a username or password
  4. You can control network access to your RDS and Aurora database by using security groups
  5. You cannot assess the instance by SSH unless it’s RDS custom
31
Q

What is Amazon RDS proxy?

A

Amazon RDS Proxy is a fully managed, highly available database proxy for Amazon Relational Database Service (RDS) that makes applications more scalable, more resilient to database failures, and more secure.

Many applications, including those built on modern serverless architectures, can have many open connections to the database server and may open and close database connections at a high rate, exhausting database memory and compute resources (opening and closing connections consume CPU and RAM). Amazon RDS Proxy allows applications to pool and share connections established with the database, improving database efficiency and application scalability. It’s serverless, autoscaling, and highly available (multi-az) With RDS Proxy, failover times for Aurora and RDS databases are reduced by up to 66%, and database credentials, authentication, and access can be managed through integration with AWS Secrets Manager and AWS Identity and Access Management (IAM).
https://aws.amazon.com/rds/proxy/

It supports MySQL, Postgres and MariaDB. No code change is required for most of the applications.

It needs to be accessed by VPC, it’s never publically accessible.

32
Q

What databases are supported by RDS proxy?

A

It supports mySQL, PostgresSQL, MariaDB and Aurora (mySQL, PostgresSQL)

33
Q

Is there any code changes required for using RDS proxy?

A

No changes are required

34
Q

What is ElastiCache?

A

Amazon ElastiCache is a fully managed, in-memory caching service supporting flexible, real-time use cases. You can use ElastiCache for caching, which accelerates application and database performance, or as a primary data store for use cases that don’t require durability like session stores, gaming leaderboards, streaming, and analytics. ElastiCache is compatible with Redis and Memcached.

It requires heavy code changes.

35
Q

What’s the difference between Redis and memcached?

A

Redis is multi AZ with auto failover, read replicas to scale deeds and have high availability, backup and restore feature. Memcached uses multi node called sharding for partitioning the data. There’s no high availability or application, nonpersistent, no backup and restore and it has multi threaded architecture.

36
Q

Does elastic cache uses IAM Authentication?

A

No, the elastic cache does not support IAM authentication. IAM policies in elastic cache are only used for AWS API-level security

37
Q

How is Redis authenticated?

A

You can set password when you create Redis cluster. Redis also supports SSL in flight encryption.

38
Q

What authentication mechanism is used by memcached?

A

Memcache supports SASL based authentication

39
Q

What are the use cases for Redis?

A

Radis sorted set guarantee both uniqueness and element sorting therefore it’s perfect for gaming leaderboards

40
Q

What is the Elastic Beanstalk?

A

AWS Elastic Beanstalk is an easy-to-use service for deploying and scaling web applications and services developed with Java, .NET, PHP, Node.js, Python, Ruby, Go, and Docker on familiar servers such as Apache, Nginx, Passenger, and IIS.

You can simply upload your code and Elastic Beanstalk automatically handles the deployment, from capacity provisioning, load balancing, auto-scaling to application health monitoring. At the same time, you retain full control over the AWS resources powering your application and can access the underlying resources at any time.

There is no additional charge for Elastic Beanstalk - you pay only for the AWS resources needed to store and run your applications.

41
Q

What is DynamoDB?

A

Amazon DynamoDB is a fully managed, serverless, key-value NoSQL database designed to run high-performance applications at any scale. DynamoDB offers built-in security, continuous backups, automated multi-Region replication, in-memory caching, and data import and export tools.

From exam perspective, you can choose DynamoDB if your schema is rapidly evolving.

There are two read and write capacity modes:
Provision mode: you specify the number of read and writes per second. you need to plan capacity beforehand and you pay for the provisioned read capacity unit and write capacity unit. It is possible to add auto-scaling mode for RCU and WCU.

on-demand mode: read and write automatically, scale up and down with your load works. No capacity planning is needed. Pay for what you use - it is more expensive. Great for the unpredictable workload.

42
Q

What is DynammoDB Accelerator (DAX)?

A

Fully-managed highly available Seamless in-memory cache for dynamo DB. It helps in solving reading congestion by the cache. It provides microsecond latency for cache data. It does not require application logic modification - compatible with existing dynamo DB APIs.

43
Q

what’s the difference between DynamoDB Accelerator (DAX) and ElasticCache

A

Dynamo DB accelerator cash is the query, and it is in front of Dynamo DB. It supports dynamo DB API and does not require application changes. The elastic cache can be utilized to aggregate results.

44
Q

What is DynamoDB stream?

A

A DynamoDB stream is an ordered flow of information about changes to items in a DynamoDB table. When you enable a stream on a table, DynamoDB captures information about every modification to data items in the table.

Whenever an application creates, updates, or deletes items in the table, DynamoDB Streams writes a stream record with the primary key attributes of the items that were modified. A stream record contains information about a data modification to a single item in a DynamoDB table. You can configure the stream so that the stream records capture additional information, such as the “before” and “after” images of modified items.

when the changes are made to the dynamo DB, data about the changes can be sent either to DynamoDB streams or the Kinesis data stream. In the case of Kinesis, the stream can be sent to Kinesis data fire hose, and Data can be stored directly into rest shift amazon S3 or Amazon Open search.

45
Q

What is dynamo DB global table?

A

Global tables replicate your DynamoDB tables automatically across your choice of AWS Regions. Global tables eliminate the difficult work of replicating data between Regions and resolving update conflicts, enabling you to focus on your application’s business logic.

The replication is active-active. Enabling DynamoDB Stream is required for Global tables.

46
Q

What is DynamoDB TTL (Time to live)?

A

Amazon DynamoDB Time to Live (TTL) allows you to define a per-item timestamp to determine when an item is no longer needed. Shortly after the date and time of the specified timestamp, DynamoDB deletes the item from your table without consuming any write throughput. TTL is provided at no extra cost as a means to reduce stored data volumes by retaining only the items that remain current for your workload’s needs.

Web Session handling can be handled by TTL.

47
Q

can dynamo DB be exported to s3?

A

Yes, but point-in-time recovery must be enabled in DynamoDB. The export does not affect the reading capacity of your table in DynamoDB. Export data to S3 can be analyzed through Athena. ETL can be applied to S3 data before importing it back into Dynamo DB.
DynamoDB can be exported in JSON or ION format.

48
Q

what are no SQL databases?

A

Which are NoSQL databases?
NoSQL databases (aka “not only SQL”) are non-tabular databases and store data differently than relational tables. NoSQL databases come in a variety of types based on their data model. The main types are document, key-value, wide-column, and graph.

No SQL databases are dynamo DB, ElasticCache (key/value pair), Neptune (graphs), DocumentDB (for MongoDB), Keyspaces (for Apache Cassandra)

Object Store: S3
OpenSearch (JSON) - Free Text and Unstructured

49
Q

What is DocumentDB?

A

DocumentDB is an AWS implementation of MongoDB. It is no SQL database. MongoDB is used to store, query, and index JSON data. It is a fully managed and highly available service database. It replicates across three AZ. DocumentDB storage automatically grows in increments of 10GB up to 64 TB.

Automatically scales to handle millions of requests per second.

50
Q

What is Neptune?

A

It’s a database for graph and social network.

51
Q

What is QLDB?

A

QLDB is a Quantum Ledger Database. Used to review the history of all the changes made to your application data over time.

Immutable system: No entry can be removed or modified once it’s entered into the database.

Anytime you see financial transactions or ledger think amazon QLDB