5.1.b-Leader Election--Fundamentals--Leader election via a lease

  Рет қаралды 8,083

Jeffrey Richter

Jeffrey Richter

7 жыл бұрын

This video shows how to implement leader election using a lease mechanism.

Пікірлер: 5
@mostinho7
@mostinho7 4 жыл бұрын
Done thanks We don’t want to implement leader election ourselves due to race condition on crashes, so we use one of these mechanisms. 0:10 Lease (all instanced try to be the leader): 1:47 a new task shows up in the db with a work time and status (done or not done) Each task has “leases” for the leader election
@user-eg7yz4ub6u
@user-eg7yz4ub6u 5 жыл бұрын
I wonder what magic makes leasee attribute to disappear when service 1 crushed? In my experience some timeout attributes usually are used for other services to understand that the lease is expired
@JeffreyRichter
@JeffreyRichter 5 жыл бұрын
Yes, the lease expires due to timeout
@TheHellst0rm
@TheHellst0rm 4 жыл бұрын
i wonder how does the work item appear in the database? Who puts it there? Doesnt it cause the same problem with leadership again?
@JeffreyRichter
@JeffreyRichter 4 жыл бұрын
Usually a customer initiates some workflow which sends a request to a service which passes through a load balancer in order to select 1 server which then goes and adds an entry to a database. So, in this scenario, the load balancer effectively performs the leader election.
5.1.c-Leader Election--Fundamentals--Leader election via a queue message
2:28
路飞被小孩吓到了#海贼王#路飞
00:41
路飞与唐舞桐
Рет қаралды 78 МЛН
마시멜로우로 체감되는 요즘 물가
00:20
진영민yeongmin
Рет қаралды 31 МЛН
Happy 4th of July 😂
00:12
Alyssa's Ways
Рет қаралды 65 МЛН
3.1.c-Messaging--Fundamentals--Fault-Tolerant message processing
9:29
Jeffrey Richter
Рет қаралды 12 М.
3.1.b-Messaging--Fundamentals--Messaging with queues
9:20
Jeffrey Richter
Рет қаралды 18 М.
1.1.a- Distributed Cloud Apps--Fundamentals--Why Cloud Apps?
12:16
Jeffrey Richter
Рет қаралды 37 М.
6.4.b-Data Storage--Data Consistency--CQRS
4:32
Jeffrey Richter
Рет қаралды 10 М.
6.4.a-Data Storage--Data Consistency--Data Consistency
17:20
Jeffrey Richter
Рет қаралды 5 М.
6.4.c-Data Storage--Data Consistency--Event sourcing
6:53
Jeffrey Richter
Рет қаралды 9 М.
2.2.a-Networking--Service APIs--Turning a monolith into a microservice
12:58
1.2.e-Distributed Cloud Apps--Microservices--12-Factor Services (Apps)
11:37
2.1.a-Networking--Fundamentals--Fallacies of distributed computing
8:40
Копия iPhone с WildBerries
1:00
Wylsacom
Рет қаралды 1,7 МЛН
Лазер против камеры смартфона
1:01
NEWTONLABS
Рет қаралды 291 М.