WEBVTT

1
00:00:00.000 --> 00:00:01.260
In this lesson,

2
00:00:01.260 --> 00:00:04.080
we will learn about serverless computing.

3
00:00:04.080 --> 00:00:07.680
Serverless computing is running application code

4
00:00:07.680 --> 00:00:10.980
without managing the underlying infrastructure.

5
00:00:10.980 --> 00:00:12.630
In serverless computing,

6
00:00:12.630 --> 00:00:15.540
the cloud provider rather than the client

7
00:00:15.540 --> 00:00:18.360
handles the execution environment.

8
00:00:18.360 --> 00:00:22.020
Serverless computing concepts include workloads,

9
00:00:22.020 --> 00:00:24.630
functions, and resources.

10
00:00:24.630 --> 00:00:27.090
Workloads in serverless computing

11
00:00:27.090 --> 00:00:29.310
refer to the specific tasks

12
00:00:29.310 --> 00:00:33.390
or operations that the serverless functions execute.

13
00:00:33.390 --> 00:00:36.750
Functions are the individual units of work

14
00:00:36.750 --> 00:00:39.060
in a serverless architecture,

15
00:00:39.060 --> 00:00:42.930
where each function performs a specific task.

16
00:00:42.930 --> 00:00:45.900
And resources in serverless computing

17
00:00:45.900 --> 00:00:49.020
include the underlying compute, storage,

18
00:00:49.020 --> 00:00:50.910
and networking components

19
00:00:50.910 --> 00:00:53.310
that the cloud provider manages.

20
00:00:53.310 --> 00:00:55.380
Let's learn more about workloads,

21
00:00:55.380 --> 00:00:57.840
functions, and resources.

22
00:00:57.840 --> 00:01:00.000
First, we have workloads.

23
00:01:00.000 --> 00:01:02.880
Workloads refer to the specific tasks

24
00:01:02.880 --> 00:01:06.840
or operations that the serverless functions perform.

25
00:01:06.840 --> 00:01:08.460
In serverless computing,

26
00:01:08.460 --> 00:01:11.580
workloads are executed automatically

27
00:01:11.580 --> 00:01:14.100
in response to specific triggers

28
00:01:14.100 --> 00:01:16.620
like an HTTP request

29
00:01:16.620 --> 00:01:18.600
or a database update.

30
00:01:18.600 --> 00:01:22.500
For instance, imagine you have a serverless function

31
00:01:22.500 --> 00:01:24.810
that processes online orders

32
00:01:24.810 --> 00:01:26.700
for an e-commerce site.

33
00:01:26.700 --> 00:01:29.160
When a customer submits an order,

34
00:01:29.160 --> 00:01:31.350
the workload triggers the function

35
00:01:31.350 --> 00:01:33.540
to validate payment information,

36
00:01:33.540 --> 00:01:34.920
update inventory,

37
00:01:34.920 --> 00:01:37.560
and send a confirmation email.

38
00:01:37.560 --> 00:01:39.300
Since serverless workloads

39
00:01:39.300 --> 00:01:41.730
are executed only when needed,

40
00:01:41.730 --> 00:01:43.800
this approach is highly efficient

41
00:01:43.800 --> 00:01:46.050
because it eliminates idle time,

42
00:01:46.050 --> 00:01:48.750
and you only pay for the processing time

43
00:01:48.750 --> 00:01:51.450
required to complete each task.

44
00:01:51.450 --> 00:01:53.070
Another key advantage

45
00:01:53.070 --> 00:01:56.250
of serverless workloads is scalability.

46
00:01:56.250 --> 00:01:58.770
Unlike traditional computing models

47
00:01:58.770 --> 00:02:01.500
where you would need to provision extra servers

48
00:02:01.500 --> 00:02:03.450
to handle increased demand,

49
00:02:03.450 --> 00:02:06.750
serverless computing automatically scales

50
00:02:06.750 --> 00:02:08.910
to handle large workloads.

51
00:02:08.910 --> 00:02:11.730
For example, during a holiday sale,

52
00:02:11.730 --> 00:02:14.130
an e-commerce site might experience

53
00:02:14.130 --> 00:02:16.230
a large surge in traffic

54
00:02:16.230 --> 00:02:17.880
and order processing.

55
00:02:17.880 --> 00:02:19.560
With serverless workloads,

56
00:02:19.560 --> 00:02:22.110
the cloud provider will automatically

57
00:02:22.110 --> 00:02:24.510
allocate the resources needed

58
00:02:24.510 --> 00:02:26.670
to handle the increased activity,

59
00:02:26.670 --> 00:02:31.110
ensuring that the system doesn't crash due to overload.

