1
00:00:00,540 --> 00:00:02,680
What is going on, guys?

2
00:00:02,700 --> 00:00:10,620
My name is Hossein, and this video I want to discuss, I caution that some of you asked me when do

3
00:00:10,650 --> 00:00:17,670
I, Shahd, my database and short answer for those who are impatient.

4
00:00:19,110 --> 00:00:24,030
Last thing you want to do is the Shard, your database, there are so many other things that you can

5
00:00:24,030 --> 00:00:28,380
do before complicating your life with Shaadi.

6
00:00:28,800 --> 00:00:33,460
So with that said, let's just jump into it, guys, if you're new here.

7
00:00:33,520 --> 00:00:33,990
Welcome.

8
00:00:34,020 --> 00:00:34,890
My name is Ozanian.

9
00:00:34,920 --> 00:00:37,260
This channel we discuss all sort of back in engineering.

10
00:00:37,410 --> 00:00:41,450
So if you're interested to be on better software engineer, consider subscribing to that Billikens.

11
00:00:41,450 --> 00:00:44,490
So you get notified every time I upload a new video.

12
00:00:44,490 --> 00:00:47,310
With that said, let's just jump into Sharding.

13
00:00:47,320 --> 00:00:49,490
When do you share your database, guys?

14
00:00:50,220 --> 00:00:58,290
Sharding the idea of starting a database is I know it sounds that the that term sounds very sexy.

15
00:00:58,320 --> 00:00:58,930
Arrives as I.

16
00:00:58,980 --> 00:01:05,820
Oh, I'm sure my database makes you sound intelligent, but if you think about what you're doing with

17
00:01:05,820 --> 00:01:13,470
Sharding, it is a very complex architecture and complex operation to implement.

18
00:01:13,800 --> 00:01:14,130
So.

19
00:01:15,400 --> 00:01:23,560
In order to talk about, as you have so many other things you can optimises, like why are you doing

20
00:01:23,560 --> 00:01:24,370
it to begin with?

21
00:01:24,370 --> 00:01:24,710
Right.

22
00:01:25,390 --> 00:01:25,780
So.

23
00:01:28,800 --> 00:01:32,010
The start over, you have a beautiful database.

24
00:01:34,230 --> 00:01:38,950
And I'm now talking about mostly relational databases, because that's my specialty.

25
00:01:39,060 --> 00:01:45,870
I very rarely work with no more SQL databases, but they work similarly.

26
00:01:46,890 --> 00:01:47,700
But here's the thing.

27
00:01:48,500 --> 00:01:54,740
And in relational databases, you have a single instance database, right, and you're probably building

28
00:01:54,740 --> 00:02:01,010
a Web application, so you need a Web server or an API framework such as Narges, Django, all that

29
00:02:01,010 --> 00:02:08,690
jazz go application, your custom application that essentially speaks SDB protocol that talks to the

30
00:02:08,690 --> 00:02:12,440
browsers or some rest clients or.

31
00:02:13,490 --> 00:02:19,760
Any job, easy job, easy, but what is the thank you.

32
00:02:19,790 --> 00:02:20,180
Thank you.

33
00:02:20,360 --> 00:02:26,390
Yeah, so anything that's basically HDB and you make request and that request goes to the Observer and

34
00:02:26,390 --> 00:02:34,820
the Web server makes queries to the database and response gets her back responses and kind of changed

35
00:02:34,820 --> 00:02:39,680
the representation to something that the client understand could be JSON, XML, anything, and then

36
00:02:39,680 --> 00:02:40,900
ship it back to the client.

37
00:02:41,030 --> 00:02:44,480
That's their best representation, right, in the representation.

38
00:02:45,830 --> 00:02:46,270
All right.

39
00:02:46,280 --> 00:02:47,380
So that looks good.

40
00:02:48,410 --> 00:02:55,670
What's the problem with this, you get a lot of requests, a lot of people are reading, I say I was

41
00:02:55,670 --> 00:03:00,920
like, oh, I'm getting give me all these employees table or give me I'm reading this profile.

42
00:03:00,920 --> 00:03:02,570
I'm reading this for I'm reading this tweet.

43
00:03:02,570 --> 00:03:03,140
I'm reading this.

44
00:03:03,770 --> 00:03:09,290
So you're hitting that database a lot and you're reading a lot.

