1
00:00:00,270 --> 00:00:01,230
Hello and welcome back.

2
00:00:01,230 --> 00:00:05,920
Now it's time to talk about an obvious relational database service or ideas.

3
00:00:05,940 --> 00:00:10,800
Bear in mind that this is not intended to be a zero to hero on ideas.

4
00:00:10,830 --> 00:00:13,650
It is expected that you have the associate level knowledge.

5
00:00:13,800 --> 00:00:18,810
But this one is going to recap and focus on the important parts for the exam.

6
00:00:19,200 --> 00:00:20,000
So let's dive in.

7
00:00:20,010 --> 00:00:20,970
So what's ideas.

8
00:00:21,000 --> 00:00:23,940
It's a relational database service from AWB.

9
00:00:24,030 --> 00:00:29,850
It's a fully managed relational database engine that will be instantiated on an easy to instant you

10
00:00:29,850 --> 00:00:33,300
have access to the database but not to the operating system.

11
00:00:33,300 --> 00:00:39,390
If it is a fully managed so what does it hobbyist do for me if I have the arduous security and patching

12
00:00:39,390 --> 00:00:43,190
of the database instance is it maybe responsibility not yours.

13
00:00:43,260 --> 00:00:48,150
Automated backup so there is an automation automated backup for your database instance that happens

14
00:00:48,180 --> 00:00:48,890
every day.

15
00:00:48,930 --> 00:00:51,480
And that's a default setting on this if you want to disable it.

16
00:00:51,480 --> 00:00:53,430
Why did they do that.

17
00:00:53,430 --> 00:00:57,810
Because with automated backup and something we'll talk about later on called transaction logs.

18
00:00:57,810 --> 00:01:04,080
If you lost your instance if you have a disaster using the automated backups and the transaction logs

19
00:01:04,080 --> 00:01:12,150
you can retrieve your database to the last five minutes before it crashed or before the disaster happened.

20
00:01:12,150 --> 00:01:17,630
Software updates for the database engine so updates to the database engine are not used to worry about

21
00:01:17,640 --> 00:01:24,580
they are NWS is to worry about easy scaling of storage and compute as required.

22
00:01:24,580 --> 00:01:32,250
So this is also provided if selected multiple availabilities own so you can have in one easy you have

23
00:01:32,370 --> 00:01:37,770
an instance in another easy you have another one but they are they function in active stand by not active

24
00:01:37,770 --> 00:01:43,290
active you can not look shared between them and they will be synchronous replication between the two

25
00:01:43,290 --> 00:01:44,040
instances.

26
00:01:44,040 --> 00:01:45,430
So who sets all that up.

27
00:01:45,450 --> 00:01:52,940
Once you select the multi easy it us will create the standby database instance and will configure the

28
00:01:52,940 --> 00:01:56,180
synchronous replication between them synchronous replication.

29
00:01:56,180 --> 00:02:01,580
So that means as soon as anything is written here it is written there is work between the active and

30
00:02:01,580 --> 00:02:08,870
stand by data with instances automatic fill over if multi easy option will select what are the supported

31
00:02:09,530 --> 00:02:16,630
relational database or the RDF database on AWB that you can subscribe to as a fully managed service.

32
00:02:16,760 --> 00:02:29,140
My Sequel Server Microsoft Oracle Postgres sequel Murray IDB it appears Aurora and the very famous my

33
00:02:29,140 --> 00:02:37,890
sequel what storage block storage does Amazon already has use on the are these instances it is UBS volume

34
00:02:38,040 --> 00:02:40,710
and not instant store it's never instant stores.

35
00:02:40,710 --> 00:02:43,130
This is for databases and logs storage.

36
00:02:43,140 --> 00:02:48,570
Both of them and as in the IBS that we learned before we have a general purpose we have the magnetic

37
00:02:48,570 --> 00:02:50,370
and we have the IEPs provisioned.

