1
00:00:00,330 --> 00:00:02,040
Microservices.

2
00:00:02,040 --> 00:00:05,310
Microservices, also known as the Microservice Architecture

3
00:00:05,310 --> 00:00:08,520
is an architectural style that structures an application

4
00:00:08,520 --> 00:00:11,730
as a collection of small autonomous services.

5
00:00:11,730 --> 00:00:13,770
Model around a business domain,

6
00:00:13,770 --> 00:00:16,230
this approach has gained significant popularity

7
00:00:16,230 --> 00:00:19,710
in recent years due to its scalability and flexibility.

8
00:00:19,710 --> 00:00:22,500
However, like any other architectural design

9
00:00:22,500 --> 00:00:26,070
it comes with its own set of benefits and challenges.

10
00:00:26,070 --> 00:00:28,830
So what exactly are microservices?

11
00:00:28,830 --> 00:00:31,680
Microservices are a type of software architecture

12
00:00:31,680 --> 00:00:34,770
where large applications are broken down into smaller,

13
00:00:34,770 --> 00:00:36,600
independent services.

14
00:00:36,600 --> 00:00:39,720
Each of these services runs a unique process

15
00:00:39,720 --> 00:00:42,150
and communicates through a well-defined

16
00:00:42,150 --> 00:00:45,750
lightweight mechanism to serve a business goal.

17
00:00:45,750 --> 00:00:47,220
Microservices are a departure

18
00:00:47,220 --> 00:00:49,890
from traditional monolithic architecture

19
00:00:49,890 --> 00:00:53,160
where all components of an applications are interconnected

20
00:00:53,160 --> 00:00:54,900
and interdependent.

21
00:00:54,900 --> 00:00:56,730
In a microservice architecture

22
00:00:56,730 --> 00:00:58,710
each service is self-contained

23
00:00:58,710 --> 00:01:01,860
and should be able to run independently of others.

24
00:01:01,860 --> 00:01:04,050
One of the most notable real world examples

25
00:01:04,050 --> 00:01:06,450
of microservices in action is Netflix.

26
00:01:06,450 --> 00:01:09,840
The global streaming giant serves over 200 million users

27
00:01:09,840 --> 00:01:13,500
across 190 countries, streaming more than a billion hours

28
00:01:13,500 --> 00:01:15,240
of content each week.

29
00:01:15,240 --> 00:01:17,910
To handle its massive scale and complexity,

30
00:01:17,910 --> 00:01:20,970
Netflix uses a microservices architecture.

31
00:01:20,970 --> 00:01:22,260
In the early 2000s,

32
00:01:22,260 --> 00:01:25,020
Netflix started as a monolithic application.

33
00:01:25,020 --> 00:01:26,970
However, as the company grew

34
00:01:26,970 --> 00:01:28,770
and started streaming video content,

35
00:01:28,770 --> 00:01:30,930
it faced scalability issues.

36
00:01:30,930 --> 00:01:33,240
The monolithic architecture couldn't handle

37
00:01:33,240 --> 00:01:35,430
the increasing load, and the entire system

38
00:01:35,430 --> 00:01:36,450
would often go down.

39
00:01:36,450 --> 00:01:38,220
To solve these problems,

40
00:01:38,220 --> 00:01:41,190
Netflix began breaking its monolithic application

41
00:01:41,190 --> 00:01:45,210
into smaller, more manageable pieces or microservices.

42
00:01:45,210 --> 00:01:47,040
Each microservice was designed

43
00:01:47,040 --> 00:01:49,110
to perform a specific function.

44
00:01:49,110 --> 00:01:52,350
For instance, one microservice handles recommendations,

45
00:01:52,350 --> 00:01:54,420
another handles customer signups,

46
00:01:54,420 --> 00:01:58,110
another manages video encoding and so on.

47
00:01:58,110 --> 00:02:00,420
Microservices offer several advantages

48
00:02:00,420 --> 00:02:03,240
over traditional monolithic architectures.