45
00:03:09,690 --> 00:03:16,790
Is it OK that you're reading from a table right at that table is large.

46
00:03:17,090 --> 00:03:22,100
It's getting large because you're inserting a lot of stuff in it has one million, two million, three

47
00:03:22,100 --> 00:03:26,450
million, four million twenty fourteen hundred million rose in it.

48
00:03:27,020 --> 00:03:32,660
And you might say Hosain doesn't matter because I have an index on it and that index is going to be

49
00:03:32,660 --> 00:03:33,560
smaller.

50
00:03:33,560 --> 00:03:33,970
Right.

51
00:03:34,130 --> 00:03:36,230
And I'm going to head the index because I'm smart.

52
00:03:36,620 --> 00:03:42,320
I am going to index the fields and I'm only quoting based on those fields that are indexed.

53
00:03:42,530 --> 00:03:45,860
So my queries are fast, but then they're saying to you.

54
00:03:47,570 --> 00:03:55,220
Only so far, because the larger the table gets, the larger the index gets and almost you're doing

55
00:03:55,520 --> 00:04:00,290
and full index can, which can also be slow.

56
00:04:00,680 --> 00:04:05,030
So the solution is not to just split everything into multiple servers.

57
00:04:05,990 --> 00:04:06,710
You're doing it.

58
00:04:06,950 --> 00:04:08,870
You're overengineering too early.

59
00:04:08,870 --> 00:04:13,660
And that's what the problem with most people are just overengineering too early.

60
00:04:13,670 --> 00:04:15,250
You can still do so much stuff.

61
00:04:15,260 --> 00:04:16,430
I hope you have this.

62
00:04:16,460 --> 00:04:17,760
This is their problem now, right?

63
00:04:17,960 --> 00:04:21,260
You have to identify with the problem first in order to solve it.

64
00:04:21,290 --> 00:04:25,460
You can't just solve something that you don't know.

65
00:04:25,460 --> 00:04:26,500
The problem is right.

66
00:04:26,840 --> 00:04:27,940
Identify the problem.

67
00:04:27,950 --> 00:04:29,480
So let's say this is my problem.

68
00:04:29,780 --> 00:04:31,550
My reads are slow.

69
00:04:32,460 --> 00:04:39,960
I didn't say anything about this law just reads, because writing is always fast in writing to the end

70
00:04:39,960 --> 00:04:40,830
of the table.

71
00:04:41,220 --> 00:04:46,020
And even if you're using a Vetri data structure index.

72
00:04:46,410 --> 00:04:50,280
Yeah, if you're using and it's this idea that could be.

73
00:04:51,630 --> 00:04:57,600
Harmful for this is because you're rebalancing that tree sometimes if you're riding a lot, and that

74
00:04:57,600 --> 00:05:00,080
could cause some shifts in the desk.

75
00:05:00,310 --> 00:05:06,660
I just know that as bad as Reed, Ellis is optimized for rights.

76
00:05:06,660 --> 00:05:09,060
But that's another story rights.

77
00:05:09,060 --> 00:05:15,330
So I'm reading a lot, Miles, getting Lawrence Lawrence, it used to take one milliseconds now is like

78
00:05:15,330 --> 00:05:17,680
20 and now it's a hundred milliseconds.

79
00:05:18,390 --> 00:05:19,140
What do you do?

80
00:05:21,130 --> 00:05:22,690
Tables large, what do you do with it?

81
00:05:23,080 --> 00:05:26,520
There's something called most databased supports called partitioning.

82
00:05:27,400 --> 00:05:30,630
And I'm going to talk about just the horizontal partition.

83
00:05:30,670 --> 00:05:31,420
So imagine this.

84
00:05:31,570 --> 00:05:34,990
This is your table and I talk about horizontal and vertical partition.

85
00:05:34,990 --> 00:05:35,970
I'm going to reference the video here.

86
00:05:35,980 --> 00:05:36,550
Go check it out.

87
00:05:36,550 --> 00:05:40,810
But in a nutshell, you have a huge table, hundreds of millions of rows.

88
00:05:41,260 --> 00:05:43,330
You just slice it in half.

89
00:05:44,670 --> 00:05:47,940
Horizontally, that's that's the horizontal slice it in the middle.

90
00:05:48,270 --> 00:05:51,690
And you say this piece from this.

91
00:05:53,370 --> 00:06:01,140
I.D. to this ID go to this stable, right, and we're going to call this a partition and this idea to

