Instructor: So let's get started
with an overview of AWS RDS.
RDS stands for Relational Database Service.
And what it means is that it's a managed database service
for database that use SQL as a query language.
So SQL is a structured language to query a database,
it's very well-adapted, and it's running on many engines.
So it allows you to create databases,
the RDS service, in the cloud,
and these databases will be managed by AWS
and you get a lot of benefits from it.
So what types of database engine are managed by AWS?
Well, the first one is PostgreSQL.
Then we have MySQL, MariaDB, Oracle,
Microsoft SQL Server, and finally, Aurora,
and we have a dedicated section to Aurora,
so right now you can just forget about it, okay?
But so the first five: Postgres, MySQL,
MariaDB, Oracle, and Microsoft SQL Server,
you have to remember them.
So why would we use RDS
versus deploying our own database service
on top of, say, an EC2 instance?
Because this is possible.
Well, RDS is a managed service,
and as such, AWS provides a lot of services
on top of just giving us a database.
For example, the provisioning of the database
is fully automated,
and so is the underlying operating system patching.
There is continuous backups being made,
and you are able to restore to a specific timestamp.
It's called Point in Time Restore.
You can also have monitoring dashboards
to view the performance of your database.
You can have Read Replicas,
and we have a dedicated lecture on Read Replicas
in this course to improve read performance.
You can set up a multi-AZ,
and so we do have also sections on multi-AZ
that will be helpful for disaster recovery.
You have maintenance windows for the upgrades.
And you have scaling capabilities,
both vertical, by increasing the instance type,
and horizontal, by adding Read Replicas.
Finally, the storage is backed by EBS,
so this is something we already know,
which is gp2 volumes or io1.
But the only thing we do not have
is we cannot SSH into the instances, the RDS instances.
So because this is a managed service,
AWS provides us a service, and we don't have access
to the underlying EC2 instance,
but this is not too bad because we get all these things
that we would have to set up on our own
if we wanted to deploy our own database engine on EC2.
So let's talk about RDS backups for a little bit.
Backups are automatically enabled in RDS,
and you have automated backups.
They're daily full backups of the database,
which are done during the maintenance window
that you define.
And then the transaction logs, the daily transaction logs,
are backed up by RDS every five minutes.
So these two things together gives you the ability
to restore to any point in time, your database,
from the oldest backup
all the way to what happened up to five minutes ago.
There is a seven-day retention
of these automated backups by default,
but it can be increased to 35 days.
And you have database snapshots.
So snapshots are slightly different from backups.
Snapshots are backups
that are manually triggered by the user.
And the backup retention,
so these snapshot retention, is as long as you want.
So they're more helpful
if you want to retain the state of your database
for six month at some point in time.
So here is one feature that can come up in the exam
and is around RDS Storage Auto Scaling.
So the idea is that when you create an RDS database,
you need to say how much storage you want.
For example, you want 20 gigabytes of storage.
But say you are using your database a lot
and you're about to run out of free space,
then with this feature enabled,
the RDS Storage Auto Scaling, RDS will detect that
and will scale automatically the storage for you
so you don't have to do any kind of operations
such as taking down your database to increase the storage.
So the idea is that your application
does a lot of read and writes to your RDS database,
and then automatically,
with some threshold we'll see in a second,
then the storage can auto scale,
and that is a feature of RDS.
That is a very, very nice feature.
So this all is meant to make you avoid
the operation of scaling manually your database storage.
For this, you need to set a maximum storage threshold,
set the maximum limit
for how much you want the storage to grow
'cause you don't want it to grow infinitely, maybe.
And you can automatically modify storage
if the free storage is less than 10%
of what has been allocated,
and the low storage has been lasting
for more than five minutes,
and six hours have passed since the last modification.
If that's the case,
then the storage will auto increase when you enable it.
This is very helpful
for applications that have unpredictable workload,
and this supports all database engines for RDS,
such as MariaDB, MySQL, PostgreSQL, SQL Server, and Oracle.
So that's it for this lecture.
I hope you liked it, and I will see you in the next lecture.