38
00:02:50,470 --> 00:02:52,530
OK so recommendations.

39
00:02:52,740 --> 00:02:54,510
General purpose are data storage.

40
00:02:54,510 --> 00:02:59,010
Use it for database workloads with moderate Io requirements.

41
00:02:59,010 --> 00:02:59,760
This is which one.

42
00:02:59,790 --> 00:03:03,420
The general purpose IBS volumes provision IEPs.

43
00:03:03,440 --> 00:03:10,560
Guaranteed items that you have use it for high performance or LTV workloads online transaction processing.

44
00:03:10,680 --> 00:03:14,790
And then the magnetic are the s using for small databases workload.

45
00:03:14,880 --> 00:03:21,750
You have the option when you are initiating or launching arduous instances to select the multi easy

46
00:03:21,750 --> 00:03:23,460
option during the launch.

47
00:03:23,490 --> 00:03:29,930
If you select the multi easy what would happen that the believes ideas will create a stand by instance

48
00:03:29,940 --> 00:03:36,240
in a different abilities on in the same region and configure is synchronous replication between the

49
00:03:36,240 --> 00:03:37,620
primary and standby.

50
00:03:37,620 --> 00:03:40,530
Why is that because now you are creating a standby right.

51
00:03:40,590 --> 00:03:41,530
So this is the primary.

52
00:03:41,520 --> 00:03:42,530
This is a standby.

53
00:03:42,610 --> 00:03:43,550
Have this one feels.

54
00:03:43,550 --> 00:03:45,640
What would you expect to have here.

55
00:03:45,660 --> 00:03:46,110
Exactly.

56
00:03:46,110 --> 00:03:50,880
I expect to have the same database on the other one when I have to fill over to it.

57
00:03:50,880 --> 00:03:57,600
If this one feels in order to achieve that and not to miss anything of data what does are the US do

58
00:03:57,680 --> 00:03:58,700
or it obvious do.

59
00:03:58,740 --> 00:04:04,470
They will configure synchronous replication so as soon as anything is written here it's written there

60
00:04:04,470 --> 00:04:05,400
as well.

61
00:04:05,400 --> 00:04:08,220
So the database is always the same on both of them.

62
00:04:08,220 --> 00:04:12,420
You can not read right from the stand by its name by the name definition.

63
00:04:12,420 --> 00:04:18,110
It is a stand by so its waiting for something to happen so you cannot read or write.

64
00:04:18,120 --> 00:04:24,410
I'm talking here as application so your applications cannot read or write to the stand by.

65
00:04:24,630 --> 00:04:30,100
But the synchronous application will write to the database the updates that are happening here.

66
00:04:30,120 --> 00:04:31,530
So this is different.

67
00:04:31,530 --> 00:04:35,610
You are writing as a client and applications is not allowed.

68
00:04:35,670 --> 00:04:36,990
You cannot dictate.

69
00:04:36,990 --> 00:04:37,950
That's another thing.

70
00:04:37,950 --> 00:04:45,750
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

71
00:04:45,750 --> 00:04:46,530
it is on me.

72
00:04:46,590 --> 00:04:52,590
You cannot dictate that Ada Williams will select the best available zone for you.

73
00:04:52,590 --> 00:04:58,110
Within the same region so you cannot choose that depending on the instance class.

74
00:04:58,140 --> 00:04:59,030
It may take.

75
00:04:59,040 --> 00:05:03,690
So which instance you are launching what storage and all that it may take one to few minutes to feed

76
00:05:03,690 --> 00:05:05,260
over to the stand by instance.

77
00:05:05,260 --> 00:05:07,510
So from primary to stand by.

78
00:05:07,680 --> 00:05:14,220
But then if it will take a few minutes and my application is trying to read or write to the database

79
00:05:14,250 --> 00:05:16,950
and database is not available because I'm feeling over.

80
00:05:17,010 --> 00:05:23,370
So what happens is that an outage would my application fail the recommendation for im from UW s is to

