[AWS] Relational Database Service (RDS)

RDS is a “Database as a Service (DBaaS)” for OLTP (OnLine Transaction Processing).

Databases

Relational Database Management Systems (RDBMS)

  • RDBMS is used when the data, which needs to be managed, has formal and fixed relationships.
  • Every table has a schema that defines a fixed layout.
  • There are fixed relations between tables based on keys.
  • RDBMs conform to the ACID system: Atomicity, Consistency, Isolation, and Durability.
  • Oracle, MySQL, or SQL Server

Key/Value DB

  • Data is stored as key-value pair: super fast query and easy scale-up.
  • DynamoDB

Document DB

  • Data is stored as structured documents (key-value pairs). 
  • It is very useful for content management, such as blogs.
  • MongoDB

Column DB

  • Data is stored in columns (attribute sets) rather than in rows. 
  • Warehousing and Analytics.
  • Redshift 

Graph DB

  • Dynamic relationships. Data is stored as nodes and the relationships between nodes.
  • Amazon Neptune

RDS (Relational Database Service) Features

  • RDS provides a fully functional database without the admin overhead. AWS provisions the infrastructure and handles common administrative tasks such as automated backups.
  • RDS runs on virtual machines, and you cannot log in to the host. (Patching is AWS’s responsibility.)
  • You can access RDS instances through endpoints.
  • Supported Engines are Aurora, MySQL, MariaDB, PostgreSQL, Oracle, and MS SQL Server.
  • RSD is charged based on instance size and running hours, provisioned storage, IOPS (for IOPS SSD (io1)), Data transferred out, and backups/snapshots.
  • An RDS database endpoint is represented as a domain name, hostname, or CNAME and is used to communicate with the primary instance. It is highly recommended to use the DNS Name to connect to a DB Instance as the underlying IP address can change (e.g., during failover).
  • RDS can only run one primary instance at a time. If it is reaching its writing capacity, you need to scale the instance vertically.

Provisioning/Configuring RDS

Create Subnet groups -> Select VPN, AZs, and subnets

  1. Create database: Db Engine, Edition, Version
  2. Select templates: Dev, Production, or Free
  3. Configure settings: Instance Identifier (RDS name not a DB name), Admin user, password
  4. Choose instance size
  5. Choose storage (General Purpose SSD, Provisioned IOPS SSD)
  6. Choose Single-AZ or Multi-AZ
  7. Configure connectivity: VPN, Subnet groups, Security Groups
  8. Setup additional Configuration: DB name, Encryption, Monitoring

Default ports

  • MySQL/Aurora/MariaDB: 3306
  • SQL Server: 1433
  • PostgreSQL: 5432
  • Oracle: 1521

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s