WEBVTT

1
00:00:00.000 --> 00:00:04.040
Let us understand circuit
breaker. A home fuse interrupts an

2
00:00:04.040 --> 00:00:07.220
unsafe circuit instead of
letting every appliance keep

3
00:00:07.220 --> 00:00:11.000
drawing current. A software
breaker is not the same physical

4
00:00:11.000 --> 00:00:15.460
mechanism, but the useful
idea is similar: stop repeated

5
00:00:15.460 --> 00:00:19.180
harmful attempts, observe
conditions and restore access

6
00:00:19.180 --> 00:00:23.100
carefully. A circuit breaker
temporarily stops calls to a

7
00:00:23.100 --> 00:00:26.760
dependency that appears
unhealthy, then cautiously tests

8
00:00:26.760 --> 00:00:30.540
recovery. It prevents repeated
waiting and extra pressure;

9
00:00:31.140 --> 00:00:35.200
it does not repair the dependency.
Follow the normal path.

10
00:00:35.760 --> 00:00:38.800
The breaker allows normal
calls and records eligible

11
00:00:38.800 --> 00:00:42.920
outcomes. Timeouts still
bound each attempt; a closed

12
00:00:42.920 --> 00:00:45.120
breaker is not a guarantee of health.

13
00:00:45.480 --> 00:00:47.520
The dependency times out repeatedly.

14
00:00:48.160 --> 00:00:51.360
A minimum sample and measurement
window help distinguish a

15
00:00:51.360 --> 00:00:53.660
pattern from a single unlucky request.

16
00:00:53.660 --> 00:00:58.080
If SeatSpot recommendations
repeatedly time out, continuing

17
00:00:58.080 --> 00:01:00.700
to call them can occupy every connection.

18
00:01:01.440 --> 00:01:05.280
A breaker can reject or use a
safe optional fallback while

19
00:01:05.280 --> 00:01:09.360
core booking work continues.
Now change one condition.

20
00:01:09.960 --> 00:01:13.240
The breaker opens and rejects
dependency calls quickly.

21
00:01:13.920 --> 00:01:17.640
This frees local resources
and avoids repeating expensive

22
00:01:17.640 --> 00:01:20.280
failures while recovery is investigated.

23
00:01:20.280 --> 00:01:24.760
A common misunderstanding is
this: An open breaker makes

24
00:01:24.760 --> 00:01:28.020
every fallback safe. A
fallback must preserve business

25
00:01:28.020 --> 00:01:31.220
meaning; it cannot fabricate
a successful payment.

26
00:01:31.660 --> 00:01:33.820
Think about this. The breaker opens.

27
00:01:34.360 --> 00:01:36.300
Has it repaired the
failed payment provider?

28
00:01:36.780 --> 00:01:38.620
Pause the video and make your prediction.

29
00:01:39.340 --> 00:01:41.940
No. It stops repeated calls quickly.

30
00:01:42.660 --> 00:01:45.660
Recovery probes only test whether
the dependency can be used

31
00:01:45.660 --> 00:01:49.300
again. Let us reason
with a concrete example.

32
00:01:49.300 --> 00:01:53.940
An illustrative breaker opens
after enough samples show a

33
00:01:53.940 --> 00:01:57.100
50% eligible-failure rate in its window.

34
00:01:57.760 --> 00:02:01.600
A minimum of 20 calls avoids
opening after one failure out

35
00:02:01.600 --> 00:02:04.600
of one call in this example.
The numbers are teaching

36
00:02:04.600 --> 00:02:07.620
choices, not recommended
universal settings.

37
00:02:08.320 --> 00:02:12.380
Define which timeouts/errors
count, limit half-open probes

38
00:02:12.380 --> 00:02:15.280
and watch false trips
alongside recovery time.

39
00:02:15.280 --> 00:02:18.760
These figures are teaching
examples, not production

40
00:02:18.760 --> 00:02:22.280
guarantees. Turn the idea
into a design decision.

41
00:02:23.180 --> 00:02:24.800
Optional recommendations can be omitted.

42
00:02:25.420 --> 00:02:28.300
Essential payment outcomes
must remain pending or failed

43
00:02:28.300 --> 00:02:31.220
according to verified state,
not invented to hide the

44
00:02:31.220 --> 00:02:34.960
outage. After a reset interval,
allow a limited probe set.

45
00:02:35.760 --> 00:02:38.080
Sending every waiting caller
at once can overload a

46
00:02:38.080 --> 00:02:40.260
dependency that is only partly recovered.

47
00:02:40.880 --> 00:02:43.600
When you try the practice
task, look for this result.

48
00:02:43.600 --> 00:02:47.460
Few probes avoid a recovery
stampede; thresholds are

49
00:02:47.460 --> 00:02:50.580
workload choices. Check
your understanding.

50
00:02:51.260 --> 00:02:54.840
Successful probes restore
normal traffic; failed probes

51
00:02:54.840 --> 00:02:58.660
reopen the breaker. Observe
both false trips and recovery

52
00:02:58.660 --> 00:03:01.000
behavior under controlled failure tests.

53
00:03:01.560 --> 00:03:04.780
Here is a challenge. What
should a breaker do after the

54
00:03:04.780 --> 00:03:07.060
reset interval? Pause before the answer.

55
00:03:07.600 --> 00:03:09.740
Move to half-open with bounded probes.

56
00:03:10.620 --> 00:03:13.660
Evaluate actual outcomes
before restoring full traffic;

57
00:03:14.320 --> 00:03:17.160
otherwise recovering capacity
may be overwhelmed again.

58
00:03:17.760 --> 00:03:21.740
For an interview, define
eligible failures, thresholds and

59
00:03:21.740 --> 00:03:24.980
bounded probes. Say what you
would measure, not only which

60
00:03:24.980 --> 00:03:25.760
tool you would buy.
