Effective System Design using CAP theorem | Software Architecture Conference
0 views
Aug 6, 2025
CAP theorem corresponds to Consistency, Availability and Partitioning and is essential to any large distributed system design. In the session, the audience can get a good insight on why CAP is required apart from practical use cases of it in banking systems, social media feeds and e-commerce sites etc. š Conference Website: https://softwarearchitecture.live šŗ CSharp TV - Dev Streaming Destination http://csharp.tv š C# Corner - Community of Software and Data Developers https://www.c-sharpcorner.com #CSharpTV #CSharpCorner #CSharp #SoftwareArchitectureConf
View Video Transcript
0:01
okay so hello everyone uh thanks for
0:03
okay so hello everyone uh thanks for
0:03
okay so hello everyone uh thanks for joining uh today I'm going to talk about
0:05
joining uh today I'm going to talk about
0:05
joining uh today I'm going to talk about cap theorems uh incisive design
0:08
cap theorems uh incisive design
0:08
cap theorems uh incisive design basically you can also call this cap
0:10
basically you can also call this cap
0:10
basically you can also call this cap principes so they are the fundamentals
0:12
principes so they are the fundamentals
0:12
principes so they are the fundamentals or essential I would say concept
0:14
or essential I would say concept
0:14
or essential I would say concept underlying any distributed system design
0:17
underlying any distributed system design
0:17
underlying any distributed system design as we know uh in the today's Times
0:20
as we know uh in the today's Times
0:20
as we know uh in the today's Times systems are typically distributed
0:22
systems are typically distributed
0:22
systems are typically distributed because they're expected to be accessed
0:24
because they're expected to be accessed
0:24
because they're expected to be accessed and used across across the globe so and
0:27
and used across across the globe so and
0:27
and used across across the globe so and hence it become even more important that
0:29
hence it become even more important that
0:29
hence it become even more important that we understand understand the the
0:30
we understand understand the the
0:30
we understand understand the the underlying principle behind uh the
0:33
underlying principle behind uh the
0:33
underlying principle behind uh the system like you know the scap theorem
0:35
system like you know the scap theorem
0:35
system like you know the scap theorem and and how this works so let's get
0:38
and and how this works so let's get
0:38
and and how this works so let's get started so this is the agenda we're
0:40
started so this is the agenda we're
0:40
started so this is the agenda we're going to cover today uh as you can see
0:42
going to cover today uh as you can see
0:43
going to cover today uh as you can see we are going to uh discuss these topics
0:45
we are going to uh discuss these topics
0:45
we are going to uh discuss these topics in detail to understand to make sense of
0:48
in detail to understand to make sense of
0:48
in detail to understand to make sense of out of these terms and how to how to
0:51
out of these terms and how to how to
0:51
out of these terms and how to how to deal with it how to kind of make sense
0:53
deal with it how to kind of make sense
0:53
deal with it how to kind of make sense out of it and how to apply when we uh
0:56
out of it and how to apply when we uh
0:56
out of it and how to apply when we uh think about designing large systems
1:00
think about designing large systems
1:00
think about designing large systems so with that uh let's pick the first uh
1:03
so with that uh let's pick the first uh
1:03
so with that uh let's pick the first uh I would say topic that is
1:06
I would say topic that is
1:06
I would say topic that is consistency so consistency is kind of a
1:09
consistency so consistency is kind of a
1:09
consistency so consistency is kind of a we might have read or gone through this
1:11
we might have read or gone through this
1:11
we might have read or gone through this in our curriculum as as well right the
1:13
in our curriculum as as well right the
1:13
in our curriculum as as well right the SD property of database but it is it is
1:16
SD property of database but it is it is
1:16
SD property of database but it is it is I would say Aid is I would say KN in one
1:19
I would say Aid is I would say KN in one
1:19
I would say Aid is I would say KN in one way because when the aid principle says
1:21
way because when the aid principle says
1:21
way because when the aid principle says it doesn't necessarily considerate
1:23
it doesn't necessarily considerate
1:23
it doesn't necessarily considerate different copies and all that is a very
1:26
different copies and all that is a very
1:26
different copies and all that is a very essential or common in in today's world
1:29
essential or common in in today's world
1:29
essential or common in in today's world right because system has to be
1:31
right because system has to be
1:31
right because system has to be distributed so this consistency in cap
1:34
distributed so this consistency in cap
1:34
distributed so this consistency in cap is I would say goes extra mile and talks
1:37
is I would say goes extra mile and talks
1:37
is I would say goes extra mile and talks about even copies in sitting in
1:38
about even copies in sitting in
1:38
about even copies in sitting in different instances of that database so
1:41
different instances of that database so
1:41
different instances of that database so what it means is that and of course we
1:44
what it means is that and of course we
1:44
what it means is that and of course we talk about data nodes nowadays because
1:46
talk about data nodes nowadays because
1:47
talk about data nodes nowadays because one system alone can't uh you know C to
1:50
one system alone can't uh you know C to
1:50
one system alone can't uh you know C to the needs of the the number of users and
1:53
the needs of the the number of users and
1:53
the needs of the the number of users and and their load so system has to have
1:56
and their load so system has to have
1:56
and their load so system has to have multiple nodes data nodes and and copies
1:58
multiple nodes data nodes and and copies
1:58
multiple nodes data nodes and and copies across different nodes
2:00
across different nodes
2:00
across different nodes so what consistency tells us in in in
2:03
so what consistency tells us in in in
2:03
so what consistency tells us in in in captum tells is that all nodes should
2:06
captum tells is that all nodes should
2:06
captum tells is that all nodes should have identical copies right so let's say
2:10
have identical copies right so let's say
2:10
have identical copies right so let's say user is kind of U accessing or hitting
2:13
user is kind of U accessing or hitting
2:13
user is kind of U accessing or hitting the user U you know if there are let's
2:16
the user U you know if there are let's
2:16
the user U you know if there are let's say hundreds of user and they got to get
2:19
say hundreds of user and they got to get
2:19
say hundreds of user and they got to get some data so irrespective of which node
2:22
some data so irrespective of which node
2:22
some data so irrespective of which node are they hitting uh through Lo balancer
2:24
are they hitting uh through Lo balancer
2:24
are they hitting uh through Lo balancer they should be getting similar data so
2:26
they should be getting similar data so
2:26
they should be getting similar data so there shouldn't be any change uh
2:30
there shouldn't be any change uh
2:30
there shouldn't be any change uh with respect to that which node is
2:32
with respect to that which node is
2:32
with respect to that which node is getting I would say picked up by the
2:34
getting I would say picked up by the
2:34
getting I would say picked up by the load balancer so it's it's really
2:37
load balancer so it's it's really
2:37
load balancer so it's it's really important in in distributive system that
2:39
important in in distributive system that
2:39
important in in distributive system that this uh you know this consistency
2:42
this uh you know this consistency
2:42
this uh you know this consistency becomes you know super critical U
2:44
becomes you know super critical U
2:44
becomes you know super critical U because nowadays we talk a lot lot about
2:47
because nowadays we talk a lot lot about
2:47
because nowadays we talk a lot lot about availability that will go next but there
2:49
availability that will go next but there
2:50
availability that will go next but there are still I would say some systems like
2:52
are still I would say some systems like
2:52
are still I would say some systems like especially the finance system where the
2:55
especially the finance system where the
2:55
especially the finance system where the data accuracy matters a lot and how it
2:58
data accuracy matters a lot and how it
2:58
data accuracy matters a lot and how it is I would say shown sh to the you know
3:01
is I would say shown sh to the you know
3:01
is I would say shown sh to the you know uh to the users irrespective of which
3:04
uh to the users irrespective of which
3:04
uh to the users irrespective of which which device they use it which location
3:06
which device they use it which location
3:06
which device they use it which location they are using and and you know many
3:08
they are using and and you know many
3:08
they are using and and you know many other factors comes in picture so
3:10
other factors comes in picture so
3:10
other factors comes in picture so consistency is is kind of hence plays a
3:12
consistency is is kind of hence plays a
3:12
consistency is is kind of hence plays a role where the data accuracy across
3:15
role where the data accuracy across
3:15
role where the data accuracy across different nodes across different servers
3:18
different nodes across different servers
3:18
different nodes across different servers is needs to be I would say having super
3:21
is needs to be I would say having super
3:21
is needs to be I would say having super importance so you know uh so that is I
3:24
importance so you know uh so that is I
3:24
importance so you know uh so that is I would say consistency how we Define in
3:27
would say consistency how we Define in
3:27
would say consistency how we Define in in this so all the all the noes should
3:30
in this so all the all the noes should
3:30
in this so all the all the noes should have identical copy U the few the things
3:34
have identical copy U the few the things
3:34
have identical copy U the few the things that we can uh we can consider here is
3:37
that we can uh we can consider here is
3:37
that we can uh we can consider here is that you know it is a um you know it's a
3:40
that you know it is a um you know it's a
3:40
that you know it is a um you know it's a strong form of the consistency we're
3:41
strong form of the consistency we're
3:41
strong form of the consistency we're talking about here right there are some
3:43
talking about here right there are some
3:43
talking about here right there are some lose form called eventual consistency
3:45
lose form called eventual consistency
3:45
lose form called eventual consistency that we we'll learn later in this
3:47
that we we'll learn later in this
3:47
that we we'll learn later in this session but so but we are saying that
3:50
session but so but we are saying that
3:50
session but so but we are saying that when in cap theorem we talk about
3:52
when in cap theorem we talk about
3:52
when in cap theorem we talk about consistency is a strong form means all
3:55
consistency is a strong form means all
3:55
consistency is a strong form means all the all the no like all the copies in in
3:58
the all the no like all the copies in in
3:58
the all the no like all the copies in in different data node should have the same
4:00
different data node should have the same
4:00
different data node should have the same data and whatever user access you know
4:03
data and whatever user access you know
4:03
data and whatever user access you know across the globe and whoever accesses
4:06
across the globe and whoever accesses
4:06
across the globe and whoever accesses that they should all get the same data
4:07
that they should all get the same data
4:07
that they should all get the same data so that's a consistency part in in cap
4:11
so that's a consistency part in in cap
4:11
so that's a consistency part in in cap what is so in cap C was the consistency
4:14
what is so in cap C was the consistency
4:14
what is so in cap C was the consistency now you can relate that what cap means
4:16
now you can relate that what cap means
4:16
now you can relate that what cap means so consistency of course and next is
4:19
so consistency of course and next is
4:19
so consistency of course and next is availability so again availability is is
4:22
availability so again availability is is
4:22
availability so again availability is is again uh very important uh and I would
4:25
again uh very important uh and I would
4:25
again uh very important uh and I would say nowadays most systems are built by
4:29
say nowadays most systems are built by
4:29
say nowadays most systems are built by prioritizing availability over
4:31
prioritizing availability over
4:31
prioritizing availability over consistency and there is reason for it
4:34
consistency and there is reason for it
4:34
consistency and there is reason for it uh you know so we'll talk about those
4:37
uh you know so we'll talk about those
4:37
uh you know so we'll talk about those reasons later but let's talk about what
4:39
reasons later but let's talk about what
4:39
reasons later but let's talk about what availability exactly
4:41
availability exactly
4:41
availability exactly means so availability uh you know as you
4:45
means so availability uh you know as you
4:45
means so availability uh you know as you can understand that system should be
4:47
can understand that system should be
4:47
can understand that system should be available to take additional request
4:50
available to take additional request
4:50
available to take additional request that's what we are seeing that you know
4:52
that's what we are seeing that you know
4:52
that's what we are seeing that you know any any read happening any right
4:54
any any read happening any right
4:54
any any read happening any right happening system should be able to U
4:57
happening system should be able to U
4:57
happening system should be able to U respond that yes you know it it is able
5:00
respond that yes you know it it is able
5:00
respond that yes you know it it is able to uh take up the request right and and
5:04
to uh take up the request right and and
5:04
to uh take up the request right and and if there any failure uh it should have
5:07
if there any failure uh it should have
5:07
if there any failure uh it should have should come back with a reasonable time
5:09
should come back with a reasonable time
5:09
should come back with a reasonable time so it's it's not that that okay it it is
5:11
so it's it's not that that okay it it is
5:11
so it's it's not that that okay it it is not available for a longer time you know
5:13
not available for a longer time you know
5:13
not available for a longer time you know maybe few seconds here and there it may
5:15
maybe few seconds here and there it may
5:15
maybe few seconds here and there it may still be considered okay but it's not
5:18
still be considered okay but it's not
5:18
still be considered okay but it's not like that it is going of uh down for for
5:20
like that it is going of uh down for for
5:20
like that it is going of uh down for for a longer time or hours or days right so
5:23
a longer time or hours or days right so
5:23
a longer time or hours or days right so the availability is is is very important
5:26
the availability is is is very important
5:26
the availability is is is very important I think you folks might remember that uh
5:29
I think you folks might remember that uh
5:29
I think you folks might remember that uh there was a down of I guess go go
5:31
there was a down of I guess go go
5:31
there was a down of I guess go go services for you know for some time and
5:33
services for you know for some time and
5:33
services for you know for some time and I think the recent example of uh you
5:36
I think the recent example of uh you
5:36
I think the recent example of uh you know the the cloud force or something
5:38
know the the cloud force or something
5:38
know the the cloud force or something happened that with the antivirus system
5:40
happened that with the antivirus system
5:40
happened that with the antivirus system and then for for entire day the you know
5:44
and then for for entire day the you know
5:44
and then for for entire day the you know system across I would say
5:47
system across I would say
5:47
system across I would say Globe the users who were using Windows
5:50
Globe the users who were using Windows
5:50
Globe the users who were using Windows 10 they were impacted um you know people
5:53
10 they were impacted um you know people
5:53
10 they were impacted um you know people were stuck in the flights even even
5:55
were stuck in the flights even even
5:55
were stuck in the flights even even different I would say stock market and
5:57
different I would say stock market and
5:58
different I would say stock market and you know whole lot of problem came
5:59
you know whole lot of problem came
5:59
you know whole lot of problem came because
6:00
because
6:00
because uh system was not available actually so
6:03
uh system was not available actually so
6:03
uh system was not available actually so you can imagine the the problem uh can
6:06
you can imagine the the problem uh can
6:06
you can imagine the the problem uh can come if the system is not I would say
6:08
come if the system is not I would say
6:08
come if the system is not I would say designed for availability right so
6:11
designed for availability right so
6:11
designed for availability right so there's availability bit of cap the last
6:14
there's availability bit of cap the last
6:14
there's availability bit of cap the last is partition tolerance so when we talk
6:17
is partition tolerance so when we talk
6:17
is partition tolerance so when we talk about uh distributive system partition
6:20
about uh distributive system partition
6:20
about uh distributive system partition tolerance is going to become essential
6:22
tolerance is going to become essential
6:22
tolerance is going to become essential because we are talking about uh you know
6:25
because we are talking about uh you know
6:25
because we are talking about uh you know different network partitions basically
6:27
different network partitions basically
6:27
different network partitions basically partition tolerance is refers to the
6:29
partition tolerance is refers to the
6:29
partition tolerance is refers to the network partition that their systems are
6:31
network partition that their systems are
6:31
network partition that their systems are connected with with network you know
6:34
connected with with network you know
6:34
connected with with network you know across the globe so what we saying is
6:37
across the globe so what we saying is
6:37
across the globe so what we saying is that when we say partition tolerance so
6:40
that when we say partition tolerance so
6:40
that when we say partition tolerance so basically they should be able to
6:41
basically they should be able to
6:41
basically they should be able to establish the connections so that uh you
6:44
establish the connections so that uh you
6:44
establish the connections so that uh you know they can communicate to different
6:46
know they can communicate to different
6:46
know they can communicate to different nodes observers can communicate to each
6:48
nodes observers can communicate to each
6:48
nodes observers can communicate to each other so that's that's basically we
6:52
other so that's that's basically we
6:52
other so that's that's basically we talking about here now what cap so now
6:55
talking about here now what cap so now
6:55
talking about here now what cap so now we understood that what partition
6:57
we understood that what partition
6:57
we understood that what partition tolerance means U what uh availability
7:00
tolerance means U what uh availability
7:00
tolerance means U what uh availability means what what basically consistency
7:03
means what what basically consistency
7:03
means what what basically consistency means so these were the three essential
7:05
means so these were the three essential
7:05
means so these were the three essential component of cap now here is an
7:06
component of cap now here is an
7:06
component of cap now here is an interesting part what cap theorem says
7:10
interesting part what cap theorem says
7:10
interesting part what cap theorem says it what it says is
7:12
it what it says is
7:12
it what it says is that in a distribution system you can't
7:16
that in a distribution system you can't
7:16
that in a distribution system you can't have all three at the same time you can
7:18
have all three at the same time you can
7:18
have all three at the same time you can have Max two right uh out of cap you can
7:22
have Max two right uh out of cap you can
7:22
have Max two right uh out of cap you can have up to two you can't have all three
7:26
have up to two you can't have all three
7:26
have up to two you can't have all three so for example if there is a uh Network
7:29
so for example if there is a uh Network
7:29
so for example if there is a uh Network conect connections failure so basically
7:30
conect connections failure so basically
7:31
conect connections failure so basically it's no more partition tolerance so you
7:34
it's no more partition tolerance so you
7:34
it's no more partition tolerance so you can't have you know availability and
7:36
can't have you know availability and
7:36
can't have you know availability and consistency both because if it is
7:40
consistency both because if it is
7:40
consistency both because if it is available you know it it can't be
7:42
available you know it it can't be
7:42
available you know it it can't be consistent if it is consistent it can't
7:44
consistent if it is consistent it can't
7:44
consistent if it is consistent it can't be available in case of this uh you know
7:47
be available in case of this uh you know
7:47
be available in case of this uh you know the the network failure so what is
7:49
the the network failure so what is
7:49
the the network failure so what is saying that you can have up to two so
7:53
saying that you can have up to two so
7:53
saying that you can have up to two so you can have either mix of consistency
7:56
you can have either mix of consistency
7:56
you can have either mix of consistency availability you can have mix of
7:58
availability you can have mix of
7:58
availability you can have mix of availability and partition tolerance and
8:00
availability and partition tolerance and
8:00
availability and partition tolerance and you can have consistency and partition
8:02
you can have consistency and partition
8:02
you can have consistency and partition tolerance as well so you need to
8:04
tolerance as well so you need to
8:04
tolerance as well so you need to prioritize that with your your
8:06
prioritize that with your your
8:07
prioritize that with your your application is is read heavy WR heavy
8:09
application is is read heavy WR heavy
8:09
application is is read heavy WR heavy designed for consistency designed for
8:11
designed for consistency designed for
8:11
designed for consistency designed for availability what matters to you more
8:14
availability what matters to you more
8:14
availability what matters to you more for example I give few example uh you
8:16
for example I give few example uh you
8:16
for example I give few example uh you know system systems like you know uh
8:19
know system systems like you know uh
8:20
know system systems like you know uh Financial systems like any Bank
8:22
Financial systems like any Bank
8:22
Financial systems like any Bank applications or any of that kind for
8:24
applications or any of that kind for
8:24
applications or any of that kind for them uh consistency matters a lot they
8:28
them uh consistency matters a lot they
8:28
them uh consistency matters a lot they if you're having some transactions you
8:30
if you're having some transactions you
8:30
if you're having some transactions you can't afford to get updated balance
8:32
can't afford to get updated balance
8:32
can't afford to get updated balance maybe after few minutes or a few hours
8:35
maybe after few minutes or a few hours
8:35
maybe after few minutes or a few hours right you got to have a quick I would
8:37
right you got to have a quick I would
8:37
right you got to have a quick I would say change and it should be reflect in
8:40
say change and it should be reflect in
8:40
say change and it should be reflect in all the places all the copy so that you
8:42
all the places all the copy so that you
8:43
all the places all the copy so that you check the balance from ATM you check the
8:44
check the balance from ATM you check the
8:44
check the balance from ATM you check the balance from app or website you
8:46
balance from app or website you
8:46
balance from app or website you shouldn't be getting different uh I
8:48
shouldn't be getting different uh I
8:48
shouldn't be getting different uh I would say data so that's a so in in such
8:51
would say data so that's a so in in such
8:51
would say data so that's a so in in such Financial uh you know just example there
8:54
Financial uh you know just example there
8:54
Financial uh you know just example there are many other example can can be other
8:57
are many other example can can be other
8:57
are many other example can can be other you know we can put it but the simplest
8:59
you know we can put it but the simplest
8:59
you know we can put it but the simplest could be that so you can't so you you
9:02
could be that so you can't so you you
9:02
could be that so you can't so you you got to priortize consistency over over
9:04
got to priortize consistency over over
9:04
got to priortize consistency over over anything else so that is a consistency
9:06
anything else so that is a consistency
9:06
anything else so that is a consistency bit there right for example availability
9:09
bit there right for example availability
9:09
bit there right for example availability so let's say the example of X or you
9:11
so let's say the example of X or you
9:11
so let's say the example of X or you know Twitter right so there uh you post
9:14
know Twitter right so there uh you post
9:15
know Twitter right so there uh you post something if you if you add something
9:17
something if you if you add something
9:17
something if you if you add something it's okay if it is not coming quickly
9:19
it's okay if it is not coming quickly
9:19
it's okay if it is not coming quickly right you can you know manage to okay if
9:22
right you can you know manage to okay if
9:22
right you can you know manage to okay if if you do it like now maybe it is coming
9:26
if you do it like now maybe it is coming
9:26
if you do it like now maybe it is coming after it is showing into the your your
9:28
after it is showing into the your your
9:28
after it is showing into the your your feed after let's say a few minutes
9:30
feed after let's say a few minutes
9:30
feed after let's say a few minutes that's okay you know it's not a big deal
9:33
that's okay you know it's not a big deal
9:33
that's okay you know it's not a big deal uh because you know basically it's not
9:36
uh because you know basically it's not
9:36
uh because you know basically it's not you know I would say you're not having a
9:38
you know I would say you're not having a
9:38
you know I would say you're not having a a lot lot of financial I would say loss
9:40
a lot lot of financial I would say loss
9:40
a lot lot of financial I would say loss over there but in the inter in the
9:42
over there but in the inter in the
9:42
over there but in the inter in the financial systems if you if the data is
9:44
financial systems if you if the data is
9:44
financial systems if you if the data is uh not consistent so you can end up
9:48
uh not consistent so you can end up
9:48
uh not consistent so you can end up having some Financial loss as well so
9:51
having some Financial loss as well so
9:51
having some Financial loss as well so based on the huge case based on what
9:53
based on the huge case based on what
9:53
based on the huge case based on what kind of application you are building you
9:54
kind of application you are building you
9:54
kind of application you are building you got to prioritize whether you you care
9:57
got to prioritize whether you you care
9:57
got to prioritize whether you you care more for consistency or care more for
10:00
more for consistency or care more for
10:00
more for consistency or care more for availability so this is essentially
10:03
availability so this is essentially
10:03
availability so this is essentially essentially cap Thum U as you can um
10:07
essentially cap Thum U as you can um
10:07
essentially cap Thum U as you can um read through that so uh basically
10:11
read through that so uh basically
10:11
read through that so uh basically example like you know so there's like ca
10:14
example like you know so there's like ca
10:14
example like you know so there's like ca consistency availability if you're
10:15
consistency availability if you're
10:15
consistency availability if you're looking for so rdbms can be the good
10:17
looking for so rdbms can be the good
10:17
looking for so rdbms can be the good example if you're looking for
10:19
example if you're looking for
10:19
example if you're looking for availability and partition tolerance so
10:21
availability and partition tolerance so
10:21
availability and partition tolerance so app systems like Cassandra all those
10:24
app systems like Cassandra all those
10:24
app systems like Cassandra all those Dynamo de they are built for AP kind of
10:27
Dynamo de they are built for AP kind of
10:27
Dynamo de they are built for AP kind of setup you looking for for CP then of
10:30
setup you looking for for CP then of
10:30
setup you looking for for CP then of course mongodb is a good example there
10:33
course mongodb is a good example there
10:33
course mongodb is a good example there so so these system are configured I
10:37
so so these system are configured I
10:37
so so these system are configured I would say by default for for some of
10:39
would say by default for for some of
10:39
would say by default for for some of these you know either of these I would
10:41
these you know either of these I would
10:41
these you know either of these I would say uh variant and there are some
10:44
say uh variant and there are some
10:44
say uh variant and there are some configuration that you can maybe tailor
10:45
configuration that you can maybe tailor
10:45
configuration that you can maybe tailor it but this is a default one and U and
10:49
it but this is a default one and U and
10:49
it but this is a default one and U and based on that you can take a call that
10:51
based on that you can take a call that
10:51
based on that you can take a call that which one you want would like to go with
10:54
which one you want would like to go with
10:54
which one you want would like to go with or which one you like to prioritize now
10:56
or which one you like to prioritize now
10:56
or which one you like to prioritize now let's go a little deeper on the ca and
10:59
let's go a little deeper on the ca and
10:59
let's go a little deeper on the ca and and CP system to understand more on
11:02
and CP system to understand more on
11:02
and CP system to understand more on those so as you said uh AP is
11:05
those so as you said uh AP is
11:05
those so as you said uh AP is availability and partition tolerance so
11:07
availability and partition tolerance so
11:07
availability and partition tolerance so you know you're basically you're saying
11:08
you know you're basically you're saying
11:08
you know you're basically you're saying that you're okay to let go consistency a
11:11
that you're okay to let go consistency a
11:11
that you're okay to let go consistency a bit but you would like to have more
11:13
bit but you would like to have more
11:13
bit but you would like to have more focus on availability of the system and
11:15
focus on availability of the system and
11:15
focus on availability of the system and partition
11:16
partition
11:16
partition tolerance so what exactly we trying to
11:18
tolerance so what exactly we trying to
11:18
tolerance so what exactly we trying to say you're trying to say the same thing
11:20
say you're trying to say the same thing
11:20
say you're trying to say the same thing as they said uh you're okay
11:23
as they said uh you're okay
11:23
as they said uh you're okay to you know um okay to respond little
11:28
to you know um okay to respond little
11:28
to you know um okay to respond little bit scale data uh because you're
11:30
bit scale data uh because you're
11:30
bit scale data uh because you're prioritising availability and and
11:31
prioritising availability and and
11:31
prioritising availability and and partition tolerance a bit they give the
11:33
partition tolerance a bit they give the
11:33
partition tolerance a bit they give the example of social media feeds right it's
11:35
example of social media feeds right it's
11:35
example of social media feeds right it's not a very big deal that your feeds are
11:37
not a very big deal that your feeds are
11:37
not a very big deal that your feeds are coming maybe few minutes later so you
11:40
coming maybe few minutes later so you
11:40
coming maybe few minutes later so you you want to uh make it available more uh
11:43
you want to uh make it available more uh
11:43
you want to uh make it available more uh let's say your users are trying to reach
11:45
let's say your users are trying to reach
11:45
let's say your users are trying to reach your profile um if it is not available
11:48
your profile um if it is not available
11:48
your profile um if it is not available they will be more annoyed versus your
11:50
they will be more annoyed versus your
11:51
they will be more annoyed versus your feeds are coming a little bit slower
11:52
feeds are coming a little bit slower
11:52
feeds are coming a little bit slower right so availability is more important
11:54
right so availability is more important
11:54
right so availability is more important uh in this case in the social media I
11:56
uh in this case in the social media I
11:56
uh in this case in the social media I give example right you know U than the
12:00
give example right you know U than the
12:00
give example right you know U than the consistency so that could be kind of
12:02
consistency so that could be kind of
12:02
consistency so that could be kind of called as a maybe AP systems right where
12:05
called as a maybe AP systems right where
12:05
called as a maybe AP systems right where availability and Par tolerance are are
12:07
availability and Par tolerance are are
12:07
availability and Par tolerance are are more
12:09
more
12:09
more important uh again um you know we saying
12:12
important uh again um you know we saying
12:12
important uh again um you know we saying about partition tolerance so we are
12:13
about partition tolerance so we are
12:13
about partition tolerance so we are saying distributed system across nodes
12:15
saying distributed system across nodes
12:15
saying distributed system across nodes are you know the reliability part of it
12:18
are you know the reliability part of it
12:18
are you know the reliability part of it right that they are they are able to you
12:20
right that they are they are able to you
12:20
right that they are they are able to you have designed the system which are
12:22
have designed the system which are
12:22
have designed the system which are partition tolerance or network partition
12:24
partition tolerance or network partition
12:24
partition tolerance or network partition tolerance to be specific that in case of
12:27
tolerance to be specific that in case of
12:27
tolerance to be specific that in case of any any network failure you have some
12:29
any any network failure you have some
12:29
any any network failure you have some backup or some different system uh
12:32
backup or some different system uh
12:32
backup or some different system uh designed so that they can you can get I
12:34
designed so that they can you can get I
12:34
designed so that they can you can get I would say response uh it's not totally
12:38
would say response uh it's not totally
12:38
would say response uh it's not totally kind up down as such so you have you
12:40
kind up down as such so you have you
12:40
kind up down as such so you have you have taken care of the replicas or or
12:42
have taken care of the replicas or or
12:42
have taken care of the replicas or or different you know things that you need
12:44
different you know things that you need
12:44
different you know things that you need to take care for for Network par
12:47
to take care for for Network par
12:47
to take care for for Network par tolerance example you know we give that
12:49
tolerance example you know we give that
12:49
tolerance example you know we give that you know DB Google Cloud kind of things
12:52
you know DB Google Cloud kind of things
12:52
you know DB Google Cloud kind of things like that so these are like you know the
12:54
like that so these are like you know the
12:54
like that so these are like you know the typical AP systems now let's say what is
12:56
typical AP systems now let's say what is
12:56
typical AP systems now let's say what is a CA system okay
12:59
a CA system okay
12:59
a CA system okay uh consistency and availability so here
13:03
uh consistency and availability so here
13:03
uh consistency and availability so here it's okay that you know um so what we do
13:06
it's okay that you know um so what we do
13:06
it's okay that you know um so what we do here we availability over consistency
13:08
here we availability over consistency
13:08
here we availability over consistency for sure and and
13:11
for sure and and
13:11
for sure and and also basically we we we partise
13:14
also basically we we we partise
13:14
also basically we we we partise availability
13:15
availability
13:15
availability uh and and we are seeing that uh we are
13:19
uh and and we are seeing that uh we are
13:19
uh and and we are seeing that uh we are okay to have this partition tolerance
13:22
okay to have this partition tolerance
13:22
okay to have this partition tolerance and systems like cendra video m m with
13:25
and systems like cendra video m m with
13:25
and systems like cendra video m m with the example what is CP here consistency
13:28
the example what is CP here consistency
13:28
the example what is CP here consistency and partition intolerance we are saying
13:30
and partition intolerance we are saying
13:30
and partition intolerance we are saying that we priortize
13:34
consistency over of course we don't have
13:36
consistency over of course we don't have
13:36
consistency over of course we don't have avability so we we are excusing
13:38
avability so we we are excusing
13:38
avability so we we are excusing availability but we we want that
13:39
availability but we we want that
13:39
availability but we we want that consistency should be important and of
13:42
consistency should be important and of
13:42
consistency should be important and of course uh partition tolerance is also
13:45
course uh partition tolerance is also
13:45
course uh partition tolerance is also important right so uh for example mongod
13:49
important right so uh for example mongod
13:49
important right so uh for example mongod Dev and all that could that could be
13:51
Dev and all that could that could be
13:51
Dev and all that could that could be example of
13:53
example of
13:53
example of that uh so basically these were the I
13:55
that uh so basically these were the I
13:56
that uh so basically these were the I would say three different version or
13:58
would say three different version or
13:58
would say three different version or variant of uh I would say that you can
14:02
variant of uh I would say that you can
14:02
variant of uh I would say that you can imagine out of cap that you can pick and
14:05
imagine out of cap that you can pick and
14:05
imagine out of cap that you can pick and choose that what your system is kind of
14:09
choose that what your system is kind of
14:09
choose that what your system is kind of closure to which which one of that group
14:12
closure to which which one of that group
14:12
closure to which which one of that group and accordingly you can take a call or
14:13
and accordingly you can take a call or
14:13
and accordingly you can take a call or you can design
14:15
you can design
14:15
you can design that now uh I think uh we discussed a
14:19
that now uh I think uh we discussed a
14:19
that now uh I think uh we discussed a bit that
14:20
bit that
14:21
bit that nowadays applications are designed uh
14:23
nowadays applications are designed uh
14:23
nowadays applications are designed uh for typically AP availability and
14:26
for typically AP availability and
14:26
for typically AP availability and partition partition tolerance they old
14:29
partition partition tolerance they old
14:29
partition partition tolerance they old okay to let go consistency for for Mo
14:32
okay to let go consistency for for Mo
14:32
okay to let go consistency for for Mo most part baring few exceptions like
14:34
most part baring few exceptions like
14:34
most part baring few exceptions like financial and few other uh critical I
14:37
financial and few other uh critical I
14:37
financial and few other uh critical I would say domain where consistency is is
14:40
would say domain where consistency is is
14:40
would say domain where consistency is is more important you know there's a loss
14:42
more important you know there's a loss
14:42
more important you know there's a loss if we if you're not
14:44
if we if you're not
14:44
if we if you're not consistent so for that uh there is a
14:47
consistent so for that uh there is a
14:47
consistent so for that uh there is a concept called eventual consistency so
14:50
concept called eventual consistency so
14:50
concept called eventual consistency so although we are saying that we are not
14:52
although we are saying that we are not
14:52
although we are saying that we are not consistent In The Same Spirit as cap
14:55
consistent In The Same Spirit as cap
14:55
consistent In The Same Spirit as cap theorum says for AP systems but we are
14:57
theorum says for AP systems but we are
14:57
theorum says for AP systems but we are eventually consistent
14:59
eventually consistent
14:59
eventually consistent what it means is
15:01
what it means is
15:01
what it means is that we you know will be eventually uh
15:06
that we you know will be eventually uh
15:06
that we you know will be eventually uh catch up with our consistency so let's
15:07
catch up with our consistency so let's
15:08
catch up with our consistency so let's say there there are some periods of time
15:10
say there there are some periods of time
15:10
say there there are some periods of time when we may not be consistent means all
15:13
when we may not be consistent means all
15:13
when we may not be consistent means all the let's say let's take a technical
15:16
the let's say let's take a technical
15:16
the let's say let's take a technical example so in data nodes all the
15:18
example so in data nodes all the
15:18
example so in data nodes all the replicas not all of them will have the
15:21
replicas not all of them will have the
15:21
replicas not all of them will have the same data for a period of time let's say
15:23
same data for a period of time let's say
15:23
same data for a period of time let's say 15 minute 30 minute depending on this
15:25
15 minute 30 minute depending on this
15:25
15 minute 30 minute depending on this you know the schedule of syncing and
15:27
you know the schedule of syncing and
15:27
you know the schedule of syncing and things like that but saying that
15:29
things like that but saying that
15:29
things like that but saying that eventually we'll have right that
15:32
eventually we'll have right that
15:32
eventually we'll have right that eventual the duration can be configured
15:34
eventual the duration can be configured
15:34
eventual the duration can be configured right based on many other factors so
15:38
right based on many other factors so
15:38
right based on many other factors so that is a eventual consistency that you
15:40
that is a eventual consistency that you
15:40
that is a eventual consistency that you know it's not like forever we are going
15:41
know it's not like forever we are going
15:41
know it's not like forever we are going to be uh inconsistent right so we are
15:44
to be uh inconsistent right so we are
15:44
to be uh inconsistent right so we are saying that eventually we will be
15:45
saying that eventually we will be
15:45
saying that eventually we will be consistent so that's the eventual
15:48
consistent so that's the eventual
15:48
consistent so that's the eventual consistency B in AP system so that way
15:50
consistency B in AP system so that way
15:51
consistency B in AP system so that way AP systems are I would say preferred
15:52
AP systems are I would say preferred
15:53
AP systems are I would say preferred nowadays that they provide availability
15:56
nowadays that they provide availability
15:56
nowadays that they provide availability and partition tolerance at the same time
15:58
and partition tolerance at the same time
15:58
and partition tolerance at the same time they also have you know I would say if
16:01
they also have you know I would say if
16:01
they also have you know I would say if not strong consistency means point in
16:04
not strong consistency means point in
16:04
not strong consistency means point in time consistency but they have eventual
16:05
time consistency but they have eventual
16:05
time consistency but they have eventual consistency so over a period of time
16:07
consistency so over a period of time
16:07
consistency so over a period of time they catch up right so that's for most
16:10
they catch up right so that's for most
16:10
they catch up right so that's for most part or for most scenario this is okay
16:13
part or for most scenario this is okay
16:13
part or for most scenario this is okay this scenario can be accepted so that
16:15
this scenario can be accepted so that
16:15
this scenario can be accepted so that way uh you know um nowadays most systems
16:20
way uh you know um nowadays most systems
16:20
way uh you know um nowadays most systems are kind of I would say taking this this
16:23
are kind of I would say taking this this
16:23
are kind of I would say taking this this AP I would say avability and Par
16:26
AP I would say avability and Par
16:26
AP I would say avability and Par tolerance out of the three uh two other
16:29
tolerance out of the three uh two other
16:29
tolerance out of the three uh two other variants that we just looked
16:31
variants that we just looked
16:31
variants that we just looked at so hope hope now it is clear about uh
16:35
at so hope hope now it is clear about uh
16:35
at so hope hope now it is clear about uh I would say eventual consistency what it
16:37
I would say eventual consistency what it
16:37
I would say eventual consistency what it means um you
16:39
means um you
16:39
means um you know now there is a u there's extension
16:44
know now there is a u there's extension
16:44
know now there is a u there's extension to that
16:47
to that
16:47
to that so uh you know in in cap theum what you
16:52
so uh you know in in cap theum what you
16:52
so uh you know in in cap theum what you say this uh we talk about either AP you
16:56
say this uh we talk about either AP you
16:56
say this uh we talk about either AP you got about either
16:57
got about either
16:57
got about either CA right so or you can you can talk
17:01
CA right so or you can you can talk
17:01
CA right so or you can you can talk about AC as well so there are three
17:03
about AC as well so there are three
17:03
about AC as well so there are three three different but so there is a
17:05
three different but so there is a
17:05
three different but so there is a extension came in called
17:08
extension came in called
17:08
extension came in called pacc so what it means is that is
17:11
pacc so what it means is that is
17:11
pacc so what it means is that is basically you know partition
17:13
basically you know partition
17:13
basically you know partition availability consistency else uh the
17:16
availability consistency else uh the
17:16
availability consistency else uh the full form is little interesting so
17:18
full form is little interesting so
17:18
full form is little interesting so partition uh partition availability
17:20
partition uh partition availability
17:20
partition uh partition availability consistency else latency consistency so
17:24
consistency else latency consistency so
17:24
consistency else latency consistency so is not talking about latency as
17:26
is not talking about latency as
17:26
is not talking about latency as such so uh this Pac ELC theorem has
17:31
such so uh this Pac ELC theorem has
17:31
such so uh this Pac ELC theorem has extended that that what is it is
17:33
extended that that what is it is
17:33
extended that that what is it is essentially saying that if there is a
17:35
essentially saying that if there is a
17:35
essentially saying that if there is a network partition right means you're not
17:37
network partition right means you're not
17:37
network partition right means you're not able to connect to other nodes your your
17:39
able to connect to other nodes your your
17:39
able to connect to other nodes your your network is
17:41
network is
17:41
network is broken then either uh basically you can
17:44
broken then either uh basically you can
17:44
broken then either uh basically you can have
17:45
have
17:45
have availability uh you can have either
17:48
availability uh you can have either
17:48
availability uh you can have either availability or consistency you can't
17:50
availability or consistency you can't
17:50
availability or consistency you can't have both for sure so uh that is that is
17:54
have both for sure so uh that is that is
17:54
have both for sure so uh that is that is one that is similar to I would say the
17:56
one that is similar to I would say the
17:56
one that is similar to I would say the cap but the difference is that if it is
17:59
cap but the difference is that if it is
17:59
cap but the difference is that if it is if it is not then what you can say you
18:02
if it is not then what you can say you
18:02
if it is not then what you can say you can you can live with latency and
18:04
can you can live with latency and
18:04
can you can live with latency and consistency so we are saying that isad
18:06
consistency so we are saying that isad
18:07
consistency so we are saying that isad of availability you can you can have
18:09
of availability you can you can have
18:09
of availability you can you can have latency so you know you the data can be
18:12
latency so you know you the data can be
18:12
latency so you know you the data can be the it can be little slow because it may
18:14
the it can be little slow because it may
18:14
the it can be little slow because it may take time to update or it may take it
18:17
take time to update or it may take it
18:17
take time to update or it may take it may take time to come back let's say
18:19
may take time to come back let's say
18:19
may take time to come back let's say there are some downtime so you can uh
18:23
there are some downtime so you can uh
18:23
there are some downtime so you can uh you can if there's a there's no
18:25
you can if there's a there's no
18:25
you can if there's a there's no partition so you know uh you can have
18:28
partition so you know uh you can have
18:28
partition so you know uh you can have consistency and and you can have latency
18:31
consistency and and you can have latency
18:31
consistency and and you can have latency means it it won't be that that faster
18:34
means it it won't be that that faster
18:34
means it it won't be that that faster but yeah eventually it will catch up so
18:36
but yeah eventually it will catch up so
18:36
but yeah eventually it will catch up so you can pick between these two so that's
18:39
you can pick between these two so that's
18:39
you can pick between these two so that's a that's a p CC theorem talks about it's
18:43
a that's a p CC theorem talks about it's
18:43
a that's a p CC theorem talks about it's a Extinction of uh I would say cap th
18:46
a Extinction of uh I would say cap th
18:46
a Extinction of uh I would say cap th now take a now now this was the I would
18:50
now take a now now this was the I would
18:50
now take a now now this was the I would say essential of of cap and N Pac see
18:54
say essential of of cap and N Pac see
18:54
say essential of of cap and N Pac see now let's take a example so that way uh
18:56
now let's take a example so that way uh
18:56
now let's take a example so that way uh you would be more clearer on on what
18:59
you would be more clearer on on what
18:59
you would be more clearer on on what exactly how to visualize this this cap
19:02
exactly how to visualize this this cap
19:02
exactly how to visualize this this cap theorem in in in in day-to-day I would
19:05
theorem in in in in day-to-day I would
19:05
theorem in in in in day-to-day I would say reality right so let's take
19:08
say reality right so let's take
19:08
say reality right so let's take example let's say uh you know um again I
19:12
example let's say uh you know um again I
19:12
example let's say uh you know um again I I I refer this example from one of the I
19:15
I I refer this example from one of the I
19:15
I I refer this example from one of the I would say I was going through some
19:16
would say I was going through some
19:16
would say I was going through some article so thanks to the you know people
19:19
article so thanks to the you know people
19:19
article so thanks to the you know people who give I was with a nice example so
19:22
who give I was with a nice example so
19:22
who give I was with a nice example so it's very easy to relate with this with
19:24
it's very easy to relate with this with
19:24
it's very easy to relate with this with the capm principle right so let's say uh
19:27
the capm principle right so let's say uh
19:27
the capm principle right so let's say uh me and my friend are running a startup
19:30
me and my friend are running a startup
19:30
me and my friend are running a startup okay and U the startup is all about you
19:34
okay and U the startup is all about you
19:34
okay and U the startup is all about you know noting down let's say this a
19:35
know noting down let's say this a
19:35
know noting down let's say this a reminder service so let's say I have a I
19:39
reminder service so let's say I have a I
19:39
reminder service so let's say I have a I have some task tomorrow to do some
19:41
have some task tomorrow to do some
19:41
have some task tomorrow to do some important task so instead of me noting
19:43
important task so instead of me noting
19:43
important task so instead of me noting down those task uh I'm I'm running a
19:47
down those task uh I'm I'm running a
19:47
down those task uh I'm I'm running a startup where I'm calling to the number
19:49
startup where I'm calling to the number
19:49
startup where I'm calling to the number and they are reminding me on certain
19:51
and they are reminding me on certain
19:51
and they are reminding me on certain time that hey you have a flight that day
19:53
time that hey you have a flight that day
19:53
time that hey you have a flight that day you have a part meeting that day so I'm
19:54
you have a part meeting that day so I'm
19:54
you have a part meeting that day so I'm getting a reminder from from the service
19:56
getting a reminder from from the service
19:56
getting a reminder from from the service right service provider so I'm I'm
19:59
right service provider so I'm I'm
19:59
right service provider so I'm I'm running that service provider where I'm
20:01
running that service provider where I'm
20:01
running that service provider where I'm taking a uh I'm kind of taking a call
20:04
taking a uh I'm kind of taking a call
20:04
taking a uh I'm kind of taking a call from people to uh to note down their
20:07
from people to uh to note down their
20:07
from people to uh to note down their appointments and I'm reminding them on
20:09
appointments and I'm reminding them on
20:09
appointments and I'm reminding them on on before maybe let's say five 10
20:11
on before maybe let's say five 10
20:11
on before maybe let's say five 10 minutes before on the actual appointment
20:13
minutes before on the actual appointment
20:13
minutes before on the actual appointment so that's a let's say I'm running a
20:14
so that's a let's say I'm running a
20:14
so that's a let's say I'm running a startup so me and my friend are running
20:17
startup so me and my friend are running
20:17
startup so me and my friend are running a startup so in this setup let's say
20:20
a startup so in this setup let's say
20:20
a startup so in this setup let's say visualize how we can uh how we can
20:23
visualize how we can uh how we can
20:23
visualize how we can uh how we can visualize this the example of
20:25
visualize this the example of
20:25
visualize this the example of consistency example of availability and
20:27
consistency example of availability and
20:27
consistency example of availability and Network this partition tolerance so
20:31
Network this partition tolerance so
20:31
Network this partition tolerance so let's
20:32
let's
20:32
let's say uh you know um somebody uh one of
20:36
say uh you know um somebody uh one of
20:36
say uh you know um somebody uh one of the customer called called me that hey I
20:39
the customer called called me that hey I
20:39
the customer called called me that hey I have I have you know appointment
20:41
have I have you know appointment
20:41
have I have you know appointment tomorrow it's
20:42
tomorrow it's
20:42
tomorrow it's 9:00 and and of course I provide service
20:45
9:00 and and of course I provide service
20:46
9:00 and and of course I provide service to remind so I'm noting down let's say
20:48
to remind so I'm noting down let's say
20:48
to remind so I'm noting down let's say it's a system that I am taking a note of
20:50
it's a system that I am taking a note of
20:50
it's a system that I am taking a note of in one note or some system I have or
20:52
in one note or some system I have or
20:52
in one note or some system I have or even I'm putting into U you know some
20:55
even I'm putting into U you know some
20:55
even I'm putting into U you know some system that I maintain and my friend
20:58
system that I maintain and my friend
20:58
system that I maintain and my friend also has something
21:00
also has something
21:00
also has something so I I noted down U that okay this
21:05
so I I noted down U that okay this
21:05
so I I noted down U that okay this person has appointment at 9 9
21:09
person has appointment at 9 9
21:09
person has appointment at 9 9 9:00 and due to some reason I'm not able
21:12
9:00 and due to some reason I'm not able
21:12
9:00 and due to some reason I'm not able to uh I would say my friend is is also
21:16
to uh I would say my friend is is also
21:16
to uh I would say my friend is is also kind of a my also maintains the list of
21:20
kind of a my also maintains the list of
21:20
kind of a my also maintains the list of the of the customers who have called but
21:22
the of the customers who have called but
21:22
the of the customers who have called but due to some reason maybe I could not
21:25
due to some reason maybe I could not
21:25
due to some reason maybe I could not share the same data to him right it
21:27
share the same data to him right it
21:27
share the same data to him right it could be any reason would be I could not
21:29
could be any reason would be I could not
21:29
could be any reason would be I could not meet him or maybe the the sinking did
21:32
meet him or maybe the the sinking did
21:32
meet him or maybe the the sinking did not happen from the system that I'm I'm
21:35
not happen from the system that I'm I'm
21:35
not happen from the system that I'm I'm of entering and my friend also having
21:37
of entering and my friend also having
21:37
of entering and my friend also having system so there was some issue that uh
21:40
system so there was some issue that uh
21:40
system so there was some issue that uh the data that I have that Mr X has
21:43
the data that I have that Mr X has
21:43
the data that I have that Mr X has appointment at 9:00 tomorrow my friend
21:45
appointment at 9:00 tomorrow my friend
21:45
appointment at 9:00 tomorrow my friend doesn't have so let's say U the you know
21:49
doesn't have so let's say U the you know
21:49
doesn't have so let's say U the you know U the customer called that you know uh
21:52
U the customer called that you know uh
21:52
U the customer called that you know uh basically uh to to store the appointment
21:56
basically uh to to store the appointment
21:56
basically uh to to store the appointment so what happens that since my friend
22:00
so what happens that since my friend
22:00
so what happens that since my friend doesn't have the data about that Mr X
22:03
doesn't have the data about that Mr X
22:03
doesn't have the data about that Mr X has appointment at 9:00 tomorrow uh and
22:06
has appointment at 9:00 tomorrow uh and
22:06
has appointment at 9:00 tomorrow uh and if if my you know um if my friend get a
22:10
if if my you know um if my friend get a
22:11
if if my you know um if my friend get a call he will not have the data so
22:13
call he will not have the data so
22:13
call he will not have the data so basically the data that he has and I
22:15
basically the data that he has and I
22:15
basically the data that he has and I have is not consistent basically so it's
22:18
have is not consistent basically so it's
22:18
have is not consistent basically so it's like consistency problem that two system
22:21
like consistency problem that two system
22:21
like consistency problem that two system in this case two person are maintaining
22:24
in this case two person are maintaining
22:24
in this case two person are maintaining the data and they are not having the
22:26
the data and they are not having the
22:27
the data and they are not having the same data ideally they should have have
22:29
same data ideally they should have have
22:29
same data ideally they should have have so it's a consistency problem right so
22:31
so it's a consistency problem right so
22:31
so it's a consistency problem right so that that is easy to imagine that how
22:33
that that is easy to imagine that how
22:34
that that is easy to imagine that how how to visualize this now let's talk
22:36
how to visualize this now let's talk
22:36
how to visualize this now let's talk about availability problem so in this
22:39
about availability problem so in this
22:39
about availability problem so in this case uh to solve this uh consistency
22:44
case uh to solve this uh consistency
22:44
case uh to solve this uh consistency what let's say I have done is that I'm
22:46
what let's say I have done is that I'm
22:46
what let's say I have done is that I'm making sure that until you know I'm
22:50
making sure that until you know I'm
22:50
making sure that until you know I'm sharing all the data with my
22:52
sharing all the data with my
22:52
sharing all the data with my friend uh to solve the consistency
22:55
friend uh to solve the consistency
22:55
friend uh to solve the consistency problem to until I said all the um you
22:58
problem to until I said all the um you
22:58
problem to until I said all the um you know all the data to my friend I'm not
23:00
know all the data to my friend I'm not
23:00
know all the data to my friend I'm not going to take an additional I would say
23:02
going to take an additional I would say
23:02
going to take an additional I would say Remer call so that there is no confusion
23:04
Remer call so that there is no confusion
23:04
Remer call so that there is no confusion right so let's say in this example uh
23:09
right so let's say in this example uh
23:09
right so let's say in this example uh you know I have say five customer called
23:11
you know I have say five customer called
23:11
you know I have say five customer called to for the reminders and uh until I I
23:15
to for the reminders and uh until I I
23:15
to for the reminders and uh until I I make sure that I have shared all the
23:18
make sure that I have shared all the
23:18
make sure that I have shared all the five customer detail to my friend I'm
23:21
five customer detail to my friend I'm
23:21
five customer detail to my friend I'm not going to take a call so let's say uh
23:23
not going to take a call so let's say uh
23:23
not going to take a call so let's say uh second example with my friend got sick
23:25
second example with my friend got sick
23:25
second example with my friend got sick and he's not able to U you know take
23:28
and he's not able to U you know take
23:28
and he's not able to U you know take care about I would say is not working so
23:31
care about I would say is not working so
23:31
care about I would say is not working so in this case basically either I don't
23:34
in this case basically either I don't
23:34
in this case basically either I don't accept the call so that it's like you
23:36
accept the call so that it's like you
23:36
accept the call so that it's like you know uh I want to consistent but uh so
23:39
know uh I want to consistent but uh so
23:39
know uh I want to consistent but uh so in this case since my friend is not
23:41
in this case since my friend is not
23:41
in this case since my friend is not available and I want to maintain
23:42
available and I want to maintain
23:42
available and I want to maintain consistency because otherwise he will
23:44
consistency because otherwise he will
23:44
consistency because otherwise he will have theale data uh it's availability
23:47
have theale data uh it's availability
23:47
have theale data uh it's availability problem so my friend is not available so
23:49
problem so my friend is not available so
23:49
problem so my friend is not available so basically I can't take additional call
23:51
basically I can't take additional call
23:51
basically I can't take additional call because I want to also maintain
23:53
because I want to also maintain
23:53
because I want to also maintain consistency right so in this case you
23:55
consistency right so in this case you
23:55
consistency right so in this case you can imagine as availability so the other
23:57
can imagine as availability so the other
23:57
can imagine as availability so the other note is not available at all right to
23:59
note is not available at all right to
23:59
note is not available at all right to take now let's say visualize this now to
24:03
take now let's say visualize this now to
24:03
take now let's say visualize this now to address it availability what I told is
24:07
address it availability what I told is
24:07
address it availability what I told is that okay uh fine so let's let's have it
24:10
that okay uh fine so let's let's have it
24:10
that okay uh fine so let's let's have it maybe
24:11
maybe
24:11
maybe uh U you know whatever calls uh
24:15
uh U you know whatever calls uh
24:15
uh U you know whatever calls uh basically are having you don't respond
24:18
basically are having you don't respond
24:18
basically are having you don't respond because you're sick you close your phone
24:20
because you're sick you close your phone
24:20
because you're sick you close your phone so that all call comes to me so
24:22
so that all call comes to me so
24:22
so that all call comes to me so basically I'm addressing the
24:23
basically I'm addressing the
24:23
basically I'm addressing the availability problem so that I'm
24:25
availability problem so that I'm
24:25
availability problem so that I'm available at least and I'm also since
24:26
available at least and I'm also since
24:26
available at least and I'm also since I'm only responding so I'm also
24:28
I'm only responding so I'm also
24:28
I'm only responding so I'm also consistent because I have the data and
24:30
consistent because I have the data and
24:30
consistent because I have the data and my friend is not at all diing so he will
24:31
my friend is not at all diing so he will
24:31
my friend is not at all diing so he will not respond so that way we are
24:33
not respond so that way we are
24:33
not respond so that way we are addressing the I would say you know
24:36
addressing the I would say you know
24:36
addressing the I would say you know consistency as well as availability
24:38
consistency as well as availability
24:38
consistency as well as availability problem right now now Network like
24:42
problem right now now Network like
24:42
problem right now now Network like tolerance partition tolerance right so
24:45
tolerance partition tolerance right so
24:45
tolerance partition tolerance right so in this case uh how to make sure that
24:49
in this case uh how to make sure that
24:49
in this case uh how to make sure that also we are partition tolerance so in
24:51
also we are partition tolerance so in
24:51
also we are partition tolerance so in this case let's say my friend is sick
24:54
this case let's say my friend is sick
24:54
this case let's say my friend is sick how I deal with this partition tolerance
24:56
how I deal with this partition tolerance
24:56
how I deal with this partition tolerance so uh to address that let's say I'm
24:59
so uh to address that let's say I'm
24:59
so uh to address that let's say I'm hiring one additional person supported
25:01
hiring one additional person supported
25:01
hiring one additional person supported staff who is making sure that whatever
25:04
staff who is making sure that whatever
25:04
staff who is making sure that whatever data I get uh when I take the reminders
25:08
data I get uh when I take the reminders
25:08
data I get uh when I take the reminders you know you know from from my customers
25:11
you know you know from from my customers
25:11
you know you know from from my customers the person is making sure that the data
25:13
the person is making sure that the data
25:13
the person is making sure that the data is also updated into my friend's I was
25:17
is also updated into my friend's I was
25:17
is also updated into my friend's I was diary or or whatever note he's he or she
25:19
diary or or whatever note he's he or she
25:19
diary or or whatever note he's he or she is taking so that way I'm basically
25:22
is taking so that way I'm basically
25:23
is taking so that way I'm basically we're trying to achieve this eventual
25:25
we're trying to achieve this eventual
25:25
we're trying to achieve this eventual consistency so it may not be immediate
25:27
consistency so it may not be immediate
25:27
consistency so it may not be immediate but at least at least I'm making sure
25:29
but at least at least I'm making sure
25:29
but at least at least I'm making sure that you know it is happening after some
25:32
that you know it is happening after some
25:32
that you know it is happening after some time so it is not like forever um you
25:36
time so it is not like forever um you
25:36
time so it is not like forever um you know there is a gap between two two
25:38
know there is a gap between two two
25:38
know there is a gap between two two systems so this was a quick example to
25:41
systems so this was a quick example to
25:41
systems so this was a quick example to let you imagine that how to visualize uh
25:44
let you imagine that how to visualize uh
25:44
let you imagine that how to visualize uh consistency
25:46
consistency
25:46
consistency availability and partition tolerance in
25:49
availability and partition tolerance in
25:49
availability and partition tolerance in in a distributed systems and U how to
25:54
in a distributed systems and U how to
25:54
in a distributed systems and U how to how to make best use of that and how to
25:57
how to make best use of that and how to
25:57
how to make best use of that and how to priortize one over other depending on
25:59
priortize one over other depending on
25:59
priortize one over other depending on what kind of system you are operating
26:00
what kind of system you are operating
26:00
what kind of system you are operating and what kind of industry or or domain
26:02
and what kind of industry or or domain
26:02
and what kind of industry or or domain you operating that that's
26:04
you operating that that's
26:04
you operating that that's important okay so this was pretty much
26:07
important okay so this was pretty much
26:07
important okay so this was pretty much about me um you know uh and uh you can
26:11
about me um you know uh and uh you can
26:11
about me um you know uh and uh you can imagine that I kind professionally I'm
26:14
imagine that I kind professionally I'm
26:14
imagine that I kind professionally I'm working CG manager and also out of my
26:17
working CG manager and also out of my
26:17
working CG manager and also out of my passion I do office speaking blogging
26:19
passion I do office speaking blogging
26:19
passion I do office speaking blogging and also I was ex micos corer so of my
26:23
and also I was ex micos corer so of my
26:23
and also I was ex micos corer so of my interest so I also started making some
26:26
interest so I also started making some
26:26
interest so I also started making some uh such computer science uh I would say
26:28
uh such computer science uh I would say
26:29
uh such computer science uh I would say data seure algorithm and also cloud and
26:32
data seure algorithm and also cloud and
26:32
data seure algorithm and also cloud and other stuff in my YouTube channel so if
26:35
other stuff in my YouTube channel so if
26:35
other stuff in my YouTube channel so if interested you can you can kind of go
26:36
interested you can you can kind of go
26:36
interested you can you can kind of go through that and I do blogging as well
26:39
through that and I do blogging as well
26:39
through that and I do blogging as well uh so these were I would say U these
26:43
uh so these were I would say U these
26:43
uh so these were I would say U these were some of the differences that I I
26:44
were some of the differences that I I
26:44
were some of the differences that I I taken