60
00:02:31.110 --> 00:02:33.240
Once the traffic decreases,

61
00:02:33.240 --> 00:02:35.580
the system scales back down,

62
00:02:35.580 --> 00:02:36.990
keeping costs low

63
00:02:36.990 --> 00:02:40.290
since you aren't paying for idle resources.

64
00:02:40.290 --> 00:02:43.500
Finally, workloads in serverless computing

65
00:02:43.500 --> 00:02:47.430
also benefit from automation and reliability.

66
00:02:47.430 --> 00:02:49.500
The cloud provider ensures

67
00:02:49.500 --> 00:02:51.900
that your workloads are executed

68
00:02:51.900 --> 00:02:54.720
in a secure and stable environment.

69
00:02:54.720 --> 00:02:57.090
This means you don't need to worry

70
00:02:57.090 --> 00:03:00.150
about the health of underlying infrastructure

71
00:03:00.150 --> 00:03:02.430
or performance bottlenecks.

72
00:03:02.430 --> 00:03:05.940
If one instance of a serverless function fails,

73
00:03:05.940 --> 00:03:09.660
the system can automatically reroute the workload

74
00:03:09.660 --> 00:03:11.220
to another instance,

75
00:03:11.220 --> 00:03:14.910
ensuring that operations continue seamlessly

76
00:03:14.910 --> 00:03:16.650
without downtime.

77
00:03:16.650 --> 00:03:18.600
This automated approach

78
00:03:18.600 --> 00:03:21.240
makes serverless workloads ideal

79
00:03:21.240 --> 00:03:23.310
for applications requiring

80
00:03:23.310 --> 00:03:26.400
high reliability and dynamic scaling,

81
00:03:26.400 --> 00:03:29.910
such as real-time data processing.

82
00:03:29.910 --> 00:03:31.980
Second, we have functions.

83
00:03:31.980 --> 00:03:34.530
Functions are the core building blocks

84
00:03:34.530 --> 00:03:36.330
of serverless computing,

85
00:03:36.330 --> 00:03:38.400
where each function performs

86
00:03:38.400 --> 00:03:41.370
a specific task independently.

87
00:03:41.370 --> 00:03:44.820
Unlike traditional virtual private cloud offerings

88
00:03:44.820 --> 00:03:47.280
that require managing applications

89
00:03:47.280 --> 00:03:50.430
across different virtual machine instances,

90
00:03:50.430 --> 00:03:54.690
serverless computing allows developers to focus solely

91
00:03:54.690 --> 00:03:58.020
on building functions and microservices

92
00:03:58.020 --> 00:04:01.800
without worrying about the underlying infrastructure.

93
00:04:01.800 --> 00:04:05.340
Each function in this environment takes an input,

94
00:04:05.340 --> 00:04:06.600
processes it,

95
00:04:06.600 --> 00:04:08.520
and produces an output

96
00:04:08.520 --> 00:04:11.280
designed to do just one thing.

97
00:04:11.280 --> 00:04:14.340
For example, in a weather application,

98
00:04:14.340 --> 00:04:17.370
one function might retrieve temperature data

99
00:04:17.370 --> 00:04:20.880
from an external application programming interface,

100
00:04:20.880 --> 00:04:22.920
while another function formats

101
00:04:22.920 --> 00:04:25.770
and displays that data to the user.

102
00:04:25.770 --> 00:04:27.840
By breaking down applications

103
00:04:27.840 --> 00:04:31.140
into these smaller reusable components,

104
00:04:31.140 --> 00:04:32.940
developers can maintain

105
00:04:32.940 --> 00:04:35.520
better security and flexibility

106
00:04:35.520 --> 00:04:37.260
as each function can be

107
00:04:37.260 --> 00:04:39.600
updated, tested, and deployed

108
00:04:39.600 --> 00:04:42.870
without affecting the other parts of the system.

109
00:04:42.870 --> 00:04:44.490
In serverless computing,

110
00:04:44.490 --> 00:04:47.910
functions are also lightweight and stateless,

111
00:04:47.910 --> 00:04:52.380
meaning they don't retain information between executions.

112
00:04:52.380 --> 00:04:56.310
This characteristic makes serverless functions perfect

113
00:04:56.310 --> 00:04:59.850
for tasks requiring quick, efficient processing,

114
00:04:59.850 --> 00:05:02.220
such as resizing images

115
00:05:02.220 --> 00:05:05.280
or processing data in real time.

116
00:05:05.280 --> 00:05:08.460
For example, in a serverless environment,

117
00:05:08.460 --> 00:05:10.500
when a user uploads an image,

