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 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 Postgres SQL,
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.
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 all this 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 wanted 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 line 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 always meant to make you avoid the operation
of scaling manually your database storage.
For this, you need to set a maximum storage threshold,
so a 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,
just as MariaDB, MySQL, Postgres SQL,
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.