92
00:06:01,140 --> 00:06:06,270
this idea goes to this table I'm going to go partition to and this this idea, this idea go to partition.

93
00:06:06,460 --> 00:06:13,530
So now you instead of having one table, you have three different tables that represent the whole logical

94
00:06:13,530 --> 00:06:14,100
table.

95
00:06:14,970 --> 00:06:24,070
But when you query, we can find out based on something called a partition key, which usually is that

96
00:06:24,090 --> 00:06:26,070
is the primary key of the table.

97
00:06:26,100 --> 00:06:27,240
Doesn't have to be there.

98
00:06:27,780 --> 00:06:31,920
But based on that, you can know which table to hit.

99
00:06:32,610 --> 00:06:36,260
Now you have smaller tables, you have 10 smaller tables.

100
00:06:36,780 --> 00:06:37,650
And guess what?

101
00:06:37,650 --> 00:06:45,240
With a little better knowledge from the client, we can know exactly which small table or partition

102
00:06:45,240 --> 00:06:45,620
to hit.

103
00:06:45,960 --> 00:06:52,950
And now I'm working with a smaller index and my queries will be fast instead of having this huge index.

104
00:06:53,200 --> 00:06:56,760
Now I have a smaller index and I know exactly what quite so.

105
00:06:56,760 --> 00:06:58,680
My queries are fast, just like that.

106
00:06:58,680 --> 00:07:01,860
By just enabling partitioning and most databases.

107
00:07:01,860 --> 00:07:07,020
Postgres, for example, does that blindly for you if you enable it.

108
00:07:07,200 --> 00:07:13,980
And the client doesn't have the even need the knowledge to know that, oh, I need to have this table

109
00:07:13,980 --> 00:07:14,910
table partition.

110
00:07:14,910 --> 00:07:15,480
Underscore what?

111
00:07:15,480 --> 00:07:21,390
No, it's just happened for you previously and all the releases you had to have this knowledge.

112
00:07:21,390 --> 00:07:23,250
Oh, this is this table, this table, this.

113
00:07:23,670 --> 00:07:31,620
Remember, guys, I'm still in the same server as one instance, one database instance, but with little

114
00:07:31,620 --> 00:07:36,990
bit of a tweak of a feature of my database, I, I fix the problem.

115
00:07:38,890 --> 00:07:40,990
Right, you don't need charting.

116
00:07:41,140 --> 00:07:42,700
We're going to talk about Sharding in a minute.

117
00:07:42,730 --> 00:07:43,550
What does it really mean?

118
00:07:44,500 --> 00:07:44,950
But.

119
00:07:46,800 --> 00:07:55,890
You come back, you say, Hussein, no, that's not good, because, yes, I am, my singular reads

120
00:07:55,890 --> 00:07:56,610
are fast.

121
00:07:56,610 --> 00:08:01,980
I'm selecting staff from the stable, and yet it's very fast now because I partition all that stuff.

122
00:08:02,310 --> 00:08:09,750
But my dad, a base server, cannot handle because all these TCP connection to a single server just

123
00:08:09,800 --> 00:08:10,470
read stuff.

124
00:08:10,830 --> 00:08:20,010
It's overwhelming my server and it's the file descriptors are blowing out of proportions and I cannot

125
00:08:20,010 --> 00:08:20,880
handle that anymore.

126
00:08:21,310 --> 00:08:21,520
Right.

127
00:08:22,470 --> 00:08:23,220
So what do you do?

128
00:08:23,460 --> 00:08:26,820
Well, I'm not even introducing the idea of caching.

129
00:08:26,820 --> 00:08:31,830
You can obviously introduce a layer of REGISTE cache and all that stuff, but.

130
00:08:32,790 --> 00:08:37,860
It comes with its own problems because you'll end up with inconsistency and you have to invalidate the

131
00:08:37,860 --> 00:08:40,740
cash and all that stuff, but you can't play with that.

132
00:08:41,800 --> 00:08:49,060
And without introducing that extra layer, I have some tricks up my sleeve to fix that problem.

133
00:08:49,320 --> 00:08:49,540
All right.

134
00:08:49,600 --> 00:08:52,180
And most of the stuff you guys know it probably, but.

135
00:08:53,300 --> 00:08:56,900
Replication, why is nobody talking about this?