81
00:05:23,370 --> 00:05:26,060
implement the database connection three tries.

82
00:05:26,070 --> 00:05:30,840
So the application will try to connect to write or read from the database.

83
00:05:30,840 --> 00:05:35,970
If you cannot get access to it then it will pose for a few seconds and then it will a minute and it

84
00:05:35,970 --> 00:05:38,350
will try again and it will keep trying.

85
00:05:38,400 --> 00:05:45,560
Enough time to be more than a few minutes here so good could try every five seconds.

86
00:05:45,570 --> 00:05:49,920
If it doesn't work every 10 seconds if it doesn't work every 20 seconds but then every 1 minute every

87
00:05:49,920 --> 00:05:55,640
2 minutes every 3 minutes every 5 minutes until it can connect and then you are okay.

88
00:05:55,650 --> 00:06:02,040
So the fill over has happened successfully and now the application can get to the stand by and read

89
00:06:02,040 --> 00:06:03,970
from it as the new primary.

90
00:06:04,040 --> 00:06:09,560
It recommends the use of provisioned IEPs if you are talking about multi easy arduous instances.

91
00:06:09,690 --> 00:06:11,160
Then use that provision.

92
00:06:11,180 --> 00:06:18,690
I don't use the general purpose or the magnetic force of magnetic if it is not a small testing kind

93
00:06:18,690 --> 00:06:22,310
of environment don't use it K or a small website.

94
00:06:22,320 --> 00:06:23,550
Maybe you are using don't use it.

95
00:06:23,610 --> 00:06:25,590
What are the reasons.

96
00:06:25,740 --> 00:06:29,670
Ideas fail will fail over from the primary to stand by.

97
00:06:29,670 --> 00:06:32,250
Why would that happen what would trigger that to happen.

98
00:06:32,250 --> 00:06:37,410
I'm talking here about automatic not many would feel if the loss of primary easy or primary database

99
00:06:37,410 --> 00:06:38,390
instance failure.

100
00:06:38,400 --> 00:06:44,120
So if I lose the easy way the primary is or there is a failure on the database instance the primary

101
00:06:44,200 --> 00:06:45,020
to his instance.

102
00:06:45,060 --> 00:06:51,990
Loss of network connectivity to the primary database instance compute unit failure on the primary so

103
00:06:51,990 --> 00:06:55,650
the easy to instance feels or the host is impaired.

104
00:06:55,650 --> 00:07:03,030
For example storage failure on the primary IBS volume or unit failure on the primary the primary database

105
00:07:03,030 --> 00:07:10,290
instance is changed so you change parameters you change configurations for the primary database instance

106
00:07:10,320 --> 00:07:16,740
and then also failover would be trigger patching the operating system of the database instance.

107
00:07:16,800 --> 00:07:22,670
So these are the automatic feel of these are the Iaw initiated fill over in your multi easy are this

108
00:07:22,680 --> 00:07:24,660
scenario can I do manual fill over.

109
00:07:24,660 --> 00:07:30,630
The only way you can do that is you can reboot the primary but when rebooting you choose that you are

110
00:07:30,630 --> 00:07:33,320
rebooting with fail over during fill over.

111
00:07:33,320 --> 00:07:39,030
Now I have here my application and then I have the primary and the standby.

112
00:07:39,060 --> 00:07:41,350
So here's my primary and here's my standby.

113
00:07:41,380 --> 00:07:41,890
Okay.

114
00:07:42,000 --> 00:07:48,570
And this could be an available it is on and these guys could be in different availability zones or these

115
00:07:48,570 --> 00:07:54,540
to the application and the primary can be available it is on and this one is easy too.

116
00:07:54,540 --> 00:08:00,630
So what am I simulating here simulating the abilities on structure for the app.

117
00:08:01,500 --> 00:08:05,280
And didn't have the primary ideas and the stand by ideas.

