Dealing with unexpected failures is one of the hardest problems to solve, especially in a distributed system. A microservice needs to be resilient to failures and to be able to restart often on another machine for availability. This resiliency also comes down to the state that was saved on behalf of the microservice, where the microservice can recover this state from, and whether the microservice can restart successfully.
In this session, Nish Anil describes more about Managing Resiliency in Microservices.
About Speaker :
He is Senior Program Manager for .NET at Microsoft and has been working on dot net architecture and cloud-native apps.
Conference Website: https://www.2020twenty.net/full-stack-virtual-conference/
C# Corner - Community of Software and Data Developers
https://www.c-sharpcorner.com
#dotnet #microservices #conference #fullstack
Show More Show Less View Video Transcript
0:02
and thank you so much for joining in my
0:03
and thank you so much for joining in my
0:03
and thank you so much for joining in my name is nish
0:04
name is nish
0:04
name is nish i work on the.net uh pm team uh if you
0:07
i work on the.net uh pm team uh if you
0:07
i work on the.net uh pm team uh if you guys know scott hanselman james
0:08
guys know scott hanselman james
0:08
guys know scott hanselman james montemagno it's the same team community
0:10
montemagno it's the same team community
0:10
montemagno it's the same team community team of the.net we kind of been great
0:12
team of the.net we kind of been great
0:12
team of the.net we kind of been great engage and grow.net community i
0:14
engage and grow.net community i
0:14
engage and grow.net community i specifically focus on something called
0:16
specifically focus on something called
0:16
specifically focus on something called as dotnet
0:17
as dotnet
0:17
as dotnet architecture which is dot dot net
0:18
architecture which is dot dot net
0:18
architecture which is dot dot net architecture if you haven't seen that
0:19
architecture if you haven't seen that
0:20
architecture if you haven't seen that page before
0:20
page before
0:20
page before i encourage you to go check that out
0:22
i encourage you to go check that out
0:22
i encourage you to go check that out because we have ton of amazing content
0:23
because we have ton of amazing content
0:24
because we have ton of amazing content for you to get started
0:25
for you to get started
0:25
for you to get started uh building you know productionready.net
0:27
uh building you know productionready.net
0:27
uh building you know productionready.net apps um for example like if you are
0:29
apps um for example like if you are
0:29
apps um for example like if you are maybe 10 to 15 years experience
0:30
maybe 10 to 15 years experience
0:30
maybe 10 to 15 years experience architecture looking for
0:31
architecture looking for
0:31
architecture looking for modernizing your.net uh and looking for
0:34
modernizing your.net uh and looking for
0:34
modernizing your.net uh and looking for newer workloads like cloud natives and
0:35
newer workloads like cloud natives and
0:36
newer workloads like cloud natives and other things
0:36
other things
0:36
other things we have some great documentation on that
0:38
we have some great documentation on that
0:38
we have some great documentation on that uh or if someone who is just getting
0:40
uh or if someone who is just getting
0:40
uh or if someone who is just getting started just does starting to work on
0:41
started just does starting to work on
0:42
started just does starting to work on linux or does it
0:43
linux or does it
0:43
linux or does it work on dockers does it work on
0:45
work on dockers does it work on
0:45
work on dockers does it work on kubernetes we have documentation on that
0:46
kubernetes we have documentation on that
0:46
kubernetes we have documentation on that so
0:47
so
0:47
so i kind of managed this dot dot net slash
0:49
i kind of managed this dot dot net slash
0:49
i kind of managed this dot dot net slash architecture so
0:50
architecture so
0:50
architecture so uh i encourage you to check that out and
0:52
uh i encourage you to check that out and
0:52
uh i encourage you to check that out and help me uh build this better for you
0:54
help me uh build this better for you
0:54
help me uh build this better for you so we work with a lot of customers
0:56
so we work with a lot of customers
0:56
so we work with a lot of customers understanding how they build
0:58
understanding how they build
0:58
understanding how they build dotnet in production and that's how we
0:59
dotnet in production and that's how we
0:59
dotnet in production and that's how we gather this feedback and create
1:01
gather this feedback and create
1:01
gather this feedback and create uh not just uh you know documentation we
1:03
uh not just uh you know documentation we
1:03
uh not just uh you know documentation we also have some really amazing reference
1:05
also have some really amazing reference
1:05
also have some really amazing reference samples that you can actually look at it
1:06
samples that you can actually look at it
1:06
samples that you can actually look at it how this is our build these are built in
1:08
how this is our build these are built in
1:08
how this is our build these are built in production
1:09
production
1:09
production uh and um you know build it for yourself
1:11
uh and um you know build it for yourself
1:11
uh and um you know build it for yourself too
1:12
too
1:12
too all right let's get started so let's
1:14
all right let's get started so let's
1:14
all right let's get started so let's talk about what are micro services first
1:17
talk about what are micro services first
1:17
talk about what are micro services first and uh so that everyone gets on the same
1:19
and uh so that everyone gets on the same
1:19
and uh so that everyone gets on the same page uh
1:20
page uh
1:20
page uh by the way today's talk we are going to
1:21
by the way today's talk we are going to
1:21
by the way today's talk we are going to cover resiliency in microservices though
1:24
cover resiliency in microservices though
1:24
cover resiliency in microservices though this is kind of an advanced topic
1:26
this is kind of an advanced topic
1:26
this is kind of an advanced topic i like to keep things very simple so my
1:28
i like to keep things very simple so my
1:28
i like to keep things very simple so my demos are going to be very simple
1:29
demos are going to be very simple
1:30
demos are going to be very simple easy to understand and i would like to
1:31
easy to understand and i would like to
1:31
easy to understand and i would like to spend more time you know
1:33
spend more time you know
1:33
spend more time you know chatting with you guys if you have
1:34
chatting with you guys if you have
1:34
chatting with you guys if you have questions feel free to ask and we can go
1:36
questions feel free to ask and we can go
1:36
questions feel free to ask and we can go take the discussion forward from there
1:37
take the discussion forward from there
1:37
take the discussion forward from there on right all right let's get started so
1:40
on right all right let's get started so
1:40
on right all right let's get started so let's talk about micro services you know
1:41
let's talk about micro services you know
1:41
let's talk about micro services you know what are micro services i mean generally
1:43
what are micro services i mean generally
1:43
what are micro services i mean generally speaking micro service is not about
1:45
speaking micro service is not about
1:45
speaking micro service is not about you know taking a service and breaking
1:46
you know taking a service and breaking
1:46
you know taking a service and breaking down into small pieces right or
1:48
down into small pieces right or
1:48
down into small pieces right or and then our simple web api project or
1:50
and then our simple web api project or
1:50
and then our simple web api project or something like that no that's not
1:51
something like that no that's not
1:51
something like that no that's not microservices
1:52
microservices
1:52
microservices microservices is an architectural
1:53
microservices is an architectural
1:53
microservices is an architectural pattern right where the most important
1:55
pattern right where the most important
1:56
pattern right where the most important thing is the application is architecture
1:57
thing is the application is architecture
1:57
thing is the application is architecture as a
1:58
as a
1:58
as a collection of smaller services that are
2:00
collection of smaller services that are
2:00
collection of smaller services that are you know focusing on a specific business
2:02
you know focusing on a specific business
2:02
you know focusing on a specific business functionality or
2:03
functionality or
2:03
functionality or you know defined by something called as
2:04
you know defined by something called as
2:04
you know defined by something called as bounded context
2:06
bounded context
2:06
bounded context the the advantage that you get with that
2:08
the the advantage that you get with that
2:08
the the advantage that you get with that is they are loosely coupled so that
2:09
is they are loosely coupled so that
2:09
is they are loosely coupled so that means they can be independently deployed
2:11
means they can be independently deployed
2:11
means they can be independently deployed they can be scaled when it is needed and
2:14
they can be scaled when it is needed and
2:14
they can be scaled when it is needed and um you know it's
2:15
um you know it's
2:15
um you know it's it's focused uh by smaller teams and
2:17
it's focused uh by smaller teams and
2:17
it's focused uh by smaller teams and that's the most important aspect of
2:19
that's the most important aspect of
2:19
that's the most important aspect of microservices it's not about
2:21
microservices it's not about
2:21
microservices it's not about just making applications small but it's
2:22
just making applications small but it's
2:22
just making applications small but it's also about like you know
2:24
also about like you know
2:24
also about like you know working on a specific business
2:25
working on a specific business
2:25
working on a specific business functionality and a smaller teams can
2:27
functionality and a smaller teams can
2:27
functionality and a smaller teams can actually focus on that functionality and
2:29
actually focus on that functionality and
2:29
actually focus on that functionality and ship things uh to production much much
2:31
ship things uh to production much much
2:31
ship things uh to production much much faster right
2:32
faster right
2:32
faster right so let's talk about you know just to
2:34
so let's talk about you know just to
2:34
so let's talk about you know just to give a comparison of how monolithic
2:35
give a comparison of how monolithic
2:35
give a comparison of how monolithic applications we used to build uh
2:38
applications we used to build uh
2:38
applications we used to build uh you know probably in the past or even
2:40
you know probably in the past or even
2:40
you know probably in the past or even now it's totally okay to build
2:41
now it's totally okay to build
2:41
now it's totally okay to build monolithic applications so
2:42
monolithic applications so
2:42
monolithic applications so you basically will have layers right so
2:44
you basically will have layers right so
2:44
you basically will have layers right so you'll have a database layer you'll have
2:46
you'll have a database layer you'll have
2:46
you'll have a database layer you'll have a service layer
2:47
a service layer
2:47
a service layer you'll have a web layer uh technically
2:49
you'll have a web layer uh technically
2:49
you'll have a web layer uh technically they are all
2:50
they are all
2:50
they are all baked into a single deployable unit and
2:53
baked into a single deployable unit and
2:53
baked into a single deployable unit and then
2:53
then
2:53
then they are deployed into probably the vms
2:56
they are deployed into probably the vms
2:56
they are deployed into probably the vms and
2:56
and
2:56
and scalability means you know scaling up
2:58
scalability means you know scaling up
2:58
scalability means you know scaling up vms right
3:00
vms right
3:00
vms right the disadvantage with this approach is
3:01
the disadvantage with this approach is
3:02
the disadvantage with this approach is that you know
3:03
that you know
3:03
that you know sometimes you just want to scale only
3:05
sometimes you just want to scale only
3:05
sometimes you just want to scale only part of your services which has more
3:07
part of your services which has more
3:07
part of your services which has more traffic
3:08
traffic
3:08
traffic at that time you don't have that option
3:09
at that time you don't have that option
3:09
at that time you don't have that option you have to scale multiple uh
3:11
you have to scale multiple uh
3:11
you have to scale multiple uh vms itself and thereby cutting down on
3:14
vms itself and thereby cutting down on
3:14
vms itself and thereby cutting down on the you know
3:15
the you know
3:15
the you know low utilization of resources and that
3:17
low utilization of resources and that
3:17
low utilization of resources and that kind of thing so you basically will be
3:19
kind of thing so you basically will be
3:19
kind of thing so you basically will be spending more cost
3:20
spending more cost
3:20
spending more cost uh doing this the other disadvantage is
3:23
uh doing this the other disadvantage is
3:23
uh doing this the other disadvantage is like you know you can't ship
3:24
like you know you can't ship
3:24
like you know you can't ship in production very often because they
3:27
in production very often because they
3:27
in production very often because they are since they are all packaged into a
3:29
are since they are all packaged into a
3:29
are since they are all packaged into a single deployment there will be many
3:30
single deployment there will be many
3:30
single deployment there will be many teams working on the same
3:32
teams working on the same
3:32
teams working on the same product so you will have to create a
3:33
product so you will have to create a
3:33
product so you will have to create a release cadence and you have to keep
3:34
release cadence and you have to keep
3:34
release cadence and you have to keep your bug fixes to
3:36
your bug fixes to
3:36
your bug fixes to the defined cadence and things you can't
3:37
the defined cadence and things you can't
3:37
the defined cadence and things you can't really you know ship
3:39
really you know ship
3:39
really you know ship ship to production uh like for example
3:41
ship to production uh like for example
3:41
ship to production uh like for example 100 times a day you know
3:42
100 times a day you know
3:42
100 times a day you know that's that's the kind of thing that's
3:43
that's that's the kind of thing that's
3:44
that's that's the kind of thing that's happening nowadays so that's the reason
3:45
happening nowadays so that's the reason
3:45
happening nowadays so that's the reason why i put that number there
3:47
why i put that number there
3:47
why i put that number there but when it comes to micro services
3:48
but when it comes to micro services
3:48
but when it comes to micro services because they are you know split by
3:50
because they are you know split by
3:50
because they are you know split by business boundaries every team
3:52
business boundaries every team
3:52
business boundaries every team manages its own so when it goes to
3:53
manages its own so when it goes to
3:53
manages its own so when it goes to deploy deployment
3:55
deploy deployment
3:55
deploy deployment you can obviously use something like
3:56
you can obviously use something like
3:56
you can obviously use something like containers and orchestrators
3:58
containers and orchestrators
3:58
containers and orchestrators so that way you know you don't have to
3:59
so that way you know you don't have to
3:59
so that way you know you don't have to worry about where it is deployed
4:01
worry about where it is deployed
4:01
worry about where it is deployed uh all that you need to tell is like
4:02
uh all that you need to tell is like
4:02
uh all that you need to tell is like okay i need this much amount of uh
4:05
okay i need this much amount of uh
4:05
okay i need this much amount of uh you know instances running and they can
4:07
you know instances running and they can
4:07
you know instances running and they can be scaled
4:08
be scaled
4:08
be scaled uh to these vms accordingly right so uh
4:11
uh to these vms accordingly right so uh
4:11
uh to these vms accordingly right so uh you have those kind of advantages with
4:13
you have those kind of advantages with
4:13
you have those kind of advantages with microservices
4:14
microservices
4:14
microservices now one simple question that i want to
4:16
now one simple question that i want to
4:16
now one simple question that i want to answer all the time is
4:17
answer all the time is
4:18
answer all the time is is monolithic bad absolutely not you
4:20
is monolithic bad absolutely not you
4:20
is monolithic bad absolutely not you know
4:21
know
4:21
know they it's is it old versus new i'm sure
4:23
they it's is it old versus new i'm sure
4:23
they it's is it old versus new i'm sure i when i started i just say like how we
4:25
i when i started i just say like how we
4:25
i when i started i just say like how we used to do before but
4:26
used to do before but
4:26
used to do before but the reason for that is like today when
4:27
the reason for that is like today when
4:28
the reason for that is like today when you build applications the applications
4:29
you build applications the applications
4:29
you build applications the applications are we are talking about scalar scale
4:31
are we are talking about scalar scale
4:31
are we are talking about scalar scale right we're
4:31
right we're
4:31
right we're making use of the cloud uh we're
4:33
making use of the cloud uh we're
4:33
making use of the cloud uh we're thinking about jio replications
4:35
thinking about jio replications
4:35
thinking about jio replications we're looking at really large complex
4:37
we're looking at really large complex
4:37
we're looking at really large complex applications then these micro services
4:38
applications then these micro services
4:38
applications then these micro services all will make sense
4:40
all will make sense
4:40
all will make sense but when it comes to really small teams
4:42
but when it comes to really small teams
4:42
but when it comes to really small teams small applications
4:43
small applications
4:43
small applications uh where you can easily manage these
4:46
uh where you can easily manage these
4:46
uh where you can easily manage these kind of deployments
4:47
kind of deployments
4:47
kind of deployments then monolithics is totally fine it is
4:49
then monolithics is totally fine it is
4:49
then monolithics is totally fine it is not about old versus new
4:51
not about old versus new
4:51
not about old versus new it's just about you know architectural
4:52
it's just about you know architectural
4:52
it's just about you know architectural design choice you make
4:54
design choice you make
4:54
design choice you make whether you want to build a monolithic
4:55
whether you want to build a monolithic
4:55
whether you want to build a monolithic or uh you know micro services
4:57
or uh you know micro services
4:57
or uh you know micro services you can very well start with the
4:59
you can very well start with the
4:59
you can very well start with the monolithic and then eventually migrate
5:01
monolithic and then eventually migrate
5:01
monolithic and then eventually migrate it to micro services when
5:03
it to micro services when
5:03
it to micro services when absolutely when you need that kind of uh
5:05
absolutely when you need that kind of uh
5:05
absolutely when you need that kind of uh you know scale when it comes to you know
5:07
you know scale when it comes to you know
5:07
you know scale when it comes to you know utilizing your resources uh vms and that
5:09
utilizing your resources uh vms and that
5:09
utilizing your resources uh vms and that kind of things too
5:12
all right um so just to give you a brief
5:14
all right um so just to give you a brief
5:14
all right um so just to give you a brief of what we work on something called
5:16
of what we work on something called
5:16
of what we work on something called eshop and containers is one of the most
5:17
eshop and containers is one of the most
5:17
eshop and containers is one of the most popular reference samples out there
5:19
popular reference samples out there
5:20
popular reference samples out there there this is a very simple sample but
5:22
there this is a very simple sample but
5:22
there this is a very simple sample but you know
5:23
you know
5:23
you know there is complexity involved in these
5:24
there is complexity involved in these
5:24
there is complexity involved in these samples and the reason for that is you
5:26
samples and the reason for that is you
5:26
samples and the reason for that is you know when you start designing micro
5:27
know when you start designing micro
5:28
know when you start designing micro services
5:28
services
5:28
services uh as you see on the right side if these
5:30
uh as you see on the right side if these
5:30
uh as you see on the right side if these are the micro services so they are
5:32
are the micro services so they are
5:32
are the micro services so they are defined by business boundaries so you'll
5:33
defined by business boundaries so you'll
5:33
defined by business boundaries so you'll see identity catalog ordering
5:35
see identity catalog ordering
5:35
see identity catalog ordering and if you pay attention to something
5:37
and if you pay attention to something
5:37
and if you pay attention to something the databases they're completely
5:38
the databases they're completely
5:38
the databases they're completely different so you don't
5:39
different so you don't
5:39
different so you don't no more have one databases uh one
5:42
no more have one databases uh one
5:42
no more have one databases uh one database and multiple tables and then
5:44
database and multiple tables and then
5:44
database and multiple tables and then having a transaction
5:45
having a transaction
5:45
having a transaction scope for updating and all those kind of
5:46
scope for updating and all those kind of
5:46
scope for updating and all those kind of things is gone you're actually every
5:49
things is gone you're actually every
5:49
things is gone you're actually every independent service is managing its own
5:51
independent service is managing its own
5:51
independent service is managing its own data
5:52
data
5:52
data right and every single service will
5:54
right and every single service will
5:54
right and every single service will connect to each other
5:55
connect to each other
5:55
connect to each other only through the end point so it has to
5:57
only through the end point so it has to
5:57
only through the end point so it has to be a rest endpoint or a grpc endpoint
5:59
be a rest endpoint or a grpc endpoint
6:00
be a rest endpoint or a grpc endpoint or some sort of an endpoint for
6:01
or some sort of an endpoint for
6:01
or some sort of an endpoint for receiving and communicating with data so
6:02
receiving and communicating with data so
6:02
receiving and communicating with data so that means
6:03
that means
6:03
that means no two services can access each other's
6:05
no two services can access each other's
6:05
no two services can access each other's database the other way of accessing each
6:07
database the other way of accessing each
6:07
database the other way of accessing each other is through probably through
6:09
other is through probably through
6:09
other is through probably through an event bus like you know you can use
6:10
an event bus like you know you can use
6:10
an event bus like you know you can use something like rabbitmq for asynchronous
6:12
something like rabbitmq for asynchronous
6:12
something like rabbitmq for asynchronous communication
6:12
communication
6:12
communication or in production something like azure
6:14
or in production something like azure
6:14
or in production something like azure service bus the whole idea is you know
6:17
service bus the whole idea is you know
6:17
service bus the whole idea is you know that they have to be completely
6:18
that they have to be completely
6:18
that they have to be completely independent that means the database when
6:20
independent that means the database when
6:20
independent that means the database when you split it
6:20
you split it
6:20
you split it you're completely independent from other
6:22
you're completely independent from other
6:22
you're completely independent from other other services so now you can decide do
6:24
other services so now you can decide do
6:24
other services so now you can decide do you want to have multiple
6:26
you want to have multiple
6:26
you want to have multiple services running you can even run
6:27
services running you can even run
6:27
services running you can even run multiple versions of these
6:29
multiple versions of these
6:29
multiple versions of these apis in production and let the api
6:31
apis in production and let the api
6:32
apis in production and let the api gateway decide what load
6:33
gateway decide what load
6:33
gateway decide what load needs to go to the newer services versus
6:35
needs to go to the newer services versus
6:35
needs to go to the newer services versus the older service and then you get a lot
6:36
the older service and then you get a lot
6:36
the older service and then you get a lot of flexibility
6:37
of flexibility
6:37
of flexibility but obviously these flexibility comes
6:39
but obviously these flexibility comes
6:39
but obviously these flexibility comes with this kind of complexity and that's
6:41
with this kind of complexity and that's
6:41
with this kind of complexity and that's why
6:41
why
6:41
why initially i mentioned you need to talk
6:43
initially i mentioned you need to talk
6:43
initially i mentioned you need to talk about when we when we talk about
6:44
about when we when we talk about
6:44
about when we when we talk about microservices we're talking about the
6:45
microservices we're talking about the
6:45
microservices we're talking about the scale right
6:46
scale right
6:46
scale right so when you have that kind of scale and
6:47
so when you have that kind of scale and
6:47
so when you have that kind of scale and complexity then all these things starts
6:49
complexity then all these things starts
6:49
complexity then all these things starts making
6:49
making
6:49
making uh sense a few examples of other things
6:52
uh sense a few examples of other things
6:52
uh sense a few examples of other things that we use
6:53
that we use
6:53
that we use in microservices like api composition
6:55
in microservices like api composition
6:55
in microservices like api composition pattern like api gateways
6:56
pattern like api gateways
6:56
pattern like api gateways and also we implement a variation of api
6:59
and also we implement a variation of api
6:59
and also we implement a variation of api composition called
7:00
composition called
7:00
composition called back and forth front and which is like
7:01
back and forth front and which is like
7:01
back and forth front and which is like you know you you have mobile
7:03
you know you you have mobile
7:03
you know you you have mobile applications you'll have
7:04
applications you'll have
7:04
applications you'll have other web application that is going to
7:05
other web application that is going to
7:05
other web application that is going to connect to this back end instead of
7:07
connect to this back end instead of
7:07
connect to this back end instead of exposing
7:07
exposing
7:08
exposing uh every single service outside uh to
7:10
uh every single service outside uh to
7:10
uh every single service outside uh to the world
7:11
the world
7:11
the world uh we expose only the gateways so that
7:14
uh we expose only the gateways so that
7:14
uh we expose only the gateways so that way you know
7:15
way you know
7:15
way you know the connection uh when it is made to the
7:17
the connection uh when it is made to the
7:17
the connection uh when it is made to the services these gateways are smart enough
7:19
services these gateways are smart enough
7:19
services these gateways are smart enough to identify what is the kind of request
7:20
to identify what is the kind of request
7:20
to identify what is the kind of request that's coming in
7:21
that's coming in
7:21
that's coming in and it can make multiple service calls
7:23
and it can make multiple service calls
7:23
and it can make multiple service calls to these and aggregate the response and
7:25
to these and aggregate the response and
7:25
to these and aggregate the response and send it back so you also
7:26
send it back so you also
7:26
send it back so you also bring in this kind of you know
7:28
bring in this kind of you know
7:28
bring in this kind of you know flexibility into the picture and then of
7:30
flexibility into the picture and then of
7:30
flexibility into the picture and then of course there are so many other things
7:31
course there are so many other things
7:31
course there are so many other things like admin services you know things
7:33
like admin services you know things
7:33
like admin services you know things for observability and logging and kind
7:35
for observability and logging and kind
7:35
for observability and logging and kind of things uh so
7:36
of things uh so
7:36
of things uh so yeah of course there is complexity but
7:38
yeah of course there is complexity but
7:38
yeah of course there is complexity but then there's a lot more and but
7:40
then there's a lot more and but
7:40
then there's a lot more and but uh you know i encourage you to check
7:41
uh you know i encourage you to check
7:41
uh you know i encourage you to check this out.net architecture or
7:44
this out.net architecture or
7:44
this out.net architecture or github.com.net hyphen architecture there
7:46
github.com.net hyphen architecture there
7:46
github.com.net hyphen architecture there are
7:47
are
7:47
are these samples are out there they're easy
7:48
these samples are out there they're easy
7:48
these samples are out there they're easy to get started uh but once you start
7:50
to get started uh but once you start
7:50
to get started uh but once you start exploring it slowly you'll start getting
7:52
exploring it slowly you'll start getting
7:52
exploring it slowly you'll start getting the whole
7:53
the whole
7:53
the whole picture of it but again you know don't
7:54
picture of it but again you know don't
7:54
picture of it but again you know don't get uh intimidated by all these
7:57
get uh intimidated by all these
7:57
get uh intimidated by all these you know architecturals and designs and
7:58
you know architecturals and designs and
7:58
you know architecturals and designs and other things because this exists
8:00
other things because this exists
8:00
other things because this exists when it comes to complexity so when it
8:02
when it comes to complexity so when it
8:02
when it comes to complexity so when it comes to microservices independent teams
8:04
comes to microservices independent teams
8:04
comes to microservices independent teams are going to focus only on their service
8:06
are going to focus only on their service
8:06
are going to focus only on their service so once you establish this
8:08
so once you establish this
8:08
so once you establish this then probably you are just a catalog
8:09
then probably you are just a catalog
8:09
then probably you are just a catalog team just shipping catalog right so you
8:11
team just shipping catalog right so you
8:11
team just shipping catalog right so you may not be involved in this kind of
8:13
may not be involved in this kind of
8:13
may not be involved in this kind of you know complexities at all right so um
8:16
you know complexities at all right so um
8:16
you know complexities at all right so um so having said that
8:17
so having said that
8:17
so having said that let's talk about resiliency in
8:18
let's talk about resiliency in
8:18
let's talk about resiliency in microservices now
8:21
microservices now
8:21
microservices now there are many things when it comes to
8:22
there are many things when it comes to
8:22
there are many things when it comes to resiliency uh for example
8:24
resiliency uh for example
8:24
resiliency uh for example um you know when you the moment you
8:26
um you know when you the moment you
8:26
um you know when you the moment you start uh thinking about cloud
8:28
start uh thinking about cloud
8:28
start uh thinking about cloud and the moment you talk about you know
8:30
and the moment you talk about you know
8:30
and the moment you talk about you know complexity you have to
8:32
complexity you have to
8:32
complexity you have to be ready for failures right there could
8:34
be ready for failures right there could
8:34
be ready for failures right there could be multiple failures that can happen
8:36
be multiple failures that can happen
8:36
be multiple failures that can happen uh when we are interacting with multiple
8:39
uh when we are interacting with multiple
8:39
uh when we are interacting with multiple services
8:40
services
8:40
services right so you it's not about avoiding
8:42
right so you it's not about avoiding
8:42
right so you it's not about avoiding failures it's about being prepared for a
8:45
failures it's about being prepared for a
8:45
failures it's about being prepared for a failure
8:45
failure
8:45
failure so that's what we will talk about in
8:46
so that's what we will talk about in
8:46
so that's what we will talk about in managing resiliency now there are many
8:48
managing resiliency now there are many
8:48
managing resiliency now there are many things like
8:49
things like
8:49
things like you're implementing health checks uh
8:51
you're implementing health checks uh
8:51
you're implementing health checks uh implementing observability and all those
8:52
implementing observability and all those
8:52
implementing observability and all those things but there are two things that i
8:54
things but there are two things that i
8:54
things but there are two things that i want to focus on today
8:55
want to focus on today
8:55
want to focus on today and that is uh two patterns one is the
8:57
and that is uh two patterns one is the
8:57
and that is uh two patterns one is the retry and the circuit breaker
8:59
retry and the circuit breaker
8:59
retry and the circuit breaker and we'll start looking at it how to
9:01
and we'll start looking at it how to
9:01
and we'll start looking at it how to implement those things in code
9:02
implement those things in code
9:02
implement those things in code and we'll also look at how to implement
9:04
and we'll also look at how to implement
9:04
and we'll also look at how to implement using infrastructure as well using
9:06
using infrastructure as well using
9:06
using infrastructure as well using service mesh like link id
9:08
service mesh like link id
9:08
service mesh like link id right so now here's the example that i
9:10
right so now here's the example that i
9:10
right so now here's the example that i was talking about you have the api
9:11
was talking about you have the api
9:11
was talking about you have the api gateway there is a mobile connection
9:12
gateway there is a mobile connection
9:12
gateway there is a mobile connection there's a client connections and then
9:14
there's a client connections and then
9:14
there's a client connections and then there's a
9:15
there's a
9:15
there's a mvc app which is all connecting to the
9:16
mvc app which is all connecting to the
9:16
mvc app which is all connecting to the api gateway now you can see that you
9:17
api gateway now you can see that you
9:18
api gateway now you can see that you know every call that is made
9:19
know every call that is made
9:19
know every call that is made this gateway has to be up and then the
9:21
this gateway has to be up and then the
9:21
this gateway has to be up and then the gateway will be calling multiple
9:23
gateway will be calling multiple
9:23
gateway will be calling multiple services behind the scenes
9:24
services behind the scenes
9:24
services behind the scenes so they all have to be up uh probably
9:26
so they all have to be up uh probably
9:26
so they all have to be up uh probably micro service one may communicate with
9:27
micro service one may communicate with
9:27
micro service one may communicate with micro service tool who knows
9:29
micro service tool who knows
9:29
micro service tool who knows in that case if there is an error there
9:31
in that case if there is an error there
9:31
in that case if there is an error there then we will have a cascading failures
9:33
then we will have a cascading failures
9:33
then we will have a cascading failures so how do you be prepared for such a
9:35
so how do you be prepared for such a
9:35
so how do you be prepared for such a failure right and these failures i'm
9:36
failure right and these failures i'm
9:36
failure right and these failures i'm talking about transient failures which
9:38
talking about transient failures which
9:38
talking about transient failures which is like
9:38
is like
9:38
is like it doesn't happen all the time it just
9:40
it doesn't happen all the time it just
9:40
it doesn't happen all the time it just happens you know
9:42
happens you know
9:42
happens you know sometimes it just happens in between
9:44
sometimes it just happens in between
9:44
sometimes it just happens in between then how do you handle this gracefully
9:46
then how do you handle this gracefully
9:46
then how do you handle this gracefully right
9:46
right
9:46
right so that is for example like for example
9:48
so that is for example like for example
9:48
so that is for example like for example here's the thing so you know you have to
9:50
here's the thing so you know you have to
9:50
here's the thing so you know you have to implement resilient communication
9:51
implement resilient communication
9:51
implement resilient communication everywhere
9:52
everywhere
9:52
everywhere where the service is doing inter-service
9:54
where the service is doing inter-service
9:54
where the service is doing inter-service communications right
9:55
communications right
9:55
communications right so then you go ahead and implement
9:56
so then you go ahead and implement
9:56
so then you go ahead and implement something called as retry that's a
9:58
something called as retry that's a
9:58
something called as retry that's a pattern which we'll look at it
10:00
pattern which we'll look at it
10:00
pattern which we'll look at it a little detail and then you do an
10:02
a little detail and then you do an
10:02
a little detail and then you do an exponential back-end because when you
10:03
exponential back-end because when you
10:03
exponential back-end because when you try
10:03
try
10:04
try free trying i mean as the name suggests
10:05
free trying i mean as the name suggests
10:05
free trying i mean as the name suggests the retry basically you try to connect
10:07
the retry basically you try to connect
10:07
the retry basically you try to connect let's say a request comes to the client
10:09
let's say a request comes to the client
10:10
let's say a request comes to the client mvc
10:10
mvc
10:10
mvc api gateway receives it but
10:12
api gateway receives it but
10:12
api gateway receives it but unfortunately the microservices one
10:14
unfortunately the microservices one
10:14
unfortunately the microservices one is unavailable so what would you do so
10:17
is unavailable so what would you do so
10:17
is unavailable so what would you do so it will try
10:17
it will try
10:18
it will try and make a request it is not able to
10:19
and make a request it is not able to
10:19
and make a request it is not able to communicate with each other
10:21
communicate with each other
10:21
communicate with each other so it will do a retry so it is failing
10:24
so it will do a retry so it is failing
10:24
so it will do a retry so it is failing it will do a second retry it is again
10:26
it will do a second retry it is again
10:26
it will do a second retry it is again failing
10:26
failing
10:26
failing but if you keep doing retry every second
10:29
but if you keep doing retry every second
10:30
but if you keep doing retry every second the chances for denial of service right
10:32
the chances for denial of service right
10:32
the chances for denial of service right because you know your servers can't take
10:33
because you know your servers can't take
10:33
because you know your servers can't take that kind of load i mean imagine when it
10:35
that kind of load i mean imagine when it
10:35
that kind of load i mean imagine when it is when the service is down
10:36
is when the service is down
10:36
is when the service is down you're not talking about single
10:37
you're not talking about single
10:38
you're not talking about single application connecting to this gateway
10:39
application connecting to this gateway
10:39
application connecting to this gateway you will
10:39
you will
10:39
you will have hundreds and thousands of clients
10:41
have hundreds and thousands of clients
10:41
have hundreds and thousands of clients trying to connect at the same time
10:42
trying to connect at the same time
10:42
trying to connect at the same time and then the microservices down right so
10:44
and then the microservices down right so
10:44
and then the microservices down right so what would you do so you don't want to
10:46
what would you do so you don't want to
10:46
what would you do so you don't want to retry immediately so you will implement
10:48
retry immediately so you will implement
10:48
retry immediately so you will implement something called as an exponential back
10:49
something called as an exponential back
10:49
something called as an exponential back off
10:50
off
10:50
off which is like you know provide some
10:51
which is like you know provide some
10:51
which is like you know provide some logic to do don't retry immediately but
10:54
logic to do don't retry immediately but
10:54
logic to do don't retry immediately but you know provide some kind of logic to
10:55
you know provide some kind of logic to
10:55
you know provide some kind of logic to go
10:56
go
10:56
go okay i'm returning at two seconds now
10:57
okay i'm returning at two seconds now
10:57
okay i'm returning at two seconds now the next time i'll go exponentially go
10:59
the next time i'll go exponentially go
10:59
the next time i'll go exponentially go four six eight depends on whatever logic
11:01
four six eight depends on whatever logic
11:01
four six eight depends on whatever logic you want to add
11:02
you want to add
11:02
you want to add and and also when it comes to cloud it's
11:04
and and also when it comes to cloud it's
11:04
and and also when it comes to cloud it's also nice to have some jitter logics to
11:06
also nice to have some jitter logics to
11:06
also nice to have some jitter logics to uh you know avoid all those kind of you
11:08
uh you know avoid all those kind of you
11:08
uh you know avoid all those kind of you know even the adding more exponential
11:09
know even the adding more exponential
11:10
know even the adding more exponential stuff
11:12
stuff
11:12
stuff all right i think i went
11:15
all right i think i went
11:15
all right i think i went down just give me one second okay so the
11:17
down just give me one second okay so the
11:17
down just give me one second okay so the third retrieve and it's successful
11:18
third retrieve and it's successful
11:18
third retrieve and it's successful it just makes it success so all when you
11:21
it just makes it success so all when you
11:21
it just makes it success so all when you do this
11:22
do this
11:22
do this the client application is actually
11:24
the client application is actually
11:24
the client application is actually waiting on this
11:25
waiting on this
11:25
waiting on this so that way you're not breaking it
11:27
so that way you're not breaking it
11:27
so that way you're not breaking it immediately but you're just waiting to
11:29
immediately but you're just waiting to
11:29
immediately but you're just waiting to see
11:29
see
11:29
see if the micro services can come up
11:30
if the micro services can come up
11:30
if the micro services can come up immediately and this is a very typical
11:32
immediately and this is a very typical
11:32
immediately and this is a very typical scenario in a kubernetes environment
11:34
scenario in a kubernetes environment
11:34
scenario in a kubernetes environment you know where services may go down
11:35
you know where services may go down
11:36
you know where services may go down because kubernetes trying to move the
11:37
because kubernetes trying to move the
11:37
because kubernetes trying to move the parts around right you know something
11:39
parts around right you know something
11:39
parts around right you know something goes wrong they're just trying to bring
11:40
goes wrong they're just trying to bring
11:40
goes wrong they're just trying to bring up the thing so it
11:41
up the thing so it
11:41
up the thing so it it's a transient error so it will come
11:43
it's a transient error so it will come
11:43
it's a transient error so it will come up very soon so you just don't want to
11:45
up very soon so you just don't want to
11:45
up very soon so you just don't want to lose the client at that time so you will
11:47
lose the client at that time so you will
11:47
lose the client at that time so you will hold and you know do the retry and i
11:49
hold and you know do the retry and i
11:49
hold and you know do the retry and i think we talked about exponential back
11:51
think we talked about exponential back
11:51
think we talked about exponential back off and the other
11:52
off and the other
11:52
off and the other um another pattern that we would add to
11:54
um another pattern that we would add to
11:54
um another pattern that we would add to this is to do something like a circuit
11:56
this is to do something like a circuit
11:56
this is to do something like a circuit breaker so you do a retry
11:59
breaker so you do a retry
11:59
breaker so you do a retry you do secondary try and the third retry
12:01
you do secondary try and the third retry
12:01
you do secondary try and the third retry and
12:02
and
12:02
and the fourth retry will do an open circuit
12:04
the fourth retry will do an open circuit
12:04
the fourth retry will do an open circuit which means once you define a policy
12:06
which means once you define a policy
12:06
which means once you define a policy that okay after third retries
12:08
that okay after third retries
12:08
that okay after third retries i want don't want to hit again so i want
12:11
i want don't want to hit again so i want
12:11
i want don't want to hit again so i want to keep an open circuit so remember when
12:12
to keep an open circuit so remember when
12:12
to keep an open circuit so remember when you're
12:12
you're
12:12
you're implementing this you're also very very
12:15
implementing this you're also very very
12:15
implementing this you're also very very careful
12:16
careful
12:16
careful about your infrastructure you're not
12:17
about your infrastructure you're not
12:17
about your infrastructure you're not overloading the infrastructure with
12:19
overloading the infrastructure with
12:19
overloading the infrastructure with these things right
12:19
these things right
12:20
these things right so you will keep an open circuit which
12:21
so you will keep an open circuit which
12:21
so you will keep an open circuit which means just go by the electronic circuit
12:23
means just go by the electronic circuit
12:23
means just go by the electronic circuit format
12:24
format
12:24
format where circuit is closed and circuit is
12:25
where circuit is closed and circuit is
12:25
where circuit is closed and circuit is open right so when it's open
12:27
open right so when it's open
12:27
open right so when it's open uh you will immediately get the
12:28
uh you will immediately get the
12:28
uh you will immediately get the exception and no more retries will be
12:30
exception and no more retries will be
12:30
exception and no more retries will be done so that way
12:31
done so that way
12:32
done so that way you let you you can actually decide what
12:34
you let you you can actually decide what
12:34
you let you you can actually decide what you want to do during an open circuit
12:35
you want to do during an open circuit
12:36
you want to do during an open circuit uh one simple example you probably want
12:38
uh one simple example you probably want
12:38
uh one simple example you probably want to see uh not just open circuit but just
12:40
to see uh not just open circuit but just
12:40
to see uh not just open circuit but just a handling resiliency is you might be
12:43
a handling resiliency is you might be
12:43
a handling resiliency is you might be shopping on some of the e-commerce site
12:44
shopping on some of the e-commerce site
12:44
shopping on some of the e-commerce site uh when the payment gateway failed uh
12:47
uh when the payment gateway failed uh
12:47
uh when the payment gateway failed uh you know they'll tell you
12:48
you know they'll tell you
12:48
you know they'll tell you okay we we will try this again and we'll
12:50
okay we we will try this again and we'll
12:50
okay we we will try this again and we'll get back to you we don't they don't fail
12:51
get back to you we don't they don't fail
12:52
get back to you we don't they don't fail it right
12:52
it right
12:52
it right they do they just don't go fail it and
12:54
they do they just don't go fail it and
12:54
they do they just don't go fail it and say like okay everything is gone we try
12:55
say like okay everything is gone we try
12:55
say like okay everything is gone we try this and things like that but they say
12:56
this and things like that but they say
12:56
this and things like that but they say okay we're going to retry this after
12:58
okay we're going to retry this after
12:58
okay we're going to retry this after some time
12:58
some time
12:58
some time and then later they'll tell you if they
13:00
and then later they'll tell you if they
13:00
and then later they'll tell you if they have failed permanently or
13:02
have failed permanently or
13:02
have failed permanently or do you you know they want you to do it
13:04
do you you know they want you to do it
13:04
do you you know they want you to do it again or or whatever or maybe there was
13:06
again or or whatever or maybe there was
13:06
again or or whatever or maybe there was a success right
13:07
a success right
13:07
a success right so these kind of things can be
13:08
so these kind of things can be
13:08
so these kind of things can be implemented uh using these kind of nice
13:11
implemented uh using these kind of nice
13:11
implemented uh using these kind of nice policies out there
13:13
policies out there
13:13
policies out there okay um but
13:16
okay um but
13:16
okay um but today what we're going to do is uh we're
13:19
today what we're going to do is uh we're
13:19
today what we're going to do is uh we're going to do some demos
13:20
going to do some demos
13:20
going to do some demos uh which is building microservices.net i
13:22
uh which is building microservices.net i
13:22
uh which is building microservices.net i want to introduce you to something
13:23
want to introduce you to something
13:24
want to introduce you to something called
13:24
called
13:24
called tie which is a really nice tool for
13:26
tie which is a really nice tool for
13:26
tie which is a really nice tool for building microservices
13:27
building microservices
13:27
building microservices um as a developer it just makes it easy
13:30
um as a developer it just makes it easy
13:30
um as a developer it just makes it easy to build with multiple servers so we'll
13:31
to build with multiple servers so we'll
13:31
to build with multiple servers so we'll look at a
13:32
look at a
13:32
look at a sample of that then we'll take a look at
13:34
sample of that then we'll take a look at
13:34
sample of that then we'll take a look at implementing code based resiliency using
13:36
implementing code based resiliency using
13:36
implementing code based resiliency using poly all this circuit breaker
13:38
poly all this circuit breaker
13:38
poly all this circuit breaker and uh you know retry logic that i was
13:39
and uh you know retry logic that i was
13:40
and uh you know retry logic that i was talking about we'll go and see how to
13:41
talking about we'll go and see how to
13:41
talking about we'll go and see how to implement this in.net
13:43
implement this in.net
13:43
implement this in.net right the second thing is we will take
13:45
right the second thing is we will take
13:45
right the second thing is we will take one step forward we'll remove everything
13:46
one step forward we'll remove everything
13:46
one step forward we'll remove everything from the dotnet
13:47
from the dotnet
13:48
from the dotnet and we'll try and implement this in
13:49
and we'll try and implement this in
13:49
and we'll try and implement this in infrastructure based resiliency which is
13:51
infrastructure based resiliency which is
13:51
infrastructure based resiliency which is using something like a service mesh
13:52
using something like a service mesh
13:52
using something like a service mesh uh when you're implementing in
13:54
uh when you're implementing in
13:54
uh when you're implementing in kubernetes so we will take a look at
13:55
kubernetes so we will take a look at
13:55
kubernetes so we will take a look at that also and
13:56
that also and
13:56
that also and in the last i'll leave you with some
13:57
in the last i'll leave you with some
13:57
in the last i'll leave you with some self-learn module which is like a free
13:59
self-learn module which is like a free
13:59
self-learn module which is like a free you can use azure cli to learn
14:01
you can use azure cli to learn
14:01
you can use azure cli to learn everything all that you need is an azure
14:02
everything all that you need is an azure
14:02
everything all that you need is an azure resource so i'll show you how to
14:04
resource so i'll show you how to
14:04
resource so i'll show you how to get started with that too okay so let's
14:06
get started with that too okay so let's
14:06
get started with that too okay so let's get started with the demo
14:08
get started with the demo
14:08
get started with the demo so here i am i'm in this micro services
14:11
so here i am i'm in this micro services
14:11
so here i am i'm in this micro services uh folder if i just list it you'll see
14:14
uh folder if i just list it you'll see
14:14
uh folder if i just list it you'll see there are two
14:15
there are two
14:15
there are two uh services like backend and frontend um
14:18
uh services like backend and frontend um
14:18
uh services like backend and frontend um let me open this in vs code here so you
14:20
let me open this in vs code here so you
14:20
let me open this in vs code here so you can see that there's a backend
14:21
can see that there's a backend
14:21
can see that there's a backend there's a weather forecast controller i
14:23
there's a weather forecast controller i
14:23
there's a weather forecast controller i mean this is something when you do
14:24
mean this is something when you do
14:24
mean this is something when you do net new web api this is by default
14:27
net new web api this is by default
14:27
net new web api this is by default whatever
14:28
whatever
14:28
whatever gives you right some random weather data
14:30
gives you right some random weather data
14:30
gives you right some random weather data every few sec i mean every second when
14:32
every few sec i mean every second when
14:32
every few sec i mean every second when you
14:32
you
14:32
you every time you make a call it just gives
14:35
every time you make a call it just gives
14:35
every time you make a call it just gives you some random data as a weather
14:37
you some random data as a weather
14:37
you some random data as a weather service right so that's it that's a back
14:38
service right so that's it that's a back
14:38
service right so that's it that's a back end what i did is i went ahead and
14:40
end what i did is i went ahead and
14:40
end what i did is i went ahead and created some
14:41
created some
14:41
created some ui as well for that to see let me take
14:43
ui as well for that to see let me take
14:43
ui as well for that to see let me take this service
14:44
this service
14:44
this service and web service and connect to this
14:46
and web service and connect to this
14:46
and web service and connect to this backend service which is the weather
14:48
backend service which is the weather
14:48
backend service which is the weather and display it in the uh in the
14:51
and display it in the uh in the
14:51
and display it in the uh in the in the ui so there's no rocket science
14:53
in the ui so there's no rocket science
14:53
in the ui so there's no rocket science here so if i want to run this
14:54
here so if i want to run this
14:54
here so if i want to run this i'll just go to cd backend and say dot
14:57
i'll just go to cd backend and say dot
14:57
i'll just go to cd backend and say dot net
14:58
net
14:58
net run and now it's going to run on finite
15:02
run and now it's going to run on finite
15:02
run and now it's going to run on finite zero zero port for sorry find zero one
15:04
zero zero port for sorry find zero one
15:04
zero zero port for sorry find zero one in https
15:06
in https
15:06
in https now i'll go to the front print and then
15:08
now i'll go to the front print and then
15:08
now i'll go to the front print and then run the front end too
15:09
run the front end too
15:09
run the front end too so i'll just do a net run
15:12
so i'll just do a net run
15:12
so i'll just do a net run and that's it so that will run on
15:14
and that's it so that will run on
15:14
and that's it so that will run on finance zero two financing three so i'm
15:16
finance zero two financing three so i'm
15:16
finance zero two financing three so i'm just going to open this
15:17
just going to open this
15:17
just going to open this i'm gonna bring this here so there you
15:18
i'm gonna bring this here so there you
15:18
i'm gonna bring this here so there you go so just a simple ui every time i hit
15:21
go so just a simple ui every time i hit
15:21
go so just a simple ui every time i hit it
15:21
it
15:21
it it just goes and refreshes and have
15:23
it just goes and refreshes and have
15:23
it just goes and refreshes and have things now did you see
15:25
things now did you see
15:25
things now did you see uh the number of steps i took to do this
15:27
uh the number of steps i took to do this
15:27
uh the number of steps i took to do this i had to go to back and i had to go to
15:29
i had to go to back and i had to go to
15:29
i had to go to back and i had to go to front end
15:30
front end
15:30
front end to do.net run now that is really
15:33
to do.net run now that is really
15:33
to do.net run now that is really okay for two services i can have these
15:35
okay for two services i can have these
15:35
okay for two services i can have these tabs open and if i'm debugging then it's
15:37
tabs open and if i'm debugging then it's
15:37
tabs open and if i'm debugging then it's fine then i do an fi and a kind of
15:38
fine then i do an fi and a kind of
15:38
fine then i do an fi and a kind of things but
15:40
things but
15:40
things but since i'm working with multiple services
15:41
since i'm working with multiple services
15:41
since i'm working with multiple services all these services have to be up
15:42
all these services have to be up
15:42
all these services have to be up wouldn't it be
15:43
wouldn't it be
15:43
wouldn't it be nice if it can all run it together right
15:46
nice if it can all run it together right
15:46
nice if it can all run it together right so that's why we built the.net team
15:49
so that's why we built the.net team
15:49
so that's why we built the.net team specifically built something called as
15:50
specifically built something called as
15:50
specifically built something called as tai for helping you
15:52
tai for helping you
15:52
tai for helping you do this in uh scenarios for development
15:55
do this in uh scenarios for development
15:55
do this in uh scenarios for development okay so look
15:56
okay so look
15:56
okay so look at this so what i would do is i'll just
15:58
at this so what i would do is i'll just
15:58
at this so what i would do is i'll just say tie and that's a tool that
16:00
say tie and that's a tool that
16:00
say tie and that's a tool that it's a global tool that you need to
16:01
it's a global tool that you need to
16:01
it's a global tool that you need to install tie and they say run
16:04
install tie and they say run
16:04
install tie and they say run and that's it so now what it goes is
16:06
and that's it so now what it goes is
16:06
and that's it so now what it goes is it's going to build the projects
16:07
it's going to build the projects
16:08
it's going to build the projects and as like any other cloud native app
16:10
and as like any other cloud native app
16:10
and as like any other cloud native app it is going to give you
16:12
it is going to give you
16:12
it is going to give you a nice dashboard i'm going to bring this
16:13
a nice dashboard i'm going to bring this
16:13
a nice dashboard i'm going to bring this dashboard here it seems to be opening on
16:14
dashboard here it seems to be opening on
16:14
dashboard here it seems to be opening on my other
16:15
my other
16:15
my other uh monitor so you can see that it's a
16:16
uh monitor so you can see that it's a
16:16
uh monitor so you can see that it's a nice dashboard so it's running a
16:18
nice dashboard so it's running a
16:18
nice dashboard so it's running a back-end project there's a front-end
16:19
back-end project there's a front-end
16:19
back-end project there's a front-end project
16:21
project
16:21
project is nice ports out there so if you
16:23
is nice ports out there so if you
16:23
is nice ports out there so if you noticed
16:24
noticed
16:24
noticed there there's logs also so i can go in
16:26
there there's logs also so i can go in
16:26
there there's logs also so i can go in and see the logs uh
16:27
and see the logs uh
16:27
and see the logs uh of each of it and i can also go and see
16:31
of each of it and i can also go and see
16:31
of each of it and i can also go and see the metrics of these like you know how
16:33
the metrics of these like you know how
16:33
the metrics of these like you know how much garbage collector is working with
16:35
much garbage collector is working with
16:35
much garbage collector is working with and
16:35
and
16:36
and all those kind of performance stuffs uh
16:37
all those kind of performance stuffs uh
16:37
all those kind of performance stuffs uh is also comes like free with this tie
16:40
is also comes like free with this tie
16:40
is also comes like free with this tie right
16:40
right
16:40
right um now if i just go and say okay that's
16:42
um now if i just go and say okay that's
16:42
um now if i just go and say okay that's my front end and i go and hit the
16:44
my front end and i go and hit the
16:44
my front end and i go and hit the back end i just open this https port
16:47
back end i just open this https port
16:47
back end i just open this https port that was created
16:48
that was created
16:48
that was created and there you go there's an exception
16:51
and there you go there's an exception
16:51
and there you go there's an exception and that's expected right
16:52
and that's expected right
16:52
and that's expected right because what happened is it is trying to
16:54
because what happened is it is trying to
16:54
because what happened is it is trying to look for a port called
16:56
look for a port called
16:56
look for a port called uh localhost financial one that's what
16:58
uh localhost financial one that's what
16:58
uh localhost financial one that's what backend was
16:59
backend was
16:59
backend was actually enabled for running but what
17:02
actually enabled for running but what
17:02
actually enabled for running but what tai did is it did not do that finite
17:04
tai did is it did not do that finite
17:04
tai did is it did not do that finite zero one or final zero two though you
17:06
zero one or final zero two though you
17:06
zero one or final zero two though you can specify it
17:07
can specify it
17:07
can specify it but what it did is it just went and
17:09
but what it did is it just went and
17:09
but what it did is it just went and looked at what are your available ports
17:10
looked at what are your available ports
17:10
looked at what are your available ports on your computer
17:11
on your computer
17:11
on your computer and it provided a random port which
17:13
and it provided a random port which
17:13
and it provided a random port which means now it doesn't know what this back
17:15
means now it doesn't know what this back
17:15
means now it doesn't know what this back end
17:16
end
17:16
end port is running so you need to make your
17:18
port is running so you need to make your
17:18
port is running so you need to make your code smarter to understand that
17:20
code smarter to understand that
17:20
code smarter to understand that right so let's go and fix that in the
17:21
right so let's go and fix that in the
17:21
right so let's go and fix that in the code so for that what i'm going to do
17:23
code so for that what i'm going to do
17:23
code so for that what i'm going to do is uh so front end is connected to the
17:24
is uh so front end is connected to the
17:24
is uh so front end is connected to the back end so i'll go to the back end
17:26
back end so i'll go to the back end
17:26
back end so i'll go to the back end uh sorry the front end and go fix that
17:29
uh sorry the front end and go fix that
17:29
uh sorry the front end and go fix that hard coded value
17:30
hard coded value
17:30
hard coded value i'll just remove this and bring in
17:33
i'll just remove this and bring in
17:33
i'll just remove this and bring in something called as
17:34
something called as
17:34
something called as configuration.get service uri backend
17:37
configuration.get service uri backend
17:37
configuration.get service uri backend right
17:37
right
17:38
right now this one comes with a configuration
17:43
extension that comes with the nuget
17:45
extension that comes with the nuget
17:45
extension that comes with the nuget package
17:46
package
17:46
package called microsoft.thai
17:48
called microsoft.thai
17:48
called microsoft.thai extension.configuration all that you
17:49
extension.configuration all that you
17:49
extension.configuration all that you need
17:49
need
17:50
need is that once you set it up you're all
17:52
is that once you set it up you're all
17:52
is that once you set it up you're all good to go and now we can just go
17:54
good to go and now we can just go
17:54
good to go and now we can just go and uh run this and sorry tie run and
17:57
and uh run this and sorry tie run and
17:57
and uh run this and sorry tie run and it's just going to
17:58
it's just going to
17:58
it's just going to work right so just this time i'm going
17:59
work right so just this time i'm going
17:59
work right so just this time i'm going to do something called as thai run
18:01
to do something called as thai run
18:01
to do something called as thai run watch which means i can keep running the
18:03
watch which means i can keep running the
18:03
watch which means i can keep running the stuff and then
18:05
stuff and then
18:05
stuff and then use some time to build it as well
18:09
use some time to build it as well
18:09
use some time to build it as well so do a dashboard now this dashboard
18:12
so do a dashboard now this dashboard
18:12
so do a dashboard now this dashboard comes again
18:13
comes again
18:13
comes again now i have this front and i click on it
18:15
now i have this front and i click on it
18:15
now i have this front and i click on it there you go it's all working now
18:17
there you go it's all working now
18:17
there you go it's all working now right now that's a simple service what
18:20
right now that's a simple service what
18:20
right now that's a simple service what what if i want to add a data store
18:22
what if i want to add a data store
18:22
what if i want to add a data store to this whole thing right i mean every
18:24
to this whole thing right i mean every
18:24
to this whole thing right i mean every micro service will have its own data
18:26
micro service will have its own data
18:26
micro service will have its own data store we spoke about that so how about
18:28
store we spoke about that so how about
18:28
store we spoke about that so how about let's go and add some data stores
18:30
let's go and add some data stores
18:30
let's go and add some data stores so what i want to do is i want to cache
18:32
so what i want to do is i want to cache
18:32
so what i want to do is i want to cache this value
18:33
this value
18:33
this value whichever has been generated right now
18:35
whichever has been generated right now
18:35
whichever has been generated right now like for example in the controller
18:37
like for example in the controller
18:37
like for example in the controller um i want to cache this value for that
18:39
um i want to cache this value for that
18:39
um i want to cache this value for that i'm going to use
18:40
i'm going to use
18:40
i'm going to use something called as redis cache so i
18:43
something called as redis cache so i
18:43
something called as redis cache so i have this code written so i'm going to
18:44
have this code written so i'm going to
18:44
have this code written so i'm going to uncomment this
18:45
uncomment this
18:45
uncomment this i'll explain this code in a bit so i'm
18:47
i'll explain this code in a bit so i'm
18:47
i'll explain this code in a bit so i'm going to comment this random generating
18:49
going to comment this random generating
18:49
going to comment this random generating code
18:51
code
18:51
code and uh let's go look at take a look at
18:54
and uh let's go look at take a look at
18:54
and uh let's go look at take a look at this i distributed cache implementation
18:56
this i distributed cache implementation
18:56
this i distributed cache implementation um and now it's what it does is
18:58
um and now it's what it does is
18:58
um and now it's what it does is basically generates a random value
19:00
basically generates a random value
19:00
basically generates a random value but then it just sets the um you know
19:02
but then it just sets the um you know
19:02
but then it just sets the um you know cache
19:03
cache
19:03
cache and it says okay for five seconds the
19:05
and it says okay for five seconds the
19:05
and it says okay for five seconds the cache is valid whenever there's
19:06
cache is valid whenever there's
19:06
cache is valid whenever there's expiry of five seconds there will be a
19:08
expiry of five seconds there will be a
19:08
expiry of five seconds there will be a new random value generated right
19:10
new random value generated right
19:10
new random value generated right now we talked about like okay now we're
19:12
now we talked about like okay now we're
19:12
now we talked about like okay now we're going to implement okay there's a code
19:13
going to implement okay there's a code
19:14
going to implement okay there's a code for
19:14
for
19:14
for implementation of cache but how do you
19:16
implementation of cache but how do you
19:16
implementation of cache but how do you connect to it you need a connection
19:17
connect to it you need a connection
19:17
connect to it you need a connection string and other things like that right
19:19
string and other things like that right
19:19
string and other things like that right now if i want to do that how would how
19:21
now if i want to do that how would how
19:21
now if i want to do that how would how do i go about doing that right so if i
19:23
do i go about doing that right so if i
19:23
do i go about doing that right so if i go to the startup.cs
19:25
go to the startup.cs
19:25
go to the startup.cs uh okay before going to that i'll let
19:26
uh okay before going to that i'll let
19:26
uh okay before going to that i'll let you show this back in cs branch
19:29
you show this back in cs branch
19:29
you show this back in cs branch i have this something called as
19:30
i have this something called as
19:30
i have this something called as microsoft extension.caching.stack
19:32
microsoft extension.caching.stack
19:32
microsoft extension.caching.stack exchange readiness so that's what you
19:33
exchange readiness so that's what you
19:33
exchange readiness so that's what you need to implement if you want to work
19:34
need to implement if you want to work
19:34
need to implement if you want to work with reddit
19:35
with reddit
19:35
with reddit so add this new get package and then
19:37
so add this new get package and then
19:37
so add this new get package and then there is
19:38
there is
19:38
there is a small thing that you need to write
19:39
a small thing that you need to write
19:39
a small thing that you need to write which is the services or stack exchange
19:41
which is the services or stack exchange
19:41
which is the services or stack exchange ready
19:41
ready
19:41
ready and here you want to provide a
19:43
and here you want to provide a
19:43
and here you want to provide a connection string now you see this
19:45
connection string now you see this
19:45
connection string now you see this i'm again using something called as
19:46
i'm again using something called as
19:46
i'm again using something called as connection string and giving a name to
19:48
connection string and giving a name to
19:48
connection string and giving a name to it which is redis
19:49
it which is redis
19:49
it which is redis right so that means we need to uh have a
19:52
right so that means we need to uh have a
19:52
right so that means we need to uh have a connection string
19:53
connection string
19:53
connection string uh which is with the key radius and that
19:56
uh which is with the key radius and that
19:56
uh which is with the key radius and that should
19:56
should
19:56
should be done right so should i just go and
19:58
be done right so should i just go and
19:58
be done right so should i just go and install lettuce
20:00
install lettuce
20:00
install lettuce and then create the connection string
20:01
and then create the connection string
20:01
and then create the connection string called redis and then 6379 used by the
20:04
called redis and then 6379 used by the
20:04
called redis and then 6379 used by the default port and then connected
20:06
default port and then connected
20:06
default port and then connected you don't need to what you can do is you
20:08
you don't need to what you can do is you
20:08
you don't need to what you can do is you can simply go ahead
20:09
can simply go ahead
20:10
can simply go ahead and use tie you can tell tai
20:13
and use tie you can tell tai
20:13
and use tie you can tell tai hey i need a stack exchange radish and i
20:15
hey i need a stack exchange radish and i
20:15
hey i need a stack exchange radish and i want to run it
20:16
want to run it
20:16
want to run it for that let's see what what happens
20:18
for that let's see what what happens
20:18
for that let's see what what happens right okay you can do this watch anymore
20:21
right okay you can do this watch anymore
20:21
right okay you can do this watch anymore now um let's go ahead and
20:24
now um let's go ahead and
20:24
now um let's go ahead and do tie init because you need a
20:25
do tie init because you need a
20:26
do tie init because you need a configuration to tell tai
20:27
configuration to tell tai
20:27
configuration to tell tai that you need some data store all right
20:29
that you need some data store all right
20:29
that you need some data store all right so when i do try inet
20:31
so when i do try inet
20:31
so when i do try inet uh it is going to give this tie dot yaml
20:33
uh it is going to give this tie dot yaml
20:33
uh it is going to give this tie dot yaml file so by default when vi is doing tire
20:35
file so by default when vi is doing tire
20:36
file so by default when vi is doing tire run all this time it was looking at the
20:37
run all this time it was looking at the
20:37
run all this time it was looking at the solution file and looking at okay these
20:38
solution file and looking at okay these
20:38
solution file and looking at okay these are dot-net projects so
20:39
are dot-net projects so
20:39
are dot-net projects so ty knows how to run the dotnet projects
20:41
ty knows how to run the dotnet projects
20:41
ty knows how to run the dotnet projects so it does magically done that
20:43
so it does magically done that
20:43
so it does magically done that thing for you now we're talking about
20:44
thing for you now we're talking about
20:44
thing for you now we're talking about redis cache right so
20:46
redis cache right so
20:46
redis cache right so i have to tell this configuration so
20:48
i have to tell this configuration so
20:48
i have to tell this configuration so yaml file this thai.dml think of it like
20:50
yaml file this thai.dml think of it like
20:50
yaml file this thai.dml think of it like more like a configuration file
20:52
more like a configuration file
20:52
more like a configuration file uh where you will provide tie with this
20:54
uh where you will provide tie with this
20:54
uh where you will provide tie with this information that you need
20:55
information that you need
20:55
information that you need right so in this case what i'm going to
20:56
right so in this case what i'm going to
20:56
right so in this case what i'm going to do is i'm going to add something called
20:58
do is i'm going to add something called
20:58
do is i'm going to add something called as redis
21:00
as redis
21:00
as redis containers like images so this is the
21:04
containers like images so this is the
21:04
containers like images so this is the configuration that i'm using so you can
21:05
configuration that i'm using so you can
21:05
configuration that i'm using so you can see this image redis
21:07
see this image redis
21:07
see this image redis so now your i don't have to install
21:11
so now your i don't have to install
21:11
so now your i don't have to install any radish insulation in my machine as
21:14
any radish insulation in my machine as
21:14
any radish insulation in my machine as long as i have docker running
21:16
long as i have docker running
21:16
long as i have docker running um so it is going to pull this radius
21:18
um so it is going to pull this radius
21:18
um so it is going to pull this radius image and that is going to set the port
21:20
image and that is going to set the port
21:20
image and that is going to set the port for you at 6379
21:22
for you at 6379
21:22
for you at 6379 and it is the name is ready so when the
21:24
and it is the name is ready so when the
21:24
and it is the name is ready so when the connection stream is asked
21:25
connection stream is asked
21:25
connection stream is asked it is going to create redis colon 637 so
21:28
it is going to create redis colon 637 so
21:28
it is going to create redis colon 637 so for example here it is connection string
21:29
for example here it is connection string
21:29
for example here it is connection string so it is going to create redis colon
21:30
so it is going to create redis colon
21:30
so it is going to create redis colon 6379
21:32
6379
21:32
6379 and then your application is going to
21:33
and then your application is going to
21:33
and then your application is going to straight forward work let's see if it is
21:34
straight forward work let's see if it is
21:34
straight forward work let's see if it is going to work right
21:35
going to work right
21:35
going to work right so now i'm going to just say tie and say
21:38
so now i'm going to just say tie and say
21:38
so now i'm going to just say tie and say run
21:41
so again it's going to bring the
21:42
so again it's going to bring the
21:42
so again it's going to bring the dashboard in now you can see that there
21:43
dashboard in now you can see that there
21:44
dashboard in now you can see that there is one of the steps that says
21:45
is one of the steps that says
21:45
is one of the steps that says okay now it's going to running image
21:47
okay now it's going to running image
21:47
okay now it's going to running image redis for right
21:49
redis for right
21:49
redis for right so it actually pulled the image as well
21:52
so it actually pulled the image as well
21:52
so it actually pulled the image as well and it is it has hosted a container for
21:54
and it is it has hosted a container for
21:54
and it is it has hosted a container for you it's running at 6379
21:55
you it's running at 6379
21:55
you it's running at 6379 now if you go open link in new tab this
21:58
now if you go open link in new tab this
21:58
now if you go open link in new tab this is an error this is a deliberate error
21:59
is an error this is a deliberate error
21:59
is an error this is a deliberate error i'll show you this error
22:00
i'll show you this error
22:00
i'll show you this error now let me refresh it refresh it refresh
22:03
now let me refresh it refresh it refresh
22:03
now let me refresh it refresh it refresh it refresh it
22:04
it refresh it
22:04
it refresh it you see this this value is not changing
22:05
you see this this value is not changing
22:05
you see this this value is not changing but after five seconds you'll see that
22:07
but after five seconds you'll see that
22:07
but after five seconds you'll see that value
22:08
value
22:08
value changing as well sorry there so there
22:11
changing as well sorry there so there
22:11
changing as well sorry there so there you go it got
22:11
you go it got
22:11
you go it got changed but i think you also noticed
22:13
changed but i think you also noticed
22:13
changed but i think you also noticed there was erroring out in between
22:15
there was erroring out in between
22:15
there was erroring out in between because that was my deliberate attempt
22:16
because that was my deliberate attempt
22:16
because that was my deliberate attempt to create
22:17
to create
22:17
to create a transient error right uh creating
22:19
a transient error right uh creating
22:19
a transient error right uh creating infrastructure related issues would be
22:21
infrastructure related issues would be
22:21
infrastructure related issues would be harder for me so i thought like i will
22:22
harder for me so i thought like i will
22:22
harder for me so i thought like i will throw exceptions
22:23
throw exceptions
22:23
throw exceptions randomly so let me show you that so that
22:25
randomly so let me show you that so that
22:25
randomly so let me show you that so that you don't feel that this is a
22:27
you don't feel that this is a
22:27
you don't feel that this is a demo error or something like that so
22:28
demo error or something like that so
22:28
demo error or something like that so here we go so so what i'm doing is i'm
22:30
here we go so so what i'm doing is i'm
22:30
here we go so so what i'm doing is i'm just creating a random value and
22:31
just creating a random value and
22:31
just creating a random value and throwing exceptions saying okay this
22:32
throwing exceptions saying okay this
22:32
throwing exceptions saying okay this system is down so i want
22:35
system is down so i want
22:35
system is down so i want the uh the uh the system to
22:38
the uh the uh the system to
22:38
the uh the uh the system to take care of itself where is my browser
22:41
take care of itself where is my browser
22:41
take care of itself where is my browser come on um
22:45
let's refresh this
22:48
and go to this five seven zero so okay
22:50
and go to this five seven zero so okay
22:50
and go to this five seven zero so okay there you go so sometimes it gets this
22:53
there you go so sometimes it gets this
22:53
there you go so sometimes it gets this error system down
22:53
error system down
22:54
error system down so you can also go and check this
22:55
so you can also go and check this
22:55
so you can also go and check this information inside
22:57
information inside
22:57
information inside the logs and things you will get the
22:58
the logs and things you will get the
22:58
the logs and things you will get the same errors but
23:00
same errors but
23:00
same errors but you you see it like now the redis cache
23:02
you you see it like now the redis cache
23:02
you you see it like now the redis cache is implemented easily right so time
23:04
is implemented easily right so time
23:04
is implemented easily right so time makes that
23:05
makes that
23:05
makes that life easy for building micro services
23:07
life easy for building micro services
23:07
life easy for building micro services now
23:08
now
23:08
now well i talked about uh
23:12
well i talked about uh
23:12
well i talked about uh tai i talked about reddit so how did ty
23:14
tai i talked about reddit so how did ty
23:14
tai i talked about reddit so how did ty know to run this thing
23:16
know to run this thing
23:16
know to run this thing for that you have to make sure you're
23:18
for that you have to make sure you're
23:18
for that you have to make sure you're running docker so this is
23:19
running docker so this is
23:19
running docker so this is my docker here so i'll tell you some
23:22
my docker here so i'll tell you some
23:22
my docker here so i'll tell you some tips and tricks on docker 2.
23:24
tips and tricks on docker 2.
23:24
tips and tricks on docker 2. so if you're installing docker please
23:25
so if you're installing docker please
23:25
so if you're installing docker please use this
23:27
use this
23:27
use this use wselto based engine this makes your
23:29
use wselto based engine this makes your
23:30
use wselto based engine this makes your life
23:30
life
23:30
life much much easy because it is going to
23:33
much much easy because it is going to
23:33
much much easy because it is going to use the wsl2 as its base engine and then
23:36
use the wsl2 as its base engine and then
23:36
use the wsl2 as its base engine and then start doing it so you don't have to
23:37
start doing it so you don't have to
23:38
start doing it so you don't have to explicitly say
23:39
explicitly say
23:39
explicitly say i need 4 gb of ram you don't have to
23:41
i need 4 gb of ram you don't have to
23:41
i need 4 gb of ram you don't have to give those virtualization configurations
23:43
give those virtualization configurations
23:43
give those virtualization configurations or nothing because
23:44
or nothing because
23:44
or nothing because wcl2 takes care of it and it's just
23:45
wcl2 takes care of it and it's just
23:45
wcl2 takes care of it and it's just really great and also
23:47
really great and also
23:47
really great and also for kubernetes i use the kubernetes that
23:50
for kubernetes i use the kubernetes that
23:50
for kubernetes i use the kubernetes that comes with docker
23:52
comes with docker
23:52
comes with docker you can use mini cube if you want to if
23:54
you can use mini cube if you want to if
23:54
you can use mini cube if you want to if you're running locally
23:55
you're running locally
23:55
you're running locally or you can use azure cli and then
23:57
or you can use azure cli and then
23:57
or you can use azure cli and then connect to aks
23:59
connect to aks
23:59
connect to aks you can use azure community service but
24:00
you can use azure community service but
24:00
you can use azure community service but for learning you just want to keep it
24:02
for learning you just want to keep it
24:02
for learning you just want to keep it simple so just use this
24:03
simple so just use this
24:03
simple so just use this enable kubernetes and i'll show you the
24:05
enable kubernetes and i'll show you the
24:05
enable kubernetes and i'll show you the demos with kubernetes with this right
24:07
demos with kubernetes with this right
24:07
demos with kubernetes with this right so now everything is running fine great
24:10
so now everything is running fine great
24:10
so now everything is running fine great um so now let's go and implement
24:13
um so now let's go and implement
24:14
um so now let's go and implement resiliency you saw that errors were
24:15
resiliency you saw that errors were
24:15
resiliency you saw that errors were happening we want to avoid those errors
24:17
happening we want to avoid those errors
24:17
happening we want to avoid those errors like not avoid like you know kind of
24:19
like not avoid like you know kind of
24:19
like not avoid like you know kind of be aware of those errors and kind of
24:21
be aware of those errors and kind of
24:21
be aware of those errors and kind of handle it gracefully so let's go and
24:22
handle it gracefully so let's go and
24:22
handle it gracefully so let's go and implement that
24:23
implement that
24:23
implement that so go to the visual studio code so the
24:26
so go to the visual studio code so the
24:26
so go to the visual studio code so the error
24:27
error
24:27
error the front end is connecting to the back
24:28
the front end is connecting to the back
24:28
the front end is connecting to the back end so i will implement it in the front
24:31
end so i will implement it in the front
24:31
end so i will implement it in the front end so you go to the um
24:33
end so you go to the um
24:33
end so you go to the um cs proj i have another library nice
24:35
cs proj i have another library nice
24:36
cs proj i have another library nice library that uh
24:36
library that uh
24:36
library that uh that does this work which is the
24:39
that does this work which is the
24:39
that does this work which is the microsoft.extensions.http.poly
24:41
microsoft.extensions.http.poly
24:41
microsoft.extensions.http.poly poly is a library that gives you
24:42
poly is a library that gives you
24:42
poly is a library that gives you policies that you can apply it on your
24:44
policies that you can apply it on your
24:44
policies that you can apply it on your istp client factory and say this is my
24:47
istp client factory and say this is my
24:47
istp client factory and say this is my client and i want these policies to be
24:49
client and i want these policies to be
24:49
client and i want these policies to be written in the client so whenever that
24:50
written in the client so whenever that
24:50
written in the client so whenever that client makes a call
24:51
client makes a call
24:51
client makes a call these policies are added to it so the
24:53
these policies are added to it so the
24:53
these policies are added to it so the two policies that i'm going to add one
24:54
two policies that i'm going to add one
24:54
two policies that i'm going to add one is a retail policy
24:56
is a retail policy
24:56
is a retail policy and then the other is the circuit
24:57
and then the other is the circuit
24:58
and then the other is the circuit breaker policies which we
24:59
breaker policies which we
24:59
breaker policies which we discussed about it right so let's go and
25:01
discussed about it right so let's go and
25:01
discussed about it right so let's go and implement that
25:04
so what i want to do is whenever i'm
25:06
so what i want to do is whenever i'm
25:06
so what i want to do is whenever i'm creating add http client
25:08
creating add http client
25:08
creating add http client i'm going to add two more lines to it
25:10
i'm going to add two more lines to it
25:10
i'm going to add two more lines to it which is
25:11
which is
25:11
which is add policy handlers add policy handler
25:14
add policy handlers add policy handler
25:14
add policy handlers add policy handler get redrive policy
25:15
get redrive policy
25:15
get redrive policy and get circuit backer policy now these
25:17
and get circuit backer policy now these
25:17
and get circuit backer policy now these are just
25:18
are just
25:18
are just my static methods here what it does it's
25:21
my static methods here what it does it's
25:21
my static methods here what it does it's just saying
25:22
just saying
25:22
just saying http policy extensions dot handle
25:24
http policy extensions dot handle
25:24
http policy extensions dot handle transient http error
25:25
transient http error
25:25
transient http error now we're going to use something called
25:27
now we're going to use something called
25:27
now we're going to use something called as a wait and retry sync so we're going
25:29
as a wait and retry sync so we're going
25:29
as a wait and retry sync so we're going to
25:29
to
25:29
to wait and retry for five times but
25:32
wait and retry for five times but
25:32
wait and retry for five times but we don't retry every single second you
25:34
we don't retry every single second you
25:34
we don't retry every single second you can you can specify it constantly like
25:36
can you can specify it constantly like
25:36
can you can specify it constantly like you know every time just retry whenever
25:38
you know every time just retry whenever
25:38
you know every time just retry whenever it fails retry but don't do that because
25:40
it fails retry but don't do that because
25:40
it fails retry but don't do that because then you will be hitting the server too
25:42
then you will be hitting the server too
25:42
then you will be hitting the server too you're going to add load to the other
25:43
you're going to add load to the other
25:43
you're going to add load to the other server and
25:44
server and
25:44
server and you can probably bring it down for real
25:45
you can probably bring it down for real
25:45
you can probably bring it down for real reasons right um
25:47
reasons right um
25:47
reasons right um or you'll get denial of service
25:49
or you'll get denial of service
25:49
or you'll get denial of service exceptions which becomes
25:50
exceptions which becomes
25:50
exceptions which becomes really harder to go and fix it later so
25:54
really harder to go and fix it later so
25:54
really harder to go and fix it later so instead we go to math uh probably
25:56
instead we go to math uh probably
25:56
instead we go to math uh probably basically uh
25:57
basically uh
25:57
basically uh just to give it that exponential back
26:00
just to give it that exponential back
26:00
just to give it that exponential back off
26:01
off
26:01
off uh so we're gonna have some retry
26:02
uh so we're gonna have some retry
26:02
uh so we're gonna have some retry attempt and then we're gonna retry
26:04
attempt and then we're gonna retry
26:04
attempt and then we're gonna retry waiting for a few seconds and then try
26:05
waiting for a few seconds and then try
26:05
waiting for a few seconds and then try again
26:06
again
26:06
again we'll also add one more policy which is
26:08
we'll also add one more policy which is
26:08
we'll also add one more policy which is the circuit breaker
26:09
the circuit breaker
26:09
the circuit breaker right after uh 15 uh you know
26:12
right after uh 15 uh you know
26:12
right after uh 15 uh you know read writes we will open the circuit so
26:14
read writes we will open the circuit so
26:14
read writes we will open the circuit so that no more retries are made
26:16
that no more retries are made
26:16
that no more retries are made and then it is open for 15 seconds as
26:19
and then it is open for 15 seconds as
26:19
and then it is open for 15 seconds as well so you basically like
26:20
well so you basically like
26:20
well so you basically like wait for half a minute to basically
26:24
wait for half a minute to basically
26:24
wait for half a minute to basically retry or something like that
26:25
retry or something like that
26:25
retry or something like that right so so that's it just add these
26:28
right so so that's it just add these
26:28
right so so that's it just add these policies and let's see how this behaves
26:30
policies and let's see how this behaves
26:30
policies and let's see how this behaves now right so now i just go
26:31
now right so now i just go
26:31
now right so now i just go and build thai run
26:36
what happens it's going to build
26:38
what happens it's going to build
26:38
what happens it's going to build projects
26:39
projects
26:39
projects it's going to bring in containers and
26:41
it's going to bring in containers and
26:41
it's going to bring in containers and now it's listening so
26:43
now it's listening so
26:43
now it's listening so let me bring this again uh so now if go
26:46
let me bring this again uh so now if go
26:46
let me bring this again uh so now if go open link in a new tab
26:48
open link in a new tab
26:48
open link in a new tab i'll refresh it i'll refresh it i'll
26:50
i'll refresh it i'll refresh it i'll
26:50
i'll refresh it i'll refresh it i'll refresh it
26:51
refresh it
26:51
refresh it where did the error go now the error did
26:53
where did the error go now the error did
26:53
where did the error go now the error did not go anywhere but what happens is if
26:55
not go anywhere but what happens is if
26:55
not go anywhere but what happens is if you look at this progress bar watch this
26:56
you look at this progress bar watch this
26:56
you look at this progress bar watch this progress bar when i refresh it
26:58
progress bar when i refresh it
26:58
progress bar when i refresh it refresh again refresh again see this
27:01
refresh again refresh again see this
27:01
refresh again refresh again see this there is a time it is taking to retry it
27:03
there is a time it is taking to retry it
27:04
there is a time it is taking to retry it so under the hood so you can actually i
27:07
so under the hood so you can actually i
27:07
so under the hood so you can actually i can tell you this by
27:08
can tell you this by
27:08
can tell you this by just going to the back end and sorry the
27:11
just going to the back end and sorry the
27:11
just going to the back end and sorry the yeah back internet that's where the
27:12
yeah back internet that's where the
27:12
yeah back internet that's where the exceptions
27:13
exceptions
27:13
exceptions see this the exception has been throwing
27:15
see this the exception has been throwing
27:15
see this the exception has been throwing system down but
27:16
system down but
27:16
system down but to the end user it is never seen because
27:19
to the end user it is never seen because
27:19
to the end user it is never seen because it is doing the retries
27:20
it is doing the retries
27:20
it is doing the retries for you magically and you just kind of
27:23
for you magically and you just kind of
27:23
for you magically and you just kind of build a system which is like never
27:24
build a system which is like never
27:24
build a system which is like never failing right
27:25
failing right
27:25
failing right but that was great now
27:29
but that was great now
27:29
but that was great now what we did until now was in the code
27:31
what we did until now was in the code
27:32
what we did until now was in the code which is great
27:33
which is great
27:33
which is great which is like adding policy handlers and
27:35
which is like adding policy handlers and
27:35
which is like adding policy handlers and things like this right
27:36
things like this right
27:36
things like this right but when you start deploying this in
27:38
but when you start deploying this in
27:38
but when you start deploying this in kubernetes and other things you may be
27:40
kubernetes and other things you may be
27:40
kubernetes and other things you may be working with
27:41
working with
27:41
working with a number of other services too and those
27:44
a number of other services too and those
27:44
a number of other services too and those services may or may not be written
27:46
services may or may not be written
27:46
services may or may not be written in.net it may be written in other
27:48
in.net it may be written in other
27:48
in.net it may be written in other languages so when these policy handlers
27:50
languages so when these policy handlers
27:50
languages so when these policy handlers when you define
27:51
when you define
27:51
when you define you probably have to define it for all
27:53
you probably have to define it for all
27:53
you probably have to define it for all these services too right
27:54
these services too right
27:54
these services too right and that becomes extremely hard to bake
27:56
and that becomes extremely hard to bake
27:56
and that becomes extremely hard to bake in these kind of cross-cutting concerns
27:58
in these kind of cross-cutting concerns
27:58
in these kind of cross-cutting concerns into your code and that is why we have
28:01
into your code and that is why we have
28:01
into your code and that is why we have another option which is uh using
28:03
another option which is uh using
28:03
another option which is uh using infrastructure uh based resiliency and
28:05
infrastructure uh based resiliency and
28:06
infrastructure uh based resiliency and we'll
28:06
we'll
28:06
we'll go and see how to implement that right
28:08
go and see how to implement that right
28:08
go and see how to implement that right so we're going to go to the
28:09
so we're going to go to the
28:09
so we're going to go to the very next step of doing this now for
28:12
very next step of doing this now for
28:12
very next step of doing this now for that first first and foremost is you
28:13
that first first and foremost is you
28:13
that first first and foremost is you shouldn't be using this
28:15
shouldn't be using this
28:15
shouldn't be using this because we don't want two types of
28:17
because we don't want two types of
28:17
because we don't want two types of retries
28:18
retries
28:18
retries it's unnecessary so i'm just going to
28:19
it's unnecessary so i'm just going to
28:19
it's unnecessary so i'm just going to get rid of this i don't need to deploy
28:21
get rid of this i don't need to deploy
28:21
get rid of this i don't need to deploy this there
28:22
this there
28:22
this there and what i'm going to do is i'm going to
28:25
and what i'm going to do is i'm going to
28:25
and what i'm going to do is i'm going to deploy this application
28:27
deploy this application
28:27
deploy this application into my local kubernetes because that's
28:29
into my local kubernetes because that's
28:29
into my local kubernetes because that's where we can start using service mesh
28:31
where we can start using service mesh
28:31
where we can start using service mesh and other kind of concepts
28:32
and other kind of concepts
28:32
and other kind of concepts right so let's get this
28:36
right so let's get this
28:36
right so let's get this out okay you can ignore this error it's
28:38
out okay you can ignore this error it's
28:38
out okay you can ignore this error it's just a
28:40
just a
28:40
just a better okay so now if you want to deploy
28:42
better okay so now if you want to deploy
28:42
better okay so now if you want to deploy this uh let me see this
28:44
this uh let me see this
28:44
this uh let me see this so back-end and front-end there's
28:46
so back-end and front-end there's
28:46
so back-end and front-end there's tied.ml file
28:47
tied.ml file
28:48
tied.ml file you can simply go say tie deploy and go
28:51
you can simply go say tie deploy and go
28:51
you can simply go say tie deploy and go into the interactive mode
28:52
into the interactive mode
28:52
into the interactive mode and then this will go and deploy
28:54
and then this will go and deploy
28:54
and then this will go and deploy everything back in front and into your
28:56
everything back in front and into your
28:56
everything back in front and into your kubernetes now you may be thinking
28:58
kubernetes now you may be thinking
28:58
kubernetes now you may be thinking wait a minute i know redis cache is
29:00
wait a minute i know redis cache is
29:00
wait a minute i know redis cache is running on containers but what happens
29:02
running on containers but what happens
29:02
running on containers but what happens to the backend in front and ty was
29:03
to the backend in front and ty was
29:03
to the backend in front and ty was running it as a dot-net projects
29:05
running it as a dot-net projects
29:05
running it as a dot-net projects but the beauty of thai is that you know
29:07
but the beauty of thai is that you know
29:07
but the beauty of thai is that you know you didn't have to add docker file
29:10
you didn't have to add docker file
29:10
you didn't have to add docker file to create an image tai would do that
29:12
to create an image tai would do that
29:12
to create an image tai would do that automatically uh and then it'll create
29:14
automatically uh and then it'll create
29:14
automatically uh and then it'll create the image
29:15
the image
29:15
the image and when it goes and deploys into
29:17
and when it goes and deploys into
29:17
and when it goes and deploys into kubernetes which i'm going to show you
29:18
kubernetes which i'm going to show you
29:18
kubernetes which i'm going to show you now
29:18
now
29:18
now i've already did this to save some time
29:21
i've already did this to save some time
29:21
i've already did this to save some time so i go to kubectl
29:22
so i go to kubectl
29:22
so i go to kubectl get uh parts say this is back-end and
29:25
get uh parts say this is back-end and
29:26
get uh parts say this is back-end and front-end
29:26
front-end
29:26
front-end running right so when you do tie
29:30
running right so when you do tie
29:30
running right so when you do tie deploy i it is going to ask you a few
29:33
deploy i it is going to ask you a few
29:33
deploy i it is going to ask you a few things like where
29:34
things like where
29:34
things like where is your container registry because once
29:36
is your container registry because once
29:36
is your container registry because once you
29:37
you
29:37
you make this as an image it needs to go and
29:40
make this as an image it needs to go and
29:40
make this as an image it needs to go and store it somewhere so that the
29:41
store it somewhere so that the
29:41
store it somewhere so that the kubernetes can pull it right
29:43
kubernetes can pull it right
29:43
kubernetes can pull it right the easiest way to do that is using
29:44
the easiest way to do that is using
29:44
the easiest way to do that is using docker hub because it gives a public
29:46
docker hub because it gives a public
29:46
docker hub because it gives a public repository so you can use that you can
29:48
repository so you can use that you can
29:48
repository so you can use that you can also use acr if you wish to
29:51
also use acr if you wish to
29:51
also use acr if you wish to or any other container registry for that
29:52
or any other container registry for that
29:52
or any other container registry for that wherever it can pull the information
29:54
wherever it can pull the information
29:54
wherever it can pull the information or the image right so i basically go and
29:57
or the image right so i basically go and
29:57
or the image right so i basically go and use the by default i use the docker hub
29:59
use the by default i use the docker hub
29:59
use the by default i use the docker hub because it's easy to get started and
30:00
because it's easy to get started and
30:00
because it's easy to get started and deploy and
30:01
deploy and
30:01
deploy and things and i don't have any kind of like
30:03
things and i don't have any kind of like
30:03
things and i don't have any kind of like secured applications to worry about
30:05
secured applications to worry about
30:05
secured applications to worry about because these are demos but if you have
30:07
because these are demos but if you have
30:07
because these are demos but if you have in your environment you have secured
30:09
in your environment you have secured
30:09
in your environment you have secured applications and you want to run it
30:10
applications and you want to run it
30:10
applications and you want to run it within aks and other things
30:12
within aks and other things
30:12
within aks and other things uh please go and use acr and aks for
30:14
uh please go and use acr and aks for
30:14
uh please go and use acr and aks for these things
30:16
these things
30:16
these things okay so you also we i
30:19
okay so you also we i
30:19
okay so you also we i i went and installed some few things
30:21
i went and installed some few things
30:21
i went and installed some few things like redis cache
30:23
like redis cache
30:23
like redis cache which is what is needed for it to run
30:24
which is what is needed for it to run
30:24
which is what is needed for it to run then there's zipkin
30:26
then there's zipkin
30:26
then there's zipkin zipkin is an extension that i added to
30:29
zipkin is an extension that i added to
30:29
zipkin is an extension that i added to let's just see the distributed tracing
30:30
let's just see the distributed tracing
30:30
let's just see the distributed tracing and things but i'm not going to demo
30:31
and things but i'm not going to demo
30:31
and things but i'm not going to demo that today because
30:32
that today because
30:32
that today because we don't need to get there now um so
30:36
we don't need to get there now um so
30:36
we don't need to get there now um so now let's uh run this for that what i'm
30:38
now let's uh run this for that what i'm
30:38
now let's uh run this for that what i'm going to do is
30:40
going to do is
30:40
going to do is uh i'm going to put forward my service
30:42
uh i'm going to put forward my service
30:42
uh i'm going to put forward my service called frontend
30:44
called frontend
30:44
called frontend right so i'll call this a service and
30:49
right so i'll call this a service and
30:49
right so i'll call this a service and and 3000
30:53
and 3000
30:53
and 3000 and internal port is 80 so let me go
30:56
and internal port is 80 so let me go
30:56
and internal port is 80 so let me go there let me bring the browser in
30:58
there let me bring the browser in
30:58
there let me bring the browser in and let's go to localhost 3000 you see
31:00
and let's go to localhost 3000 you see
31:00
and let's go to localhost 3000 you see that there is
31:01
that there is
31:01
that there is the exception sorry there is the page
31:04
the exception sorry there is the page
31:04
the exception sorry there is the page that is running but i can refresh it and
31:05
that is running but i can refresh it and
31:05
that is running but i can refresh it and there you go the error
31:07
there you go the error
31:07
there you go the error is happening right so in production uh
31:09
is happening right so in production uh
31:09
is happening right so in production uh the error is happening but the reason
31:11
the error is happening but the reason
31:11
the error is happening but the reason why it's not showing you the actual
31:12
why it's not showing you the actual
31:12
why it's not showing you the actual error is because we
31:13
error is because we
31:13
error is because we we are running in production right so
31:15
we are running in production right so
31:15
we are running in production right so only development environments will give
31:16
only development environments will give
31:16
only development environments will give you that
31:17
you that
31:17
you that exceptions details uh so yeah at once in
31:20
exceptions details uh so yeah at once in
31:20
exceptions details uh so yeah at once in a while it is having an exception
31:22
a while it is having an exception
31:22
a while it is having an exception so let's go and fix it so now we're
31:24
so let's go and fix it so now we're
31:24
so let's go and fix it so now we're going to fix this in infrastructure
31:25
going to fix this in infrastructure
31:25
going to fix this in infrastructure right so to do this i'm using something
31:29
right so to do this i'm using something
31:29
right so to do this i'm using something called
31:29
called
31:29
called link id so let's go to link id so this
31:33
link id so let's go to link id so this
31:33
link id so let's go to link id so this is a service mesh
31:34
is a service mesh
31:34
is a service mesh you can go and install link id on your
31:37
you can go and install link id on your
31:37
you can go and install link id on your system
31:38
system
31:38
system by just using these commands uh the way
31:41
by just using these commands uh the way
31:41
by just using these commands uh the way i do it is
31:42
i do it is
31:42
i do it is i go go to the link ld release pages
31:45
i go go to the link ld release pages
31:45
i go go to the link ld release pages i go ahead and download this exe from
31:48
i go ahead and download this exe from
31:48
i go ahead and download this exe from here the windows 1
31:50
here the windows 1
31:50
here the windows 1 i put it in a path called um
31:53
i put it in a path called um
31:53
i put it in a path called um see you think again that's stuck for
31:57
see you think again that's stuck for
31:57
see you think again that's stuck for some reason
31:59
some reason
31:59
some reason see tools yeah there you go link id and
32:03
see tools yeah there you go link id and
32:03
see tools yeah there you go link id and i just added to the path right
32:04
i just added to the path right
32:04
i just added to the path right now once i do that what i do is
32:09
now once i do that what i do is
32:09
now once i do that what i do is i go and say link id
32:12
i go and say link id
32:12
i go and say link id so this will give you the command so now
32:14
so this will give you the command so now
32:14
so this will give you the command so now you can actually
32:15
you can actually
32:15
you can actually ask link3d to uh you know check if my
32:18
ask link3d to uh you know check if my
32:18
ask link3d to uh you know check if my kubernetes is ready for this
32:19
kubernetes is ready for this
32:19
kubernetes is ready for this installation so you basically
32:21
installation so you basically
32:21
installation so you basically you use the command called link id check
32:23
you use the command called link id check
32:23
you use the command called link id check and
32:24
and
32:24
and i think it is double free i think i
32:26
i think it is double free i think i
32:26
i think it is double free i think i think it's
32:30
uh okay let's go back to the
32:31
uh okay let's go back to the
32:32
uh okay let's go back to the documentation i think it's here
32:33
documentation i think it's here
32:33
documentation i think it's here somewhere
32:34
somewhere
32:34
somewhere uh oh there you go link id check iphone
32:36
uh oh there you go link id check iphone
32:36
uh oh there you go link id check iphone iphone create thought i wrote that okay
32:39
iphone create thought i wrote that okay
32:39
iphone create thought i wrote that okay uninstall linkedin control pane okay i
32:40
uninstall linkedin control pane okay i
32:40
uninstall linkedin control pane okay i was not reading the next question so
32:42
was not reading the next question so
32:42
was not reading the next question so it is having so i did it already and
32:44
it is having so i did it already and
32:44
it is having so i did it already and that is the reason why so if i
32:46
that is the reason why so if i
32:46
that is the reason why so if i go say cube cdl
32:49
go say cube cdl
32:49
go say cube cdl um get deployments uh
32:52
um get deployments uh
32:52
um get deployments uh namespace properly is linked so i had
32:55
namespace properly is linked so i had
32:55
namespace properly is linked so i had already installed it but basically what
32:57
already installed it but basically what
32:57
already installed it but basically what you do
32:57
you do
32:57
you do is uh again i don't know if you
33:01
is uh again i don't know if you
33:01
is uh again i don't know if you if you guys are new to this i'll also
33:02
if you guys are new to this i'll also
33:02
if you guys are new to this i'll also explain this um
33:04
explain this um
33:04
explain this um if i go to configuration and say get
33:07
if i go to configuration and say get
33:07
if i go to configuration and say get context so this is the cube ctrl context
33:11
context so this is the cube ctrl context
33:11
context so this is the cube ctrl context right so this is docker desktop this is
33:12
right so this is docker desktop this is
33:12
right so this is docker desktop this is what this is what it tells the
33:14
what this is what it tells the
33:14
what this is what it tells the kubernetes tools to use my cluster which
33:17
kubernetes tools to use my cluster which
33:17
kubernetes tools to use my cluster which is the local
33:18
is the local
33:18
is the local now if you're working with aks and other
33:20
now if you're working with aks and other
33:20
now if you're working with aks and other things your
33:22
things your
33:22
things your your cluster would become the aks
33:24
your cluster would become the aks
33:24
your cluster would become the aks cluster right so it will do all those
33:25
cluster right so it will do all those
33:25
cluster right so it will do all those things so whenever you
33:27
things so whenever you
33:27
things so whenever you do anything with link id or any other
33:29
do anything with link id or any other
33:29
do anything with link id or any other service mesh that you will start
33:30
service mesh that you will start
33:30
service mesh that you will start start installing will actually look at
33:32
start installing will actually look at
33:32
start installing will actually look at this context and then deploy it so
33:34
this context and then deploy it so
33:34
this context and then deploy it so be aware of it and don't make that
33:36
be aware of it and don't make that
33:36
be aware of it and don't make that mistake of like you have you might have
33:38
mistake of like you have you might have
33:38
mistake of like you have you might have multiple
33:39
multiple
33:39
multiple clusters so make sure where the star
33:41
clusters so make sure where the star
33:41
clusters so make sure where the star mark is and that's your current
33:42
mark is and that's your current
33:42
mark is and that's your current cluster and you have to deploy to that
33:45
cluster and you have to deploy to that
33:45
cluster and you have to deploy to that right so
33:46
right so
33:46
right so in this case it's just going to deploy
33:49
in this case it's just going to deploy
33:49
in this case it's just going to deploy uh so you just go through this
33:51
uh so you just go through this
33:51
uh so you just go through this check and apply and it will go and
33:52
check and apply and it will go and
33:52
check and apply and it will go and install the link id what that does
33:55
install the link id what that does
33:55
install the link id what that does is it is going to give you this nice
33:57
is it is going to give you this nice
33:57
is it is going to give you this nice dashboard showing
33:58
dashboard showing
33:58
dashboard showing you know what are the things that you
34:00
you know what are the things that you
34:00
you know what are the things that you can measure now let me explain a little
34:01
can measure now let me explain a little
34:02
can measure now let me explain a little bit of linkedin okay these are
34:03
bit of linkedin okay these are
34:03
bit of linkedin okay these are well i was just telling you about some
34:04
well i was just telling you about some
34:04
well i was just telling you about some kind of infrared stuff
34:06
kind of infrared stuff
34:06
kind of infrared stuff now why do you need linker dnr things is
34:08
now why do you need linker dnr things is
34:08
now why do you need linker dnr things is because they're service mesh
34:10
because they're service mesh
34:10
because they're service mesh um or it you know the best way to put it
34:13
um or it you know the best way to put it
34:13
um or it you know the best way to put it is they use something called as
34:15
is they use something called as
34:15
is they use something called as sidecar patent so your application is
34:17
sidecar patent so your application is
34:17
sidecar patent so your application is running on its own parts
34:18
running on its own parts
34:18
running on its own parts but it will also have its own separate
34:21
but it will also have its own separate
34:21
but it will also have its own separate pods running with your application
34:23
pods running with your application
34:23
pods running with your application which takes care of service to service
34:24
which takes care of service to service
34:24
which takes care of service to service communication okay
34:26
communication okay
34:26
communication okay it by using proxies and other things so
34:28
it by using proxies and other things so
34:28
it by using proxies and other things so the advantage that you get
34:29
the advantage that you get
34:29
the advantage that you get is now you can move that code that you
34:31
is now you can move that code that you
34:31
is now you can move that code that you wrote in c sharp in poly
34:34
wrote in c sharp in poly
34:34
wrote in c sharp in poly you don't have to write it in your
34:35
you don't have to write it in your
34:35
you don't have to write it in your application because usually your
34:36
application because usually your
34:36
application because usually your application should focus on business
34:38
application should focus on business
34:38
application should focus on business and now you can actually configure that
34:40
and now you can actually configure that
34:40
and now you can actually configure that in
34:41
in
34:41
in a service mesh saying okay how much i
34:43
a service mesh saying okay how much i
34:43
a service mesh saying okay how much i want to retry and other things can be
34:44
want to retry and other things can be
34:44
want to retry and other things can be configured so the advantage is
34:46
configured so the advantage is
34:46
configured so the advantage is now they are service you know as i said
34:48
now they are service you know as i said
34:48
now they are service you know as i said it's a side car you can actually
34:50
it's a side car you can actually
34:50
it's a side car you can actually put the same policy in a net service or
34:52
put the same policy in a net service or
34:52
put the same policy in a net service or a node.js service you know that you know
34:53
a node.js service you know that you know
34:53
a node.js service you know that you know kubernetes is running
34:54
kubernetes is running
34:54
kubernetes is running you know linux containers you can have
34:57
you know linux containers you can have
34:57
you know linux containers you can have node.js docker and java applications all
34:59
node.js docker and java applications all
34:59
node.js docker and java applications all running together
35:00
running together
35:00
running together in the same cluster uh same
35:02
in the same cluster uh same
35:02
in the same cluster uh same infrastructure can be made use of
35:03
infrastructure can be made use of
35:03
infrastructure can be made use of and when they're working with each other
35:05
and when they're working with each other
35:05
and when they're working with each other you can also say we're using service
35:07
you can also say we're using service
35:07
you can also say we're using service mesh you can also define
35:08
mesh you can also define
35:08
mesh you can also define okay when these connections are made
35:10
okay when these connections are made
35:10
okay when these connections are made this is the retry logic
35:11
this is the retry logic
35:11
this is the retry logic or you know all the other advantages
35:13
or you know all the other advantages
35:13
or you know all the other advantages that you get with this link are these
35:14
that you get with this link are these
35:14
that you get with this link are these service meshes is that
35:16
service meshes is that
35:16
service meshes is that it gives you a nice observability of
35:17
it gives you a nice observability of
35:17
it gives you a nice observability of looking at okay how many
35:19
looking at okay how many
35:19
looking at okay how many services are running and i think so
35:20
services are running and i think so
35:20
services are running and i think so which is what i'm going to show you next
35:22
which is what i'm going to show you next
35:22
which is what i'm going to show you next which is if i go
35:23
which is if i go
35:23
which is if i go here and say link id
35:26
dashboard by the way you don't have to
35:28
dashboard by the way you don't have to
35:28
dashboard by the way you don't have to worry about these things i have
35:30
worry about these things i have
35:30
worry about these things i have documented all these things
35:31
documented all these things
35:31
documented all these things so if you want to uh try this out later
35:33
so if you want to uh try this out later
35:33
so if you want to uh try this out later okay
35:35
okay
35:35
okay one second i need the dashboard they go
35:38
one second i need the dashboard they go
35:38
one second i need the dashboard they go so this is the dashboard that gets
35:40
so this is the dashboard that gets
35:40
so this is the dashboard that gets created so you can see this you know
35:41
created so you can see this you know
35:41
created so you can see this you know it's very similar to the kubernetes
35:43
it's very similar to the kubernetes
35:43
it's very similar to the kubernetes dashboard
35:44
dashboard
35:44
dashboard but it'll tell you that you know in your
35:45
but it'll tell you that you know in your
35:45
but it'll tell you that you know in your default namespace let me just go
35:47
default namespace let me just go
35:47
default namespace let me just go here the default namespace that's where
35:50
here the default namespace that's where
35:50
here the default namespace that's where i have installed backend and front end
35:52
i have installed backend and front end
35:52
i have installed backend and front end it says two of my services are meshed
35:55
it says two of my services are meshed
35:55
it says two of my services are meshed and that is why if you just if i just go
35:57
and that is why if you just if i just go
35:57
and that is why if you just if i just go and say cube ctl
36:00
and say cube ctl
36:00
and say cube ctl get parts you can see that you know it's
36:03
get parts you can see that you know it's
36:03
get parts you can see that you know it's running three
36:03
running three
36:04
running three out of three because you know it is
36:05
out of three because you know it is
36:05
out of three because you know it is running two of the back ends and
36:07
running two of the back ends and
36:07
running two of the back ends and front-ends
36:08
front-ends
36:08
front-ends but then the third one which is the
36:10
but then the third one which is the
36:10
but then the third one which is the sidecar that is the
36:12
sidecar that is the
36:12
sidecar that is the mesh that is running right so that takes
36:14
mesh that is running right so that takes
36:14
mesh that is running right so that takes care of all the infrastructure and
36:15
care of all the infrastructure and
36:15
care of all the infrastructure and things now how do you mesh this
36:17
things now how do you mesh this
36:17
things now how do you mesh this now again i'll show you how to do that
36:19
now again i'll show you how to do that
36:19
now again i'll show you how to do that because all that i'm showing you
36:20
because all that i'm showing you
36:20
because all that i'm showing you here it's on my repository called on.net
36:23
here it's on my repository called on.net
36:23
here it's on my repository called on.net so i've done
36:23
so i've done
36:24
so i've done i did a show with sll and i actually had
36:26
i did a show with sll and i actually had
36:26
i did a show with sll and i actually had built a sample for that
36:27
built a sample for that
36:27
built a sample for that and that's why it's here so i'm using
36:30
and that's why it's here so i'm using
36:30
and that's why it's here so i'm using something called as
36:31
something called as
36:31
something called as um like the service mesh uh link id
36:34
um like the service mesh uh link id
36:34
um like the service mesh uh link id so you there are steps about tight
36:36
so you there are steps about tight
36:36
so you there are steps about tight deploy what it does you can how to
36:37
deploy what it does you can how to
36:37
deploy what it does you can how to provide the configurations connection
36:39
provide the configurations connection
36:39
provide the configurations connection strings
36:39
strings
36:40
strings if you're using zipkin then add the
36:41
if you're using zipkin then add the
36:41
if you're using zipkin then add the zipkin configuration as well
36:43
zipkin configuration as well
36:43
zipkin configuration as well and then here's how you go and install
36:46
and then here's how you go and install
36:46
and then here's how you go and install link id
36:47
link id
36:47
link id here's a check that you need to do and
36:49
here's a check that you need to do and
36:49
here's a check that you need to do and once you run it
36:50
once you run it
36:50
once you run it here's how it will be it'll have all
36:52
here's how it will be it'll have all
36:52
here's how it will be it'll have all those things running
36:53
those things running
36:53
those things running and then go to the dashboard to see this
36:54
and then go to the dashboard to see this
36:54
and then go to the dashboard to see this right so the next thing that you do
36:56
right so the next thing that you do
36:56
right so the next thing that you do is you you use these commands for the
36:59
is you you use these commands for the
36:59
is you you use these commands for the front end and the back end
37:00
front end and the back end
37:00
front end and the back end and i use something called and we pipe
37:02
and i use something called and we pipe
37:02
and i use something called and we pipe this command we actually take the
37:03
this command we actually take the
37:04
this command we actually take the deployment yaml file and pipe it with
37:07
deployment yaml file and pipe it with
37:07
deployment yaml file and pipe it with uh and inject it inject liquidity
37:09
uh and inject it inject liquidity
37:09
uh and inject it inject liquidity annotations to it
37:10
annotations to it
37:10
annotations to it and then reapply that so you remember
37:12
and then reapply that so you remember
37:12
and then reapply that so you remember when i did tight deploy i was not
37:14
when i did tight deploy i was not
37:14
when i did tight deploy i was not working with any kubernetes the aml
37:15
working with any kubernetes the aml
37:16
working with any kubernetes the aml configurations because
37:17
configurations because
37:17
configurations because tai was doing all this magic for me so i
37:19
tai was doing all this magic for me so i
37:19
tai was doing all this magic for me so i don't have the deployment scripts so in
37:20
don't have the deployment scripts so in
37:20
don't have the deployment scripts so in production you may be
37:22
production you may be
37:22
production you may be you don't need to do something like this
37:23
you don't need to do something like this
37:23
you don't need to do something like this because you probably can annotate it
37:25
because you probably can annotate it
37:25
because you probably can annotate it right where your ci systems or cd
37:27
right where your ci systems or cd
37:27
right where your ci systems or cd systems where it is deploying kubernetes
37:28
systems where it is deploying kubernetes
37:28
systems where it is deploying kubernetes can actually
37:29
can actually
37:29
can actually you can write those things so in this
37:31
you can write those things so in this
37:31
you can write those things so in this case i'm not so i'm actually getting
37:33
case i'm not so i'm actually getting
37:33
case i'm not so i'm actually getting that
37:33
that
37:33
that uh deploy whatever is deployed and i'm
37:35
uh deploy whatever is deployed and i'm
37:35
uh deploy whatever is deployed and i'm injecting linkedin to it and saying okay
37:37
injecting linkedin to it and saying okay
37:37
injecting linkedin to it and saying okay i want this service to be meshed
37:39
i want this service to be meshed
37:39
i want this service to be meshed and then applying to all these things so
37:41
and then applying to all these things so
37:41
and then applying to all these things so even though i say okay you can go and
37:43
even though i say okay you can go and
37:43
even though i say okay you can go and apply for all the four
37:44
apply for all the four
37:44
apply for all the four um you know services i'm not doing that
37:47
um you know services i'm not doing that
37:47
um you know services i'm not doing that i'm actually in my
37:48
i'm actually in my
37:48
i'm actually in my in my local i'm actually meshing only
37:50
in my local i'm actually meshing only
37:50
in my local i'm actually meshing only two of it and that is the reason when
37:51
two of it and that is the reason when
37:51
two of it and that is the reason when you go to the link in the dashboard
37:52
you go to the link in the dashboard
37:52
you go to the link in the dashboard it tells that it's only two of the
37:54
it tells that it's only two of the
37:54
it tells that it's only two of the things that is meshed right
37:56
things that is meshed right
37:56
things that is meshed right so now if i go to the default inside it
37:58
so now if i go to the default inside it
37:58
so now if i go to the default inside it so it gives me these replicas the parts
38:00
so it gives me these replicas the parts
38:00
so it gives me these replicas the parts those details
38:02
those details
38:02
those details right now you see that you know success
38:04
right now you see that you know success
38:04
right now you see that you know success rate there's absolutely no success rate
38:06
rate there's absolutely no success rate
38:06
rate there's absolutely no success rate that is given that's because we have
38:07
that is given that's because we have
38:07
that is given that's because we have only hit some twice or thrice
38:08
only hit some twice or thrice
38:08
only hit some twice or thrice so let's go ahead and hit the url with
38:12
so let's go ahead and hit the url with
38:12
so let's go ahead and hit the url with some more requests so that i get more
38:13
some more requests so that i get more
38:13
some more requests so that i get more failures right so what i'm going to do
38:15
failures right so what i'm going to do
38:15
failures right so what i'm going to do is i'm going to use a powershell script
38:17
is i'm going to use a powershell script
38:17
is i'm going to use a powershell script for that
38:17
for that
38:17
for that to um hit it so last time i was doing
38:21
to um hit it so last time i was doing
38:21
to um hit it so last time i was doing 5000 so in this case i'm since i'm doing
38:24
5000 so in this case i'm since i'm doing
38:24
5000 so in this case i'm since i'm doing i did not uh expose it right anything so
38:27
i did not uh expose it right anything so
38:27
i did not uh expose it right anything so let's
38:27
let's
38:28
let's import for over 3000 and i'll go to the
38:30
import for over 3000 and i'll go to the
38:30
import for over 3000 and i'll go to the next url
38:31
next url
38:31
next url and instead of 5000 i'm going to use
38:33
and instead of 5000 i'm going to use
38:33
and instead of 5000 i'm going to use 3000 because that's where
38:34
3000 because that's where
38:34
3000 because that's where basically what it is doing is every
38:36
basically what it is doing is every
38:36
basically what it is doing is every single second it is going to hit it
38:38
single second it is going to hit it
38:38
single second it is going to hit it and the reason why i wanted to do that
38:41
and the reason why i wanted to do that
38:41
and the reason why i wanted to do that is basically i want to show you
38:42
is basically i want to show you
38:42
is basically i want to show you sometimes there will be failures and
38:44
sometimes there will be failures and
38:44
sometimes there will be failures and this dashboard will show you
38:46
this dashboard will show you
38:46
this dashboard will show you okay there are the success rate has now
38:48
okay there are the success rate has now
38:48
okay there are the success rate has now gone down to 33.3 percent right
38:50
gone down to 33.3 percent right
38:50
gone down to 33.3 percent right so it tells me okay you have some
38:53
so it tells me okay you have some
38:53
so it tells me okay you have some problem in the back end
38:54
problem in the back end
38:54
problem in the back end it has not been able to reach it's not
38:56
it has not been able to reach it's not
38:56
it has not been able to reach it's not reachable for some reason or if there's
38:57
reachable for some reason or if there's
38:57
reachable for some reason or if there's a success
38:58
a success
38:58
a success issue there right so not just this
39:01
issue there right so not just this
39:01
issue there right so not just this it can also give you this grafana
39:03
it can also give you this grafana
39:03
it can also give you this grafana dashboard so if you can go into the
39:04
dashboard so if you can go into the
39:04
dashboard so if you can go into the grafana dashboard
39:06
grafana dashboard
39:06
grafana dashboard uh get a more home of it it tells you
39:08
uh get a more home of it it tells you
39:08
uh get a more home of it it tells you the success rate of it
39:09
the success rate of it
39:09
the success rate of it uh it tells you all more details i mean
39:11
uh it tells you all more details i mean
39:11
uh it tells you all more details i mean these are the things that come service
39:13
these are the things that come service
39:13
these are the things that come service meshes come with right it gives you
39:14
meshes come with right it gives you
39:14
meshes come with right it gives you observability on how your service is
39:16
observability on how your service is
39:16
observability on how your service is working so in this case we only have
39:17
working so in this case we only have
39:17
working so in this case we only have three things that is working
39:19
three things that is working
39:19
three things that is working uh but then um you know the in reality
39:22
uh but then um you know the in reality
39:22
uh but then um you know the in reality you will have
39:22
you will have
39:22
you will have hundreds of microservices working
39:24
hundreds of microservices working
39:24
hundreds of microservices working together so you want to know where the
39:25
together so you want to know where the
39:25
together so you want to know where the issue is
39:26
issue is
39:26
issue is you want to take action on some when
39:28
you want to take action on some when
39:28
you want to take action on some when things goes bad and things like that
39:30
things goes bad and things like that
39:30
things goes bad and things like that right
39:30
right
39:30
right so now let's go fix this right you know
39:32
so now let's go fix this right you know
39:32
so now let's go fix this right you know we're not going to reduce the success
39:33
we're not going to reduce the success
39:33
we're not going to reduce the success rate what we're going to do is
39:34
rate what we're going to do is
39:34
rate what we're going to do is we're going to fix um so someone who's
39:37
we're going to fix um so someone who's
39:37
we're going to fix um so someone who's accessing our application should not be
39:38
accessing our application should not be
39:38
accessing our application should not be thrown
39:39
thrown
39:39
thrown an error all the time instead let's see
39:41
an error all the time instead let's see
39:41
an error all the time instead let's see if we can gracefully handle it
39:42
if we can gracefully handle it
39:42
if we can gracefully handle it so for that what i need to do is
39:51
go back to
39:55
my folder i have something called a
39:58
my folder i have something called a
39:58
my folder i have something called a service mesh and you can see that i have
40:00
service mesh and you can see that i have
40:00
service mesh and you can see that i have both hto and link id but linker d is one
40:03
both hto and link id but linker d is one
40:03
both hto and link id but linker d is one offering of service mesh there's sd also
40:05
offering of service mesh there's sd also
40:05
offering of service mesh there's sd also so whatever you like
40:06
so whatever you like
40:06
so whatever you like uh like evaluate it and then you can go
40:09
uh like evaluate it and then you can go
40:09
uh like evaluate it and then you can go and use that
40:09
and use that
40:10
and use that so i have again if you go back to my
40:13
so i have again if you go back to my
40:13
so i have again if you go back to my readme file i have also a description
40:16
readme file i have also a description
40:16
readme file i have also a description about how to do with sdo as well so if
40:18
about how to do with sdo as well so if
40:18
about how to do with sdo as well so if you are someone who wants to do with
40:20
you are someone who wants to do with
40:20
you are someone who wants to do with istio
40:20
istio
40:20
istio uh there is that too okay so now let's
40:23
uh there is that too okay so now let's
40:23
uh there is that too okay so now let's go and do
40:24
go and do
40:24
go and do linkedin so i go to linkedin uh what i'm
40:28
linkedin so i go to linkedin uh what i'm
40:28
linkedin so i go to linkedin uh what i'm going to do is use this cubectl
40:30
going to do is use this cubectl
40:30
going to do is use this cubectl apply command go to f um
40:33
apply command go to f um
40:33
apply command go to f um that's from file and say i want to apply
40:35
that's from file and say i want to apply
40:35
that's from file and say i want to apply backend service profile now before i do
40:37
backend service profile now before i do
40:37
backend service profile now before i do that
40:38
that
40:38
that i want to go to the and show you what is
40:40
i want to go to the and show you what is
40:40
i want to go to the and show you what is written in there right
40:41
written in there right
40:41
written in there right so this is my service profile and it's
40:43
so this is my service profile and it's
40:43
so this is my service profile and it's very similar to how you write kubernetes
40:46
very similar to how you write kubernetes
40:46
very similar to how you write kubernetes javascripts here i want to say that okay
40:48
javascripts here i want to say that okay
40:48
javascripts here i want to say that okay this is my path
40:49
this is my path
40:49
this is my path weather forecast for this i want
40:52
weather forecast for this i want
40:52
weather forecast for this i want something like
40:53
something like
40:53
something like retriable true so all that you do is
40:56
retriable true so all that you do is
40:56
retriable true so all that you do is write down
40:57
write down
40:57
write down in the yaml file saying i want to retry
41:00
in the yaml file saying i want to retry
41:00
in the yaml file saying i want to retry and the service mesh will take care of
41:02
and the service mesh will take care of
41:02
and the service mesh will take care of retrying it without
41:03
retrying it without
41:03
retrying it without any issues now uh remember when we were
41:06
any issues now uh remember when we were
41:06
any issues now uh remember when we were doing poly
41:06
doing poly
41:06
doing poly we had this retry exponential back off
41:08
we had this retry exponential back off
41:08
we had this retry exponential back off and service breaker circuit breaker and
41:10
and service breaker circuit breaker and
41:10
and service breaker circuit breaker and things
41:10
things
41:10
things in when you do service mesh especially
41:13
in when you do service mesh especially
41:13
in when you do service mesh especially in link id
41:14
in link id
41:14
in link id you don't have those kind of concepts
41:16
you don't have those kind of concepts
41:16
you don't have those kind of concepts instead you have something called a
41:17
instead you have something called a
41:17
instead you have something called a required budget it says
41:18
required budget it says
41:18
required budget it says okay i want my my retry ratio is 20 of
41:21
okay i want my my retry ratio is 20 of
41:21
okay i want my my retry ratio is 20 of the original request
41:23
the original request
41:23
the original request is something what i want so you it's a
41:24
is something what i want so you it's a
41:24
is something what i want so you it's a different way of telling you know how to
41:26
different way of telling you know how to
41:26
different way of telling you know how to bring down those hits to the back end
41:29
bring down those hits to the back end
41:29
bring down those hits to the back end right
41:29
right
41:29
right so i enable this and now i can apply
41:33
so i enable this and now i can apply
41:33
so i enable this and now i can apply this
41:34
this
41:34
this and there you go it just goes and
41:35
and there you go it just goes and
41:36
and there you go it just goes and applies it now if i go back to my
41:39
applies it now if i go back to my
41:39
applies it now if i go back to my page front end i guess 3000 okay let me
41:43
page front end i guess 3000 okay let me
41:43
page front end i guess 3000 okay let me we need to oops sorry
41:47
um forward
41:51
um forward
41:52
um forward let's black here i think okay
41:55
let's black here i think okay
41:55
let's black here i think okay now 3000 let's go back to
41:59
um localhost belgium
42:03
um localhost belgium
42:03
um localhost belgium and now we can just refresh it refresh
42:05
and now we can just refresh it refresh
42:05
and now we can just refresh it refresh it refresh it refresh it refresh it
42:07
it refresh it refresh it refresh it
42:08
it refresh it refresh it refresh it and you'll never see that error those
42:09
and you'll never see that error those
42:09
and you'll never see that error those errors have gone away now
42:11
errors have gone away now
42:11
errors have gone away now the difference is we did not write it in
42:13
the difference is we did not write it in
42:13
the difference is we did not write it in code we wrote it in
42:14
code we wrote it in
42:14
code we wrote it in the infrastructure and that's the key
42:17
the infrastructure and that's the key
42:17
the infrastructure and that's the key thing about it
42:18
thing about it
42:18
thing about it okay so i think i still have 10 more
42:20
okay so i think i still have 10 more
42:20
okay so i think i still have 10 more minutes so i'll show you a few more
42:21
minutes so i'll show you a few more
42:21
minutes so i'll show you a few more stuffs
42:22
stuffs
42:22
stuffs um so in between if i let me check if
42:25
um so in between if i let me check if
42:25
um so in between if i let me check if you have any questions for me
42:28
you have any questions for me
42:28
you have any questions for me um let's say we have two apis a.net api
42:33
um let's say we have two apis a.net api
42:33
um let's say we have two apis a.net api consumes python api for some processing
42:37
consumes python api for some processing
42:37
consumes python api for some processing um how to implement this in
42:38
um how to implement this in
42:38
um how to implement this in microservices and how they should
42:39
microservices and how they should
42:39
microservices and how they should communicate python api need not be
42:41
communicate python api need not be
42:41
communicate python api need not be exposed to client app
42:43
exposed to client app
42:43
exposed to client app yeah that's fine because as i said you
42:45
yeah that's fine because as i said you
42:45
yeah that's fine because as i said you know as long so this is how service
42:47
know as long so this is how service
42:47
know as long so this is how service discovery works right
42:48
discovery works right
42:48
discovery works right internally once you define the service
42:50
internally once you define the service
42:50
internally once you define the service uh each service will have to be given a
42:52
uh each service will have to be given a
42:52
uh each service will have to be given a name so if you're for example
42:54
name so if you're for example
42:54
name so if you're for example in kubernetes yaml file you provide the
42:56
in kubernetes yaml file you provide the
42:56
in kubernetes yaml file you provide the service name and that becomes your http
42:58
service name and that becomes your http
42:58
service name and that becomes your http colon that service name
42:59
colon that service name
42:59
colon that service name becomes your uh the place that you want
43:02
becomes your uh the place that you want
43:02
becomes your uh the place that you want to reach
43:03
to reach
43:03
to reach it doesn't have to be python it can be
43:05
it doesn't have to be python it can be
43:05
it doesn't have to be python it can be anything in any service right the moment
43:07
anything in any service right the moment
43:07
anything in any service right the moment you hit it
43:08
you hit it
43:08
you hit it you have to tell that obviously in that
43:09
you have to tell that obviously in that
43:09
you have to tell that obviously in that python you have to say what is the port
43:11
python you have to say what is the port
43:11
python you have to say what is the port that you're exposing for example
43:13
that you're exposing for example
43:13
that you're exposing for example h80 is the http port so if it is exposed
43:16
h80 is the http port so if it is exposed
43:16
h80 is the http port so if it is exposed you can actually connect with that
43:18
you can actually connect with that
43:18
you can actually connect with that easily so within the service you can
43:20
easily so within the service you can
43:20
easily so within the service you can work with other services absolutely no
43:22
work with other services absolutely no
43:22
work with other services absolutely no issues with that
43:25
issues with that
43:26
issues with that there any other questions or for now
43:27
there any other questions or for now
43:27
there any other questions or for now okay let's go it
43:29
okay let's go it
43:29
okay let's go it okay so now let me show you how to do
43:32
okay so now let me show you how to do
43:32
okay so now let me show you how to do this yourself
43:33
this yourself
43:33
this yourself right so i encourage you to go check
43:35
right so i encourage you to go check
43:35
right so i encourage you to go check this out called aka dot ms slash asp.net
43:38
this out called aka dot ms slash asp.net
43:38
this out called aka dot ms slash asp.net hyphen microservices
43:39
hyphen microservices
43:39
hyphen microservices so this is something which we built
43:43
so this is something which we built
43:43
so this is something which we built recently which has a lot of
43:46
recently which has a lot of
43:46
recently which has a lot of ways to build micro services for example
43:47
ways to build micro services for example
43:47
ways to build micro services for example the first one says create and deploy a
43:49
the first one says create and deploy a
43:49
the first one says create and deploy a cloud native asp.net core micro service
43:53
cloud native asp.net core micro service
43:53
cloud native asp.net core micro service the way we design these modules is uh
43:56
the way we design these modules is uh
43:56
the way we design these modules is uh you know you don't have to even have any
43:58
you know you don't have to even have any
43:58
you know you don't have to even have any installation on your
44:00
installation on your
44:00
installation on your um you know system you just simply click
44:02
um you know system you just simply click
44:02
um you know system you just simply click start
44:03
start
44:03
start you need to have an azure subscription
44:04
you need to have an azure subscription
44:04
you need to have an azure subscription if you don't have just create a free
44:06
if you don't have just create a free
44:06
if you don't have just create a free account there
44:07
account there
44:07
account there once you have that just go into the
44:09
once you have that just go into the
44:09
once you have that just go into the azure cli all that you need is azure
44:11
azure cli all that you need is azure
44:11
azure cli all that you need is azure cloud shell
44:12
cloud shell
44:12
cloud shell and then just run this thing like you
44:14
and then just run this thing like you
44:14
and then just run this thing like you know once you do that what it does is it
44:16
know once you do that what it does is it
44:16
know once you do that what it does is it just goes
44:17
just goes
44:17
just goes and creates this this whole eshop and
44:20
and creates this this whole eshop and
44:20
and creates this this whole eshop and containers whole e-commerce application
44:22
containers whole e-commerce application
44:22
containers whole e-commerce application completely on the on your cluster over
44:24
completely on the on your cluster over
44:24
completely on the on your cluster over kubernetes cluster
44:25
kubernetes cluster
44:25
kubernetes cluster because we scripted everything so it's
44:27
because we scripted everything so it's
44:27
because we scripted everything so it's very easy for you to get started
44:29
very easy for you to get started
44:30
very easy for you to get started then what you can what it does is uh
44:33
then what you can what it does is uh
44:33
then what you can what it does is uh you your job here in the first module
44:36
you your job here in the first module
44:36
you your job here in the first module is basically to you know create a new
44:38
is basically to you know create a new
44:38
is basically to you know create a new service called the coupon service
44:40
service called the coupon service
44:40
service called the coupon service so you will go and create this coupon
44:42
so you will go and create this coupon
44:42
so you will go and create this coupon service and in the
44:43
service and in the
44:43
service and in the in the making of this you will start
44:45
in the making of this you will start
44:45
in the making of this you will start learning okay how is these services
44:47
learning okay how is these services
44:47
learning okay how is these services communicating with each other
44:49
communicating with each other
44:49
communicating with each other when a coupon is applied how does the
44:51
when a coupon is applied how does the
44:51
when a coupon is applied how does the order service know that that coupon is
44:53
order service know that that coupon is
44:53
order service know that that coupon is applied so that's through your even bus
44:55
applied so that's through your even bus
44:55
applied so that's through your even bus and how they communicate with each other
44:56
and how they communicate with each other
44:56
and how they communicate with each other through api gateway all those kind of
44:58
through api gateway all those kind of
44:58
through api gateway all those kind of things
44:59
things
44:59
things you will start learning and now it will
45:00
you will start learning and now it will
45:00
you will start learning and now it will start to make sense right
45:02
start to make sense right
45:02
start to make sense right so your job is to just build coupon
45:04
so your job is to just build coupon
45:04
so your job is to just build coupon service you don't have to worry about
45:05
service you don't have to worry about
45:05
service you don't have to worry about any of this and that's the typical real
45:06
any of this and that's the typical real
45:06
any of this and that's the typical real world of micro services where you don't
45:08
world of micro services where you don't
45:08
world of micro services where you don't worry about the existing clusters and
45:09
worry about the existing clusters and
45:09
worry about the existing clusters and things
45:10
things
45:10
things you worry about your service and how you
45:12
you worry about your service and how you
45:12
you worry about your service and how you want to implement and it's your end
45:13
want to implement and it's your end
45:13
want to implement and it's your end point right you receive something you
45:15
point right you receive something you
45:15
point right you receive something you process something
45:15
process something
45:15
process something you let other services know through
45:17
you let other services know through
45:17
you let other services know through events or you will call their apis and
45:19
events or you will call their apis and
45:19
events or you will call their apis and update it right so that is what is there
45:22
update it right so that is what is there
45:22
update it right so that is what is there in this module
45:23
in this module
45:23
in this module uh you can go and learn this in the
45:24
uh you can go and learn this in the
45:24
uh you can go and learn this in the process in this module you'll also learn
45:27
process in this module you'll also learn
45:27
process in this module you'll also learn about health checks how do you implement
45:28
about health checks how do you implement
45:28
about health checks how do you implement health checks in dot net
45:29
health checks in dot net
45:30
health checks in dot net uh so that kubernetes has these two
45:32
uh so that kubernetes has these two
45:32
uh so that kubernetes has these two there are two probes
45:33
there are two probes
45:33
there are two probes the liveness and readiness probes you
45:34
the liveness and readiness probes you
45:34
the liveness and readiness probes you learn about what are those and why you
45:36
learn about what are those and why you
45:36
learn about what are those and why you need them
45:37
need them
45:37
need them um and such things like that right so
45:39
um and such things like that right so
45:39
um and such things like that right so whatever i showed you today
45:41
whatever i showed you today
45:41
whatever i showed you today and that let's go back and that
45:44
and that let's go back and that
45:44
and that let's go back and that is there in this one implement
45:45
is there in this one implement
45:45
is there in this one implement resiliency in cloud native asp.net core
45:48
resiliency in cloud native asp.net core
45:48
resiliency in cloud native asp.net core microservice so you can go into this
45:49
microservice so you can go into this
45:49
microservice so you can go into this and you can actually start today i mean
45:51
and you can actually start today i mean
45:51
and you can actually start today i mean you don't you just need as your
45:53
you don't you just need as your
45:53
you don't you just need as your subscription just sign up if you don't
45:54
subscription just sign up if you don't
45:54
subscription just sign up if you don't have
45:55
have
45:55
have uh one just freeze free account to sign
45:57
uh one just freeze free account to sign
45:57
uh one just freeze free account to sign it up and then execute it so you will
45:59
it up and then execute it so you will
45:59
it up and then execute it so you will learn how to do this
46:00
learn how to do this
46:00
learn how to do this in uh directly in like a production like
46:02
in uh directly in like a production like
46:02
in uh directly in like a production like environment like aks
46:03
environment like aks
46:04
environment like aks right so so you can it has two options
46:06
right so so you can it has two options
46:06
right so so you can it has two options like you know how to use poly
46:08
like you know how to use poly
46:08
like you know how to use poly um of course you're actually building
46:09
um of course you're actually building
46:09
um of course you're actually building this in a in a in a production like
46:12
this in a in a in a production like
46:12
this in a in a in a production like scenario so you will
46:13
scenario so you will
46:13
scenario so you will approach it differently like how do you
46:15
approach it differently like how do you
46:15
approach it differently like how do you uh use
46:16
uh use
46:16
uh use uh these you know coupon applications
46:18
uh these you know coupon applications
46:18
uh these you know coupon applications and things
46:19
and things
46:19
and things it has a lot of explanation and by the
46:21
it has a lot of explanation and by the
46:21
it has a lot of explanation and by the end of it you will learn
46:22
end of it you will learn
46:22
end of it you will learn a lot of things and then you can also
46:24
a lot of things and then you can also
46:24
a lot of things and then you can also like you know have
46:26
like you know have
46:26
like you know have some questions knowledge check answered
46:27
some questions knowledge check answered
46:28
some questions knowledge check answered and then uh you know
46:29
and then uh you know
46:29
and then uh you know there is some kind of uh like once you
46:31
there is some kind of uh like once you
46:31
there is some kind of uh like once you answer these and then it'll add it to
46:32
answer these and then it'll add it to
46:32
answer these and then it'll add it to your profile as
46:34
your profile as
46:34
your profile as uh someone who has completed this uh so
46:36
uh someone who has completed this uh so
46:36
uh someone who has completed this uh so you can actually pat on the back with
46:37
you can actually pat on the back with
46:37
you can actually pat on the back with these uh
46:39
these uh
46:39
these uh uh with these points that you collect
46:40
uh with these points that you collect
46:40
uh with these points that you collect here okay
46:42
here okay
46:42
here okay so and then there are more stuffs uh
46:47
like instrumentation feature flags um
46:51
like instrumentation feature flags um
46:51
like instrumentation feature flags um you know github actions and we are
46:53
you know github actions and we are
46:53
you know github actions and we are actually building some more
46:54
actually building some more
46:54
actually building some more uh in the next coming months so you will
46:56
uh in the next coming months so you will
46:56
uh in the next coming months so you will see more of it so
46:58
see more of it so
46:58
see more of it so um make sure that you have this thing
47:00
um make sure that you have this thing
47:00
um make sure that you have this thing bookmarked ak dot ms it's been at hyphen
47:03
bookmarked ak dot ms it's been at hyphen
47:03
bookmarked ak dot ms it's been at hyphen micro services the other piece that i
47:05
micro services the other piece that i
47:05
micro services the other piece that i wanted to show you
47:07
wanted to show you
47:07
wanted to show you is the dot net architecture page
47:11
is the dot net architecture page
47:11
is the dot net architecture page so here we have some really amazing
47:13
so here we have some really amazing
47:13
so here we have some really amazing books like you know
47:14
books like you know
47:14
books like you know if you are someone who are getting
47:15
if you are someone who are getting
47:15
if you are someone who are getting started with microservices you might
47:16
started with microservices you might
47:16
started with microservices you might also want to look at dapofa.net
47:18
also want to look at dapofa.net
47:18
also want to look at dapofa.net developers which is something which we
47:20
developers which is something which we
47:20
developers which is something which we recently um you know launched this book
47:22
recently um you know launched this book
47:22
recently um you know launched this book is really amazing
47:24
is really amazing
47:24
is really amazing this talks about you know how to take
47:25
this talks about you know how to take
47:25
this talks about you know how to take these crosscutting concerns that we
47:26
these crosscutting concerns that we
47:26
these crosscutting concerns that we speak about
47:27
speak about
47:27
speak about and take it inside the distributed
47:29
and take it inside the distributed
47:29
and take it inside the distributed application run time framework right
47:31
application run time framework right
47:31
application run time framework right or run time sorry and then there is a
47:33
or run time sorry and then there is a
47:33
or run time sorry and then there is a free pdf and the good thing about this
47:35
free pdf and the good thing about this
47:35
free pdf and the good thing about this pdf is you click on it
47:36
pdf is you click on it
47:36
pdf is you click on it and it just gets downloaded uh you
47:38
and it just gets downloaded uh you
47:38
and it just gets downloaded uh you really don't have to fill up any forms
47:40
really don't have to fill up any forms
47:40
really don't have to fill up any forms or any of that sort we don't need any of
47:41
or any of that sort we don't need any of
47:41
or any of that sort we don't need any of your information it just starts
47:43
your information it just starts
47:43
your information it just starts uh you can just start reading it right
47:45
uh you can just start reading it right
47:45
uh you can just start reading it right away and so
47:47
away and so
47:47
away and so so there you go so this is the book this
47:49
so there you go so this is the book this
47:49
so there you go so this is the book this is a free pdf
47:50
is a free pdf
47:50
is a free pdf and you can go and learn this dapper
47:53
and you can go and learn this dapper
47:53
and you can go and learn this dapper uh you can also learn a lot of other
47:55
uh you can also learn a lot of other
47:55
uh you can also learn a lot of other things like for example one of the
47:57
things like for example one of the
47:57
things like for example one of the things is micro services architecture
47:58
things is micro services architecture
47:58
things is micro services architecture book which is which explains a lot of
48:00
book which is which explains a lot of
48:00
book which is which explains a lot of things about how do you
48:02
things about how do you
48:02
things about how do you design your micro services with cqrs ddd
48:04
design your micro services with cqrs ddd
48:04
design your micro services with cqrs ddd and all those kind of concepts
48:07
and all those kind of concepts
48:07
and all those kind of concepts you can all there is also something
48:09
you can all there is also something
48:09
you can all there is also something called eshop and containers
48:10
called eshop and containers
48:10
called eshop and containers as i mentioned this is one of our
48:11
as i mentioned this is one of our
48:11
as i mentioned this is one of our popular samples this is what we use it
48:13
popular samples this is what we use it
48:13
popular samples this is what we use it to
48:14
to
48:14
to show the large complexity uh but they
48:18
show the large complexity uh but they
48:18
show the large complexity uh but they are very simple if you
48:19
are very simple if you
48:19
are very simple if you install the docker correctly with wsl2
48:21
install the docker correctly with wsl2
48:22
install the docker correctly with wsl2 you just have to do a docker compose
48:23
you just have to do a docker compose
48:23
you just have to do a docker compose build and up
48:24
build and up
48:24
build and up and you'll have all these services
48:25
and you'll have all these services
48:25
and you'll have all these services running in your local system
48:27
running in your local system
48:27
running in your local system and then just you know navigate to the
48:28
and then just you know navigate to the
48:28
and then just you know navigate to the local docker host and then run it so if
48:31
local docker host and then run it so if
48:31
local docker host and then run it so if you want to install it in local
48:32
you want to install it in local
48:32
you want to install it in local kubernetes you can do that you want to
48:33
kubernetes you can do that you want to
48:33
kubernetes you can do that you want to do it in aks you can do that so all
48:35
do it in aks you can do that so all
48:35
do it in aks you can do that so all those things are explained
48:36
those things are explained
48:36
those things are explained uh in the wiki here and if you have any
48:39
uh in the wiki here and if you have any
48:39
uh in the wiki here and if you have any issues you hit some issues
48:41
issues you hit some issues
48:41
issues you hit some issues let us know and we'll be happy to help
48:43
let us know and we'll be happy to help
48:43
let us know and we'll be happy to help you out there and what we want is we
48:45
you out there and what we want is we
48:45
you out there and what we want is we want you to be successful building
48:46
want you to be successful building
48:46
want you to be successful building microservices
48:48
microservices
48:48
microservices in dot net having said that
48:51
in dot net having said that
48:51
in dot net having said that let me see if i have anything left out
48:54
let me see if i have anything left out
48:54
let me see if i have anything left out nope i think that's it i think i'll
48:56
nope i think that's it i think i'll
48:56
nope i think that's it i think i'll cover all of this
48:58
cover all of this
48:58
cover all of this so i think i'm going to give you back
49:01
so i think i'm going to give you back
49:01
so i think i'm going to give you back five minutes of your saturday
49:02
five minutes of your saturday
49:02
five minutes of your saturday and so that you can go back and enjoy uh
49:05
and so that you can go back and enjoy uh
49:05
and so that you can go back and enjoy uh with your family
49:06
with your family
49:06
with your family and our friends whatever and thank you
49:08
and our friends whatever and thank you
49:08
and our friends whatever and thank you so much for joining in
49:17
so much for joining in
49:17
so much for joining in [Music]
49:20
[Music]
49:20
[Music] you


