Hello and welcome back.
Now it's time to talk about an obvious relational database service or ideas.
Bear in mind that this is not intended to be a zero to hero on ideas.
It is expected that you have the associate level knowledge.
But this one is going to recap and focus on the important parts for the exam.
So let's dive in.
So what's ideas.
It's a relational database service from AWB.
It's a fully managed relational database engine that will be instantiated on an easy to instant you
have access to the database but not to the operating system.
If it is a fully managed so what does it hobbyist do for me if I have the arduous security and patching
of the database instance is it maybe responsibility not yours.
Automated backup so there is an automation automated backup for your database instance that happens
every day.
And that's a default setting on this if you want to disable it.
Why did they do that.
Because with automated backup and something we'll talk about later on called transaction logs.
If you lost your instance if you have a disaster using the automated backups and the transaction logs
you can retrieve your database to the last five minutes before it crashed or before the disaster happened.
Software updates for the database engine so updates to the database engine are not used to worry about
they are NWS is to worry about easy scaling of storage and compute as required.
So this is also provided if selected multiple availabilities own so you can have in one easy you have
an instance in another easy you have another one but they are they function in active stand by not active
active you can not look shared between them and they will be synchronous replication between the two
instances.
So who sets all that up.
Once you select the multi easy it us will create the standby database instance and will configure the
synchronous replication between them synchronous replication.
So that means as soon as anything is written here it is written there is work between the active and
stand by data with instances automatic fill over if multi easy option will select what are the supported
relational database or the RDF database on AWB that you can subscribe to as a fully managed service.
My Sequel Server Microsoft Oracle Postgres sequel Murray IDB it appears Aurora and the very famous my
sequel what storage block storage does Amazon already has use on the are these instances it is UBS volume
and not instant store it's never instant stores.
This is for databases and logs storage.
Both of them and as in the IBS that we learned before we have a general purpose we have the magnetic
and we have the IEPs provisioned.
OK so recommendations.
General purpose are data storage.
Use it for database workloads with moderate Io requirements.
This is which one.
The general purpose IBS volumes provision IEPs.
Guaranteed items that you have use it for high performance or LTV workloads online transaction processing.
And then the magnetic are the s using for small databases workload.
You have the option when you are initiating or launching arduous instances to select the multi easy
option during the launch.
If you select the multi easy what would happen that the believes ideas will create a stand by instance
in a different abilities on in the same region and configure is synchronous replication between the
primary and standby.
Why is that because now you are creating a standby right.
So this is the primary.
This is a standby.
Have this one feels.
What would you expect to have here.
Exactly.
I expect to have the same database on the other one when I have to fill over to it.
If this one feels in order to achieve that and not to miss anything of data what does are the US do
or it obvious do.
They will configure synchronous replication so as soon as anything is written here it's written there
as well.
So the database is always the same on both of them.
You can not read right from the stand by its name by the name definition.
It is a stand by so its waiting for something to happen so you cannot read or write.
I'm talking here as application so your applications cannot read or write to the stand by.
But the synchronous application will write to the database the updates that are happening here.
So this is different.
You are writing as a client and applications is not allowed.
You cannot dictate.
That's another thing.
Now I want to do multi easy and I have the primary in if it is on a and I want this to be inevitable
it is on me.
You cannot dictate that Ada Williams will select the best available zone for you.
Within the same region so you cannot choose that depending on the instance class.
It may take.
So which instance you are launching what storage and all that it may take one to few minutes to feed
over to the stand by instance.
So from primary to stand by.
But then if it will take a few minutes and my application is trying to read or write to the database
and database is not available because I'm feeling over.
So what happens is that an outage would my application fail the recommendation for im from UW s is to
implement the database connection three tries.
So the application will try to connect to write or read from the database.
If you cannot get access to it then it will pose for a few seconds and then it will a minute and it
will try again and it will keep trying.
Enough time to be more than a few minutes here so good could try every five seconds.
If it doesn't work every 10 seconds if it doesn't work every 20 seconds but then every 1 minute every
2 minutes every 3 minutes every 5 minutes until it can connect and then you are okay.
So the fill over has happened successfully and now the application can get to the stand by and read
from it as the new primary.
It recommends the use of provisioned IEPs if you are talking about multi easy arduous instances.
Then use that provision.
I don't use the general purpose or the magnetic force of magnetic if it is not a small testing kind
of environment don't use it K or a small website.
Maybe you are using don't use it.
What are the reasons.
Ideas fail will fail over from the primary to stand by.
Why would that happen what would trigger that to happen.
I'm talking here about automatic not many would feel if the loss of primary easy or primary database
instance failure.
So if I lose the easy way the primary is or there is a failure on the database instance the primary
to his instance.
Loss of network connectivity to the primary database instance compute unit failure on the primary so
the easy to instance feels or the host is impaired.
For example storage failure on the primary IBS volume or unit failure on the primary the primary database
instance is changed so you change parameters you change configurations for the primary database instance
and then also failover would be trigger patching the operating system of the database instance.
So these are the automatic feel of these are the Iaw initiated fill over in your multi easy are this
scenario can I do manual fill over.
The only way you can do that is you can reboot the primary but when rebooting you choose that you are
rebooting with fail over during fill over.
Now I have here my application and then I have the primary and the standby.
So here's my primary and here's my standby.
Okay.
And this could be an available it is on and these guys could be in different availability zones or these
to the application and the primary can be available it is on and this one is easy too.
So what am I simulating here simulating the abilities on structure for the app.
And didn't have the primary ideas and the stand by ideas.
So the OP is talking to the primary audience.
Now let's think about it.
What would you you yourself not eight years recommend.
Should the application reference the primary.
Well it's easy to IP address that is configured on the Unite interface or should it use a DNS name.
And why.
Come on guys think about it.
Think about spillover.
Think about what would be less hassle to fill over to the other one.
Let's think about it.
This is IP 1 and this is IP 2 IP address on IP address 2 Why don't they have the same IP others because
this isn't available it is on and the subnet does not cross.
The average citizen cannot stretch between two Liberty zones right.
So this IP address one in subnet one this IP address two in subnet 2.
If I'm referencing with the IP so the application has an IP address configured let's say the primary
field and I know I need to go to this to the stand by then the application will continue for ever to
address the arduous instance as the IP address of the primary.
That means it will never fail over to the IP 2 which is on standby right.
Until someone comes into the application configuration or go into the code and put a different IP address
which is IP 2 for the standby.
Right.
So this would be how it will work but this is not an automatic feel of it with an automatic pane because
you will be in pain.
Your application will not be able to access the database your users who are accessing the web application
will not be able to do anything until someone is notified and he goes into the code and changes from
IP to IP to.
What happens if the standby fails.
And I know I need to go back to the previous primary.
Then someone needs to do that again.
So that becomes a manual feed over not an automatic freedom.
Let's look at the other way.
If we reference it by DNS so we have a name for the database instance let's say database one that the
data that it appears that Amazon dot com.
Now this one on the DNS server within Europe yes within your VPC.
This one translates to IP one right.
If IP 1.
If our audience knows that your primary has to fill over now it will inform or update the ideas that
now this you are l will map to IP to not IP 1.
So forget about IP 1 Try IP 2.
So your application if it is referencing with that you are L or with the DNS name or as we call it here
the C name the canonical name of the already pasted the database instance.
So it will always if it is not cached it will go and ask that the DNS server so the domain name system
will now give back IP to the application will automatically fill over the other one.
No changes are required on the application Why.
Because I am referencing that you are L or the C name or the DNS name of the RDX instance of the multi
easy obvious instance.
Does that imply that if I feel over from primary to stand by that C name or sometimes we refer to it
as the end point to the end point or the API reference for that are the s instance will not change in
a multi easy fill over scenario.
That is absolutely correct when it will change if you use a new database instance and even if you're
using the same database on the then a new instance will have a new endpoint.
Okay let's talk about event notification now when a feel over happens does it obvious since it is a
fully managed service notify me or not.
So you will be alerted by a database instance event when I feel what occurs when this is if you have
chosen to do that an audience will use simple notification service to send the this event via as an
as notifications.
Now how far back can I look at events that have happened to my audience.
Using the API calls you can list out this event in the past 14 days so using API I can look back up
to 14 days and this is the API name that you need to use to call in order to get or to get the information
for the past 14 days.
There are two methods to backup and restore your data or our DST there is instances in it abuse.
And these are the automated E.W. as US service backups.
So basically these are the daily backups that happen on your database and you don't need to enable it.
It's enabled by default when you create instances but you can disable it if you don't want it and the
other one is the manual or the user initiated manual backups either one will not backup only the database
but it will take the whole instance and back it up.
So with that in mind with all the information about us and on that that would be backed up and either
one will create storage volume snapshot of your entire database instance.
OK so basically you can take that snapshot and restore your instance and they will not only back up
the individual databases you can make copies so whatever snapshot that you'll end up with a backup you
can make copies of that whether it is automatic backup war manual snapshot automated backups but it
appears they will backup the database data to multiple Availability Zones to provide for data durability.
So obvious the service is smart.
It will not take it and just back it up in the same easy.
So if you lose the instance you lose the backup as well.
No it will take it and it will store it in multiple Availability Zones and that is a good thing but
also it is something that either yes will charge you for all the automated backups and even then manual
later on as you will see the snapshots are stored in s three multi availabilities on automated backups
will be taken from the stand by in the primary why we said because I O suspension happens when you do
the backup and you don't want that to happen on the primary if you have an option of doing it on standby.
But if it was a standalone data instance then it is done from the set.
The only one that you have automated backups can be used exclusively so not the manual backups the manual
snapshots cannot be used to retrieve for point in time database recovery.
So database instance recovery to a point in time can only be done with automated backups and not with
the manual backup.
I can't say that I wanted recovered my database to Sunday August 13 at thirteen oh five thirty three
and that is up to five minutes past.
You can do that.
It can restore the database up to five minutes in time using the database transaction logs and automated
snapshot.
So what I'm saying here is you have the automated backup and then you have the exactly the transaction
or the database transaction logs using the two of them.
The RDA service can retrieve your RDX instance up to five minutes in time so you can get it up to five
minutes ago or is automatically backs up the database instance daily.
Then it is a daily by creating a storage volume snapshot of your entire database full daily snapshot.
Including the database transaction logs or modifications which is are critical to be able to restore
up to five minutes in time.
Automated backup backups during your daily backup window Your Io may be suspended for standalone arduous
deployment so if you have a standalone expect that when you decide on your backup window.
Try to make sure that it is done in a time where suspending the IOUs will not be a big problem for your
applications and your users for multi easy deployment backups are taken from the standby database instance
and this is true for Maria D.B. my obscure Oracle and posterior seeker sequel.
Now I have my automated backup in my account.
Can I share it with another account.
The answer is no you cannot.
Is there a workaround.
Yes.
Copy your automated backup the resulting copy will be considered a manual snapshot and you can then
share the manual snapshot.
OK.
I think a very well deserved break right now and I'll see you after the break and continue on with database
relational database service.
Or are the s important points.
I'll see you after the break.
Thank you.