118
00:08:05,590 --> 00:08:09,330
So the OP is talking to the primary audience.

119
00:08:09,340 --> 00:08:10,480
Now let's think about it.

120
00:08:10,990 --> 00:08:14,980
What would you you yourself not eight years recommend.

121
00:08:15,190 --> 00:08:19,110
Should the application reference the primary.

122
00:08:19,110 --> 00:08:27,430
Well it's easy to IP address that is configured on the Unite interface or should it use a DNS name.

123
00:08:27,430 --> 00:08:28,670
And why.

124
00:08:28,810 --> 00:08:30,690
Come on guys think about it.

125
00:08:30,730 --> 00:08:31,570
Think about spillover.

126
00:08:31,570 --> 00:08:36,460
Think about what would be less hassle to fill over to the other one.

127
00:08:36,730 --> 00:08:37,800
Let's think about it.

128
00:08:37,810 --> 00:08:44,590
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

129
00:08:44,590 --> 00:08:48,870
this isn't available it is on and the subnet does not cross.

130
00:08:48,880 --> 00:08:54,760
The average citizen cannot stretch between two Liberty zones right.

131
00:08:54,790 --> 00:08:59,000
So this IP address one in subnet one this IP address two in subnet 2.

132
00:08:59,320 --> 00:09:05,950
If I'm referencing with the IP so the application has an IP address configured let's say the primary

133
00:09:06,160 --> 00:09:14,740
field and I know I need to go to this to the stand by then the application will continue for ever to

134
00:09:15,280 --> 00:09:19,960
address the arduous instance as the IP address of the primary.

135
00:09:19,960 --> 00:09:24,550
That means it will never fail over to the IP 2 which is on standby right.

136
00:09:24,820 --> 00:09:31,150
Until someone comes into the application configuration or go into the code and put a different IP address

137
00:09:31,240 --> 00:09:34,210
which is IP 2 for the standby.

138
00:09:34,300 --> 00:09:35,350
Right.

139
00:09:35,410 --> 00:09:41,260
So this would be how it will work but this is not an automatic feel of it with an automatic pane because

140
00:09:41,260 --> 00:09:42,610
you will be in pain.

141
00:09:42,610 --> 00:09:47,980
Your application will not be able to access the database your users who are accessing the web application

142
00:09:48,250 --> 00:09:54,070
will not be able to do anything until someone is notified and he goes into the code and changes from

143
00:09:54,070 --> 00:09:55,850
IP to IP to.

144
00:09:56,140 --> 00:09:57,970
What happens if the standby fails.

145
00:09:57,970 --> 00:10:01,230
And I know I need to go back to the previous primary.

146
00:10:01,330 --> 00:10:02,670
Then someone needs to do that again.

147
00:10:02,680 --> 00:10:05,150
So that becomes a manual feed over not an automatic freedom.

148
00:10:05,260 --> 00:10:07,430
Let's look at the other way.

149
00:10:07,540 --> 00:10:18,000
If we reference it by DNS so we have a name for the database instance let's say database one that the

150
00:10:18,030 --> 00:10:21,420
data that it appears that Amazon dot com.

151
00:10:21,430 --> 00:10:28,500
Now this one on the DNS server within Europe yes within your VPC.

152
00:10:28,720 --> 00:10:31,930
This one translates to IP one right.

153
00:10:31,930 --> 00:10:33,050
If IP 1.

154
00:10:33,100 --> 00:10:41,010
If our audience knows that your primary has to fill over now it will inform or update the ideas that

155
00:10:41,020 --> 00:10:45,650
now this you are l will map to IP to not IP 1.

156
00:10:45,650 --> 00:10:48,290
So forget about IP 1 Try IP 2.

157
00:10:48,430 --> 00:10:55,750
So your application if it is referencing with that you are L or with the DNS name or as we call it here

158
00:10:56,170 --> 00:11:00,930
the C name the canonical name of the already pasted the database instance.