118
00:05:10.500 --> 00:05:14.370
a function could automatically resize the image

119
00:05:14.370 --> 00:05:16.890
to fit multiple screen sizes.

120
00:05:16.890 --> 00:05:18.720
Once the task is done,

121
00:05:18.720 --> 00:05:21.480
the function does not store any data,

122
00:05:21.480 --> 00:05:23.670
which reduces the resource load

123
00:05:23.670 --> 00:05:26.100
and ensures optimal performance.

124
00:05:26.100 --> 00:05:28.050
As demand increases,

125
00:05:28.050 --> 00:05:31.980
serverless computing can automatically scale up

126
00:05:31.980 --> 00:05:34.200
by starting additional containers

127
00:05:34.200 --> 00:05:35.400
to run the code

128
00:05:35.400 --> 00:05:38.070
and support higher traffic volume.

129
00:05:38.070 --> 00:05:41.430
This capability helps companies like Netflix

130
00:05:41.430 --> 00:05:43.590
serve massive user bases

131
00:05:43.590 --> 00:05:46.710
without worrying about managing infrastructure.

132
00:05:46.710 --> 00:05:50.040
Another major benefit of serverless functions

133
00:05:50.040 --> 00:05:51.870
is how they work together

134
00:05:51.870 --> 00:05:54.630
in a microservices architecture.

135
00:05:54.630 --> 00:05:55.740
In this setup,

136
00:05:55.740 --> 00:05:57.630
each function is designed

137
00:05:57.630 --> 00:05:59.880
to perform a single task,

138
00:05:59.880 --> 00:06:02.400
and multiple functions interact

139
00:06:02.400 --> 00:06:05.190
to create a complete application.

140
00:06:05.190 --> 00:06:08.310
For instance, a travel booking application

141
00:06:08.310 --> 00:06:11.490
might have one function to search for flights,

142
00:06:11.490 --> 00:06:13.710
another to calculate prices,

143
00:06:13.710 --> 00:06:17.070
and still another to handle payment processing.

144
00:06:17.070 --> 00:06:20.850
This separation of tasks allows each function

145
00:06:20.850 --> 00:06:23.940
to scale independently based on demand,

146
00:06:23.940 --> 00:06:25.560
and ensures that updates

147
00:06:25.560 --> 00:06:27.570
or changes to one function

148
00:06:27.570 --> 00:06:29.310
do not affect others.

149
00:06:29.310 --> 00:06:32.700
Finally, with the use of Function as a Service

150
00:06:32.700 --> 00:06:36.450
or FaaS models like AWS Lambda,

151
00:06:36.450 --> 00:06:38.040
Google Cloud Functions,

152
00:06:38.040 --> 00:06:40.680
or Microsoft Azure Functions,

153
00:06:40.680 --> 00:06:42.690
businesses can further automate

154
00:06:42.690 --> 00:06:45.000
and streamline their operations,

155
00:06:45.000 --> 00:06:48.420
enabling them to deploy applications faster,

156
00:06:48.420 --> 00:06:49.710
more securely,

157
00:06:49.710 --> 00:06:52.440
and with minimal operational overhead.

158
00:06:52.440 --> 00:06:55.650
Third and last, we have resources.

159
00:06:55.650 --> 00:06:59.040
Resources refer to the compute, storage,

160
00:06:59.040 --> 00:07:01.230
and networking infrastructure

161
00:07:01.230 --> 00:07:03.570
managed by the cloud provider

162
00:07:03.570 --> 00:07:07.140
that enables your serverless functions to run.

163
00:07:07.140 --> 00:07:08.820
In serverless computing,

164
00:07:08.820 --> 00:07:12.120
you don't need to manage these resources directly.

165
00:07:12.120 --> 00:07:14.100
The cloud provider handles

166
00:07:14.100 --> 00:07:16.080
everything behind the scenes

167
00:07:16.080 --> 00:07:18.510
from allocating processing power

168
00:07:18.510 --> 00:07:20.790
to ensuring that data is stored

169
00:07:20.790 --> 00:07:22.740
and transmitted securely.

170
00:07:22.740 --> 00:07:24.990
For example, when you deploy

171
00:07:24.990 --> 00:07:28.308
a serverless function to AWS Lambda,

172
00:07:28.308 --> 00:07:31.710
AWS takes care of the servers, storage,

173
00:07:31.710 --> 00:07:33.660
and network configurations

174
00:07:33.660 --> 00:07:35.550
needed to run the function

175
00:07:35.550 --> 00:07:38.670
without requiring any input from you.

176
00:07:38.670 --> 00:07:41.460
So serverless computing doesn't mean