136
00:08:57,680 --> 00:09:00,860
You have a master backup, so.

137
00:09:01,900 --> 00:09:10,330
And you some some databases have this by default, this this features where you have one master and

138
00:09:10,330 --> 00:09:19,780
create another server and make this server a backup of that master and what it will do as periodically

139
00:09:20,020 --> 00:09:22,360
the master will push the edits.

140
00:09:22,360 --> 00:09:22,720
Right.

141
00:09:22,720 --> 00:09:24,250
The rights to that.

142
00:09:25,140 --> 00:09:28,250
To the replica, to the backup, so you can get as many backup as you want.

143
00:09:29,570 --> 00:09:32,330
And multiple servers with partitions.

144
00:09:33,490 --> 00:09:34,000
And.

145
00:09:35,150 --> 00:09:36,140
Do all that stuff.

146
00:09:37,480 --> 00:09:46,170
Now, you segregated multiple servers, but you have one right to do a ride, you go to that dang server,

147
00:09:46,810 --> 00:09:52,090
you don't want to write in multiple servers, that will confuse a lot of things.

148
00:09:52,090 --> 00:09:55,870
And we're going to talk about it in a minute because reading is easier than writing.

149
00:09:56,650 --> 00:10:00,550
Reading is doesn't really cause conflicts or writing.

150
00:10:00,550 --> 00:10:05,050
If I'm writing to the same rule you have in the seven different servers.

151
00:10:05,500 --> 00:10:06,340
Bad things happen.

152
00:10:06,640 --> 00:10:08,500
How do I reconcile these changes?

153
00:10:08,500 --> 00:10:08,770
Right.

154
00:10:08,890 --> 00:10:13,040
It's just you can't solve it, but it becomes a very challenging problem to solve.

155
00:10:13,060 --> 00:10:15,930
So you want to avoid complex problems and why would you do it?

156
00:10:16,020 --> 00:10:19,780
Well, I'm gonna write to myself because my rights are not as bad.

157
00:10:19,810 --> 00:10:24,280
I don't I often barely write anything, but I read a lot.

158
00:10:24,640 --> 00:10:34,330
So you can just multiple servers, you have one master server and just push all that stuff to that replicas

159
00:10:34,480 --> 00:10:35,110
or the backups.

160
00:10:35,620 --> 00:10:43,320
And now your clients or the Web servers, but a reverse proxy at proxy in Ingenix Haertsch.

161
00:10:43,330 --> 00:10:48,920
And if you want and then start funding or you want to read, go to this database or you know, read

162
00:10:49,120 --> 00:10:56,110
you what, as the backup, go to the backup and now you're balancing the rights, but the rights still

163
00:10:56,110 --> 00:11:02,770
goes to this database that is the master and some people who will come to or know who say, and you

164
00:11:02,770 --> 00:11:10,870
don't know me because I write a lot and I need to write a lot.

165
00:11:11,020 --> 00:11:19,840
And my single server that does the right no longer is sufficient is going to die because I write so

166
00:11:19,840 --> 00:11:20,110
much.

167
00:11:20,110 --> 00:11:20,470
Do it.

168
00:11:24,020 --> 00:11:33,290
Really doubt it first, because if you're riding a lot, you will be riding a lot to saturate a single

169
00:11:33,290 --> 00:11:33,780
server.

170
00:11:34,490 --> 00:11:38,580
I'm assuming you have a big server that does that stuff right.

171
00:11:39,440 --> 00:11:40,490
But let's say you do.

172
00:11:40,880 --> 00:11:42,110
You're writing a lot.

173
00:11:42,440 --> 00:11:45,820
You still have some tracks before the final thing, which is sharding.

174
00:11:46,220 --> 00:11:56,720
You can do multiple replication, a two way replication, but have two masters on different regions

175
00:11:57,530 --> 00:11:59,320
in in in the US.

176
00:11:59,330 --> 00:12:00,710
This is very common.

177
00:12:00,920 --> 00:12:04,610
This is a U.S. E and this is a U.S. W.

178
00:12:04,970 --> 00:12:13,730
People from Florida writes to this server anything that has to do, customers with the with the E just

179
00:12:13,880 --> 00:12:16,240
deal with this, anything it has to do with customer.

180
00:12:16,260 --> 00:12:19,070
The W deal with this and most of the time they don't overlap.

181
00:12:19,070 --> 00:12:19,460
Right.

