Aws RDS-2
Aws RDS-2
What is DATA?
In simple words, data can be facts related to any object. For e.g: your age, job, house no, contact
no., name, places are some data related to you.
What is DATABASE?
Database is a systematic collection of data. Databases supports storage and manipulation of data.
e.g: facebook, telecom companies, amazon.com
What is DBMS?
DBMS is a collection of programs which enable its users to access database, manipulate data,
reporting/ representation of data.
Types of DBMS
1. Hierarchical
2. Network
3. Relational
4. Object oriented
Relational Database:
➢ A relational database is a data structure that allows you to link information from different
tables of different types of data bucket.
➢ Tables are related to each other.
➢ All fields must be filled.
➢ Best suited for OLTP (online transaction processing)
➢ Relational DB: MySQL, Oracle, DBMS, IBM DB2
➢ A row of a table is also called records. It contains the specific information of each
individual entry in the table.
➢ Each table has its own primary key.
➢ A schema (design of database) is used to strictly define tables, columns, indexes and
relation between tables.
➢ Relational DB are usually used in enterprises application/scenario. Exception in MySQL
which is used for web application.
➢ Common application for MySQL include php and java based web applications that requires
a database storage backend. E.g: JOOMLA
➢ Cannot scale out horizontally.
➢ Virtually all relational DB uses SQL.
1. Columnar Database:
➢ Benefit is that because a column based DBMS is self-indexing, it uses less disk
space that a RDBMS containing the same data. It easily perform operation like min,
max, average.
2. Document Database:
3. Key-Value Database:
RDS Limits:
➢ Up to 40DB instances per account.
➢ 10 of this 40 can be Oracle or MS-SQL server under license included model.
Or
➢ Under BYOL model, all 40 can be any DB engine you need.
2. Provisional IOPS RDS Storage: use for high performance OLTP workloads.
Limits: min: 100GB
Max: 16384GB
Templates available in RDS:
a. Production
b. Dev/Test
c. Free-Tier
DB Instance Size:
a. Standard class
b. Memory-Optimized class
c. Burstable class
➢ Either you can take backup of entire DB instance or just the DB.
➢ You can create a restore volume snapshots of your entire DB instances.
➢ Automated backups by AWS, backup your DB data to multiple AZ to provide for data
durability.
➢ Select-automated backup in AWS console.
➢ Stored in Amazon S3.
➢ Multi-AZ automated backups will be taken from the standby instance.
➢ The DB instance must be in “ACTIVE” state for automated backup.
➢ RDS automatically backups the DB instances daily by creating a storage volume snapshots
of your DB instance (fully daily snapshots) including the DB transaction logs.
➢ You can decide when you would like to take backup (window)
➢ No additional charge for RDS backing up your DB instance.
➢ For multi-AZ deployment, backups are taken from the standby DB instance (true for Maria
DB, MySQL, Oracle, Postgre SQL).
➢ Automated backups are deleted when you delete your RDS DB instance.
➢ An outage occurs if you change the backup retention period from zero to non-zero value
or the other way around.
➢ Retention period of automate backup is 7 days (by default) via AWS console.
➢ AWS Aurora is an exception. Its default is 1 day.
➢ Via CLI or API 1 day by default.
➢ You can increase it up to 35 days.
➢ If you don’t want backup, put zero “0” in the retention period.
➢ In case of manual snapshot, point-in-time recovery is not possible.
➢ Manual snapshot is also stored in S3.
➢ They are not deleted automatically, if you delete RDS instance.
➢ Take a final snapshot before deleting your RDS DB instance.
➢ You can share manual snapshot directly with other AWS Account.
➢ When you restore a DB instance only the default DB parameters and security groups are
associated with the restored instance.
➢ You cannot restore a DB snapshot into an existing DB instance rather it has to create a new
DB instance it has new endpoint.
➢ Restoring from the backup or a DB snapshot changes the RDS instance endpoint.
➢ At the time of restoring, you can change the storage type (general purpose or provisioned.)
➢ You cannot encrypt an existing unencrypted DB instance.
➢ To do that you need to: create a new encrypted instance and migrate your data to it (from
unencrypted to encrypted) or you can restore from a backup/snapshot into a new encrypted
RDS instance.
➢ RDS supports encryption-at-rest for all DB engines using KMS.
➢ What actually encrypted when data-at-rest:
a. All its snapshots.
b. Backups of DB (S3 storage.)
c. Data on EBS volume.
d. Read replica created from the snapshots.
Some points related to RDS Billings:
➢ No upfront cost.
➢ You have to pay only for:
a. DB instance hours (partial hour charged as full hours)
b. Storage GB/month.
c. Internet data transfer.
d. Backup storage (i.e S3)
This is increases by increasing DB backup’s retention period.
Also charged for:
a. Multi-AZ DB hours.
b. Provisioned stage (multi-AZ)
c. Double write I/O
d. You are nor charged for DB data transfer during replication from primary to
standby.