177
00:07:41.460 --> 00:07:42.990
there is no server,

178
00:07:42.990 --> 00:07:43.950
there is.

179
00:07:43.950 --> 00:07:46.770
It's just not a server that you are managing.

180
00:07:46.770 --> 00:07:48.570
So, from your perspective,

181
00:07:48.570 --> 00:07:50.160
it doesn't exist.

182
00:07:50.160 --> 00:07:54.360
The way resources are allocated in serverless computing

183
00:07:54.360 --> 00:07:56.610
is dynamic and efficient.

184
00:07:56.610 --> 00:07:58.440
Since serverless functions

185
00:07:58.440 --> 00:08:00.930
are only executed when triggered,

186
00:08:00.930 --> 00:08:04.980
the cloud provider only allocates resources when needed

187
00:08:04.980 --> 00:08:08.190
and releases them once a function completes.

188
00:08:08.190 --> 00:08:10.320
This is particularly useful

189
00:08:10.320 --> 00:08:13.260
for applications with fluctuating demand.

190
00:08:13.260 --> 00:08:16.800
For example, a news website might experience

191
00:08:16.800 --> 00:08:20.070
spikes in traffic during major events.

192
00:08:20.070 --> 00:08:21.960
In a serverless environment,

193
00:08:21.960 --> 00:08:25.710
the cloud provider allocates additional resources

194
00:08:25.710 --> 00:08:27.510
as traffic increases

195
00:08:27.510 --> 00:08:31.380
and scales them back down when demand drops.

196
00:08:31.380 --> 00:08:35.040
This allows the website to maintain performance

197
00:08:35.040 --> 00:08:37.800
without overprovisioning resources,

198
00:08:37.800 --> 00:08:39.510
saving costs.

199
00:08:39.510 --> 00:08:43.350
Finally, resource management in serverless computing

200
00:08:43.350 --> 00:08:47.310
ensures high availability and fault tolerance.

201
00:08:47.310 --> 00:08:48.840
The cloud provider

202
00:08:48.840 --> 00:08:51.540
replicates your serverless functions

203
00:08:51.540 --> 00:08:53.670
across multiple data centers,

204
00:08:53.670 --> 00:08:57.810
ensuring that if data center experiences an issue,

205
00:08:57.810 --> 00:09:00.300
another can take over seamlessly.

206
00:09:00.300 --> 00:09:04.470
This guarantees that your application remains available

207
00:09:04.470 --> 00:09:07.170
even during unexpected outages

208
00:09:07.170 --> 00:09:09.090
or hardware failures.

209
00:09:09.090 --> 00:09:13.170
Additionally, the provider implements security controls

210
00:09:13.170 --> 00:09:15.810
like encryption and access controls

211
00:09:15.810 --> 00:09:18.870
to protect your data and resources,

212
00:09:18.870 --> 00:09:23.310
ensuring that your serverless environment remains secure.

213
00:09:23.310 --> 00:09:25.140
So remember,

214
00:09:25.140 --> 00:09:28.890
serverless computing allows applications to run

215
00:09:28.890 --> 00:09:31.170
without the need for managing

216
00:09:31.170 --> 00:09:34.440
the underlying infrastructure like servers.

217
00:09:34.440 --> 00:09:35.640
In this model,

218
00:09:35.640 --> 00:09:39.330
the cloud provider handles the execution environment,

219
00:09:39.330 --> 00:09:41.460
taking care of all resources

220
00:09:41.460 --> 00:09:44.640
like compute, storage, and networking.

221
00:09:44.640 --> 00:09:45.473
Next.

222
00:09:45.473 --> 00:09:47.760
Workloads in serverless computing

223
00:09:47.760 --> 00:09:51.420
refer to the specific tasks or operations

224
00:09:51.420 --> 00:09:54.450
that are automatically triggered and executed

225
00:09:54.450 --> 00:09:57.150
only using resources when needed.

226
00:09:57.150 --> 00:10:00.870
Next, functions are the individual units of work

227
00:10:00.870 --> 00:10:03.000
that handle specific tasks

228
00:10:03.000 --> 00:10:05.430
within a serverless architecture,

229
00:10:05.430 --> 00:10:09.120
providing flexibility and scalability.

230
00:10:09.120 --> 00:10:12.330
Finally, resources managed entirely

231
00:10:12.330 --> 00:10:14.340
by the cloud provider ensure

232
00:10:14.340 --> 00:10:16.200
that serverless applications

233
00:10:16.200 --> 00:10:18.600
run efficiently and securely

234
00:10:18.600 --> 00:10:22.593
without the need for direct infrastructure management.