182
00:12:20,360 --> 00:12:21,160
Really.

183
00:12:21,440 --> 00:12:28,010
So if you have this aggregation, use it to your advantage and then synchronization of this can happen

184
00:12:28,010 --> 00:12:31,040
very easily because you're barely going to have any conflict.

185
00:12:31,130 --> 00:12:32,590
And if you do, you're going to resolve it.

186
00:12:33,770 --> 00:12:42,230
And if this is so complex, you finally go and do sharding, which is the following sharding is the

187
00:12:42,230 --> 00:12:47,050
idea of having a single key.

188
00:12:47,060 --> 00:12:50,150
The after all of these are exhausted.

189
00:12:51,130 --> 00:12:58,930
Right, come down and Lusardi, right, if and if all of this stuff is also done, Goodhew Sharding,

190
00:12:58,930 --> 00:13:03,850
if none of them, then probably you don't have to do Shabaan because training is the most complicated

191
00:13:03,920 --> 00:13:05,310
thing to accomplish.

192
00:13:05,320 --> 00:13:08,440
And let's talk about what is become easier these days.

193
00:13:08,440 --> 00:13:10,620
But let's talk about Sharding.

194
00:13:11,350 --> 00:13:13,060
So what is shocking?

195
00:13:13,060 --> 00:13:22,390
Sharding the idea of splitting like partition, like horizontal partitioning, but put the tables that

196
00:13:22,390 --> 00:13:26,710
are partitioned, not in a single in a different table.

197
00:13:26,710 --> 00:13:29,240
In the same instance, same server.

198
00:13:29,560 --> 00:13:36,190
No, both those partitions or shards in a different server altogether.

199
00:13:36,610 --> 00:13:38,150
Wuk.

200
00:13:38,920 --> 00:13:39,550
Yeah.

201
00:13:41,830 --> 00:13:47,370
We're partitioning, you can still do transaction, by the way, guys, the database supports transactions.

202
00:13:47,740 --> 00:13:52,630
Well, thing for for the Sharding was sharding.

203
00:13:53,560 --> 00:13:59,290
My, my, my tongue has been swallowed will sharding, you can all do transactions.

204
00:13:59,620 --> 00:14:01,240
Forget about transactions.

205
00:14:02,700 --> 00:14:03,630
Bye bye.

206
00:14:03,870 --> 00:14:11,930
Roll back all this beautiful comet staff Essid at Tomasetti, bye bye, no sharding for you.

207
00:14:11,940 --> 00:14:17,640
You cannot do all this because what do you do if you want to try to multiple this is different servers

208
00:14:17,640 --> 00:14:17,970
write.

209
00:14:18,960 --> 00:14:22,420
And you cannot maintain the asset transactions.

210
00:14:22,440 --> 00:14:28,830
I know some people don't like as a transaction and the favor the others that with eventual consistency,

211
00:14:28,830 --> 00:14:32,300
but the old school kind of guy.

212
00:14:33,840 --> 00:14:34,350
All right.

213
00:14:34,350 --> 00:14:44,250
So so what do you do is I am about to update customer number hundred and does the number 100, you say,

214
00:14:44,250 --> 00:14:49,020
OK, the client, you are the client, which is the world's sole observer in this case is OK.

215
00:14:49,260 --> 00:14:53,570
Customer number one is between hundred, between one and ten thousand.

216
00:14:53,580 --> 00:14:59,250
So yeah, as server number one, let me establish the ECB connection with our number one and execute

217
00:14:59,250 --> 00:15:00,810
that right or the right.

218
00:15:01,090 --> 00:15:01,470
Right.

219
00:15:02,510 --> 00:15:09,170
And and you received another request, but this request has to do with customer number ten thousand

220
00:15:09,170 --> 00:15:10,750
and seventeen.

221
00:15:11,570 --> 00:15:15,020
All it does is 17 is between 10000 and 20000.

222
00:15:15,020 --> 00:15:21,140
And based on my Sharding Grant arrange, this is server to subject his connection to the number two

223
00:15:21,140 --> 00:15:23,510
and executed and come back and result.

224
00:15:23,930 --> 00:15:31,910
And yep, you might say, yeah, I'm going to use puling because I don't want to establish D.B. connection

225
00:15:31,910 --> 00:15:32,490
every time.