159
00:11:01,030 --> 00:11:09,220
So it will always if it is not cached it will go and ask that the DNS server so the domain name system

160
00:11:09,250 --> 00:11:15,140
will now give back IP to the application will automatically fill over the other one.

161
00:11:15,190 --> 00:11:17,700
No changes are required on the application Why.

162
00:11:17,710 --> 00:11:26,200
Because I am referencing that you are L or the C name or the DNS name of the RDX instance of the multi

163
00:11:26,200 --> 00:11:27,510
easy obvious instance.

164
00:11:27,520 --> 00:11:34,420
Does that imply that if I feel over from primary to stand by that C name or sometimes we refer to it

165
00:11:34,480 --> 00:11:42,750
as the end point to the end point or the API reference for that are the s instance will not change in

166
00:11:42,740 --> 00:11:44,500
a multi easy fill over scenario.

167
00:11:44,530 --> 00:11:52,030
That is absolutely correct when it will change if you use a new database instance and even if you're

168
00:11:52,030 --> 00:11:57,570
using the same database on the then a new instance will have a new endpoint.

169
00:11:57,590 --> 00:12:03,550
Okay let's talk about event notification now when a feel over happens does it obvious since it is a

170
00:12:03,550 --> 00:12:06,000
fully managed service notify me or not.

171
00:12:06,250 --> 00:12:12,040
So you will be alerted by a database instance event when I feel what occurs when this is if you have

172
00:12:12,040 --> 00:12:19,480
chosen to do that an audience will use simple notification service to send the this event via as an

173
00:12:19,490 --> 00:12:20,710
as notifications.

174
00:12:20,710 --> 00:12:26,220
Now how far back can I look at events that have happened to my audience.

175
00:12:26,290 --> 00:12:33,610
Using the API calls you can list out this event in the past 14 days so using API I can look back up

176
00:12:33,610 --> 00:12:40,660
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

177
00:12:40,660 --> 00:12:42,010
for the past 14 days.

178
00:12:42,010 --> 00:12:48,500
There are two methods to backup and restore your data or our DST there is instances in it abuse.

179
00:12:48,550 --> 00:12:53,170
And these are the automated E.W. as US service backups.

180
00:12:53,230 --> 00:12:58,740
So basically these are the daily backups that happen on your database and you don't need to enable it.

181
00:12:58,750 --> 00:13:03,620
It's enabled by default when you create instances but you can disable it if you don't want it and the

182
00:13:03,620 --> 00:13:10,370
other one is the manual or the user initiated manual backups either one will not backup only the database

183
00:13:10,400 --> 00:13:14,180
but it will take the whole instance and back it up.

184
00:13:14,180 --> 00:13:18,710
So with that in mind with all the information about us and on that that would be backed up and either

185
00:13:18,710 --> 00:13:23,660
one will create storage volume snapshot of your entire database instance.

186
00:13:23,690 --> 00:13:30,920
OK so basically you can take that snapshot and restore your instance and they will not only back up

187
00:13:30,920 --> 00:13:36,350
the individual databases you can make copies so whatever snapshot that you'll end up with a backup you

188
00:13:36,350 --> 00:13:42,230
can make copies of that whether it is automatic backup war manual snapshot automated backups but it

189
00:13:42,230 --> 00:13:48,370
appears they will backup the database data to multiple Availability Zones to provide for data durability.

190
00:13:48,410 --> 00:13:50,740
So obvious the service is smart.

191
00:13:50,750 --> 00:13:53,750
It will not take it and just back it up in the same easy.

192
00:13:53,750 --> 00:13:55,870
So if you lose the instance you lose the backup as well.

193
00:13:55,900 --> 00:14:01,730
No it will take it and it will store it in multiple Availability Zones and that is a good thing but

194
00:14:01,730 --> 00:14:07,700
also it is something that either yes will charge you for all the automated backups and even then manual