49
00:02:03,240 --> 00:02:06,960
These include scalability, flexibility, resilience,

50
00:02:06,960 --> 00:02:09,419
and faster deployments and updates.

51
00:02:09,419 --> 00:02:11,910
Scalability, since each service is separate

52
00:02:11,910 --> 00:02:14,940
they can be scaled independently based on demand.

53
00:02:14,940 --> 00:02:18,090
This is particularly beneficial for large applications

54
00:02:18,090 --> 00:02:20,550
where certain modules may have more traffic

55
00:02:20,550 --> 00:02:22,830
or require more resources.

56
00:02:22,830 --> 00:02:26,040
Flexibility, microservices can also be written

57
00:02:26,040 --> 00:02:27,840
in different programming languages

58
00:02:27,840 --> 00:02:30,210
using different data storage technologies,

59
00:02:30,210 --> 00:02:32,190
and can be managed by different teams.

60
00:02:32,190 --> 00:02:34,530
This allows for the use of the best technologies

61
00:02:34,530 --> 00:02:35,970
for each service.

62
00:02:35,970 --> 00:02:38,520
Resilience, if one service fails,

63
00:02:38,520 --> 00:02:40,530
it does not affect the entire system.

64
00:02:40,530 --> 00:02:44,970
The isolation reduces the risk for system-wide failures

65
00:02:44,970 --> 00:02:47,940
and finally, faster deployment and updates.

66
00:02:47,940 --> 00:02:51,240
Microservices can be deployed and updated independently.

67
00:02:51,240 --> 00:02:54,060
This allows for a faster and more frequent update

68
00:02:54,060 --> 00:02:57,810
and reduces the risk associated with deployment.

69
00:02:57,810 --> 00:03:00,900
Despite the numerous benefits, implementing microservices

70
00:03:00,900 --> 00:03:02,880
is not without its challenges.

71
00:03:02,880 --> 00:03:05,220
Some of these challenges are complexity,

72
00:03:05,220 --> 00:03:09,150
data management, network latency, and security.

73
00:03:09,150 --> 00:03:12,960
For complexity, managing multiple services can be complex.

74
00:03:12,960 --> 00:03:15,450
This includes handling interservice communication,

75
00:03:15,450 --> 00:03:19,530
data consistency, and distributed system testing.

76
00:03:19,530 --> 00:03:21,000
Second, data management.

77
00:03:21,000 --> 00:03:23,460
Each microservice can have its own database

78
00:03:23,460 --> 00:03:25,020
which can lead into difficulties

79
00:03:25,020 --> 00:03:28,380
in maintaining data consistency across some services.

80
00:03:28,380 --> 00:03:31,110
Third is network latency.

81
00:03:31,110 --> 00:03:32,220
Increased inter-service

82
00:03:32,220 --> 00:03:34,350
communication can lead to network latency

83
00:03:34,350 --> 00:03:36,090
and slower response times.

84
00:03:36,090 --> 00:03:37,890
Fourth, security.

85
00:03:37,890 --> 00:03:40,560
With many services communicating over a network

86
00:03:40,560 --> 00:03:42,360
there's an increased surface area

87
00:03:42,360 --> 00:03:44,730
for attacks that we have to deal with.

88
00:03:44,730 --> 00:03:48,180
So remember, while microservices offer many benefits

89
00:03:48,180 --> 00:03:50,640
they also introduce new complexities.

90
00:03:50,640 --> 00:03:54,300
Therefore, they are also not a one size fits all solution.

91
00:03:54,300 --> 00:03:56,640
It's important to consider the specific needs

92
00:03:56,640 --> 00:03:58,770
and capabilities of your organization

93
00:03:58,770 --> 00:04:02,100
before deciding to adopt this architectural styles.

94
00:04:02,100 --> 00:04:04,080
When implemented correctly, however

95
00:04:04,080 --> 00:04:06,180
microservices can provide significant benefits

96
00:04:06,180 --> 00:04:10,203
in terms of scalability, flexibility, and resilience.