226
00:15:32,720 --> 00:15:36,890
Anderson and I, I absolutely agree with you have to use pooling.

227
00:15:36,890 --> 00:15:39,610
You don't have to do this cold start of TKIs.

228
00:15:39,890 --> 00:15:43,880
Hopefully one database platform will get to use quick and all this problems will go away.

229
00:15:44,880 --> 00:15:47,570
They call stop and all that stuff, but.

230
00:15:49,470 --> 00:15:50,010
Yeah.

231
00:15:51,160 --> 00:15:58,090
Sharding is very complex, that logic that we just talked about is in your client application.

232
00:15:59,960 --> 00:16:01,580
That's hard, right?

233
00:16:02,120 --> 00:16:02,840
It's very hard.

234
00:16:02,870 --> 00:16:06,470
By the way, I made a video about Sharding guys and actually show you how it's done.

235
00:16:06,950 --> 00:16:07,640
Check it out here.

236
00:16:08,510 --> 00:16:10,600
But what do you do, guys?

237
00:16:10,940 --> 00:16:11,260
Right.

238
00:16:11,290 --> 00:16:19,760
This is do you do you really want to do this with your life and sacrifice rollbacks and comments and

239
00:16:19,760 --> 00:16:25,280
transactions and all this stuff just to do a stinking sharding?

240
00:16:25,700 --> 00:16:26,420
Just to do what?

241
00:16:26,420 --> 00:16:27,110
Scaling.

242
00:16:27,380 --> 00:16:28,820
You want to scale the rights?

243
00:16:29,180 --> 00:16:35,120
I agree it's beneficial, but sometimes it's an overkill.

244
00:16:35,150 --> 00:16:36,460
You get a really neat thing.

245
00:16:36,530 --> 00:16:38,300
Do you really need to, Shahd?

246
00:16:38,840 --> 00:16:39,290
Right.

247
00:16:41,030 --> 00:16:50,300
All right, that being said, you two run into this problem as you might, as you might think, because

248
00:16:50,300 --> 00:16:51,070
YouTube is a.

249
00:16:52,090 --> 00:17:00,370
Millions, millions of videos which with billions of watch hours and hours uploaded, right, so thousands

250
00:17:00,370 --> 00:17:07,780
and thousands of hours are uploaded to this platform and comments and and I you to listen to a podcast

251
00:17:08,020 --> 00:17:11,210
with the lead of YouTube talking about how they solved it.

252
00:17:11,230 --> 00:17:13,540
They have a MySQL database on the back.

253
00:17:13,540 --> 00:17:14,830
And by the way, they manage all that.

254
00:17:14,830 --> 00:17:18,700
So and the videos are I believe in I forgot where it is.

255
00:17:18,730 --> 00:17:19,420
Maybe it's three.

256
00:17:19,420 --> 00:17:20,170
I might be wrong there.

257
00:17:21,220 --> 00:17:23,380
Before that was before Google acquired it and all.

258
00:17:23,380 --> 00:17:23,950
That's not right.

259
00:17:23,950 --> 00:17:28,420
So they moved everything to YouTube, to Google infrastucture and all that stuff.

260
00:17:28,420 --> 00:17:36,130
But they for a long time they had a single MySQL server and they managed to do fine until the rights

261
00:17:36,130 --> 00:17:39,190
became absolutely disastrous.

262
00:17:39,520 --> 00:17:44,980
So they started doing what we talked about and until they couldn't handle.

263
00:17:44,980 --> 00:17:47,060
So they had to do sharding, which is called.

264
00:17:47,080 --> 00:17:48,940
What we talk about is application level.

265
00:17:48,940 --> 00:17:55,720
Schoening, the application is aware of the Shahd, which is this piece of the partition.

266
00:17:57,670 --> 00:18:04,180
And when, you know, when you are aware that's a problem because you create a coupling and coupling

267
00:18:04,180 --> 00:18:10,720
is the worst thing you want in software because you want software to be as isolated as possible.

268
00:18:10,930 --> 00:18:17,830
You want software to have social anxiety, social distancing in these days through social distancing

269
00:18:17,830 --> 00:18:20,850
for software like Gabrielsson.

270
00:18:20,860 --> 00:18:24,280
For a part, they shouldn't know stuff about each other.

271
00:18:24,880 --> 00:18:26,790
That's just a general idea about separate.

272
00:18:26,830 --> 00:18:28,600
Coupling is bad about software.