195
00:14:07,700 --> 00:14:13,820
later on as you will see the snapshots are stored in s three multi availabilities on automated backups

196
00:14:13,820 --> 00:14:20,120
will be taken from the stand by in the primary why we said because I O suspension happens when you do

197
00:14:20,210 --> 00:14:25,970
the backup and you don't want that to happen on the primary if you have an option of doing it on standby.

198
00:14:26,210 --> 00:14:31,340
But if it was a standalone data instance then it is done from the set.

199
00:14:31,340 --> 00:14:38,000
The only one that you have automated backups can be used exclusively so not the manual backups the manual

200
00:14:38,050 --> 00:14:43,530
snapshots cannot be used to retrieve for point in time database recovery.

201
00:14:43,670 --> 00:14:49,790
So database instance recovery to a point in time can only be done with automated backups and not with

202
00:14:49,790 --> 00:14:50,680
the manual backup.

203
00:14:50,690 --> 00:14:59,530
I can't say that I wanted recovered my database to Sunday August 13 at thirteen oh five thirty three

204
00:15:00,140 --> 00:15:02,750
and that is up to five minutes past.

205
00:15:02,750 --> 00:15:03,350
You can do that.

206
00:15:03,380 --> 00:15:09,410
It can restore the database up to five minutes in time using the database transaction logs and automated

207
00:15:09,410 --> 00:15:09,860
snapshot.

208
00:15:09,860 --> 00:15:16,250
So what I'm saying here is you have the automated backup and then you have the exactly the transaction

209
00:15:16,250 --> 00:15:19,750
or the database transaction logs using the two of them.

210
00:15:19,760 --> 00:15:28,790
The RDA service can retrieve your RDX instance up to five minutes in time so you can get it up to five

211
00:15:28,790 --> 00:15:33,260
minutes ago or is automatically backs up the database instance daily.

212
00:15:33,320 --> 00:15:39,480
Then it is a daily by creating a storage volume snapshot of your entire database full daily snapshot.

213
00:15:39,590 --> 00:15:45,850
Including the database transaction logs or modifications which is are critical to be able to restore

214
00:15:45,860 --> 00:15:47,270
up to five minutes in time.

215
00:15:47,510 --> 00:15:53,820
Automated backup backups during your daily backup window Your Io may be suspended for standalone arduous

216
00:15:53,900 --> 00:15:59,390
deployment so if you have a standalone expect that when you decide on your backup window.

217
00:15:59,450 --> 00:16:05,780
Try to make sure that it is done in a time where suspending the IOUs will not be a big problem for your

218
00:16:05,780 --> 00:16:11,900
applications and your users for multi easy deployment backups are taken from the standby database instance

219
00:16:11,930 --> 00:16:19,330
and this is true for Maria D.B. my obscure Oracle and posterior seeker sequel.

220
00:16:19,400 --> 00:16:22,490
Now I have my automated backup in my account.

221
00:16:22,490 --> 00:16:24,230
Can I share it with another account.

222
00:16:24,230 --> 00:16:26,600
The answer is no you cannot.

223
00:16:26,600 --> 00:16:27,590
Is there a workaround.

224
00:16:27,590 --> 00:16:28,110
Yes.

225
00:16:28,160 --> 00:16:36,410
Copy your automated backup the resulting copy will be considered a manual snapshot and you can then

226
00:16:36,410 --> 00:16:37,970
share the manual snapshot.

227
00:16:38,420 --> 00:16:38,790
OK.

228
00:16:38,810 --> 00:16:44,980
I think a very well deserved break right now and I'll see you after the break and continue on with database

229
00:16:45,060 --> 00:16:46,450
relational database service.

230
00:16:46,460 --> 00:16:48,850
Or are the s important points.

231
00:16:48,950 --> 00:16:49,760
I'll see you after the break.

232
00:16:49,940 --> 00:16:50,220
Thank you.