273
00:18:29,880 --> 00:18:31,590
Come back now.

274
00:18:32,700 --> 00:18:36,900
What they did, it's like they had this application level for a long time and says, look, I know this

275
00:18:36,900 --> 00:18:43,080
is ridiculous, we cannot maintain this because if they want to change some logic and everything breaks,

276
00:18:43,350 --> 00:18:50,520
right, they want to forget about regarding the idea of rationing is like, oh, okay, I want to change

277
00:18:50,520 --> 00:18:53,220
the range from 10000 because 10000 is really low.

278
00:18:53,430 --> 00:18:55,680
Let's make it 100 thousand.

279
00:18:55,830 --> 00:18:56,150
Right.

280
00:18:56,160 --> 00:18:57,790
Each card has 100000 rolls.

281
00:18:57,820 --> 00:18:59,510
Oh, forget about that.

282
00:18:59,520 --> 00:19:03,330
Nobody can do that because I will break every single client.

283
00:19:03,510 --> 00:19:04,830
You've got to go to that client.

284
00:19:04,830 --> 00:19:07,330
And yeah, so it's complicated.

285
00:19:07,350 --> 00:19:11,130
So they created this technology called Vitez and I'm going to reference it here.

286
00:19:11,300 --> 00:19:18,540
And the test is essentially a middleware that you send your query on top of my and it's I believe it's

287
00:19:18,540 --> 00:19:22,140
open source and it's Cuban and the Israelis and all that jazz.

288
00:19:22,440 --> 00:19:25,320
And you put it on your MySQL.

289
00:19:26,210 --> 00:19:32,660
Architecture and is going to do the magic sharding for you, and that is awesome, because you send

290
00:19:32,660 --> 00:19:39,770
a beautiful school query and they pass that query and they understand what charge to hit.

291
00:19:40,310 --> 00:19:47,630
And you don't need anything better than that if you absolutely need, because nothing's for free.

292
00:19:47,840 --> 00:19:55,120
If you want if you have the maintenance cost of implementing the task, go ahead and do it.

293
00:19:55,820 --> 00:19:57,950
Any technology you implement there is a cost for it.

294
00:19:58,610 --> 00:20:00,290
If you're ready, go ahead.

295
00:20:00,740 --> 00:20:04,650
But ask yourself, do you really need it?

296
00:20:05,240 --> 00:20:10,820
Sometimes you do not need it was an awful British accent.

297
00:20:12,370 --> 00:20:13,000
Impression.

298
00:20:14,610 --> 00:20:21,810
All right, guys, that's it for me today, that was an answer, 20 minutes video answering went to

299
00:20:21,810 --> 00:20:22,160
Shahd.

300
00:20:23,010 --> 00:20:24,030
What do you guys think?

301
00:20:25,120 --> 00:20:28,700
Am I feel B.S. or do you agree?

302
00:20:29,410 --> 00:20:34,720
I am welcoming all the comments, guys, I really learn a lot from.

303
00:20:36,080 --> 00:20:39,230
From you guys, I learned a lot from you because.

304
00:20:40,050 --> 00:20:43,530
We'll each develop and and.

305
00:20:44,500 --> 00:20:47,450
Advance, when we listen to each other, we learn you.

306
00:20:47,500 --> 00:20:54,160
I might have said something that is absolutely wrong here and someone and it happened countless of times

307
00:20:54,160 --> 00:20:54,870
like Hosain.

308
00:20:55,300 --> 00:20:58,600
That's B.S. the moment you said administration.

309
00:20:58,870 --> 00:20:59,620
That's incorrect.

310
00:20:59,620 --> 00:21:01,150
And here's why they tell me.

311
00:21:01,150 --> 00:21:01,960
Here's why.

312
00:21:02,080 --> 00:21:03,640
And here's that proof for it.

313
00:21:03,670 --> 00:21:05,410
And I absolutely cutted them.

314
00:21:05,650 --> 00:21:07,000
I heard that comment.

315
00:21:07,000 --> 00:21:10,900
And I sometimes spin it because I admit not perfect.

316
00:21:11,320 --> 00:21:12,310
We're all learning.

317
00:21:12,790 --> 00:21:15,520
We're going to learn a lot and keep learning, guys.

318
00:21:15,750 --> 00:21:19,750
All right, guys, stay safe out there and see in the next one, dibby.
