1
00:00:02,130 --> 00:00:04,780
So at this point we got our

2
00:00:04,780 --> 00:00:07,500
running service with this one task

3
00:00:07,500 --> 00:00:09,890
where we then have these two containers.

4
00:00:09,890 --> 00:00:12,663
Our node back in the API and MongoDB.

5
00:00:14,420 --> 00:00:17,330
We also added a volume to MongoDB

6
00:00:17,330 --> 00:00:19,810
to process data and therefore this is

7
00:00:19,810 --> 00:00:22,750
our current application architecture.

8
00:00:22,750 --> 00:00:25,310
We are using AWS ECS

9
00:00:25,310 --> 00:00:27,190
the elastic container service

10
00:00:27,190 --> 00:00:30,620
this manage service for containers by AWS

11
00:00:30,620 --> 00:00:33,410
and there we have one task with our two containers

12
00:00:33,410 --> 00:00:37,040
inside of it, one container for the NodeJS REST API

13
00:00:37,040 --> 00:00:40,190
and one for the MongoDB database.

14
00:00:40,190 --> 00:00:44,130
Now to processed data which is written to the database

15
00:00:44,130 --> 00:00:48,130
across task and container restarts and removals

16
00:00:48,130 --> 00:00:51,310
we are using a volume which is implemented with

17
00:00:51,310 --> 00:00:52,830
help of AWS EFS

18
00:00:53,910 --> 00:00:56,760
which stands for elastic file system

19
00:00:56,760 --> 00:00:59,627
and is a storage service offered by AWS.

20
00:01:00,960 --> 00:01:04,590
This ensures that data is written to a hard drive

21
00:01:04,590 --> 00:01:07,890
which is not erased when a container is removed

22
00:01:07,890 --> 00:01:09,490
and restarted.

23
00:01:09,490 --> 00:01:13,400
Now at the moment when someone wants to use our application

24
00:01:13,400 --> 00:01:15,960
that means that someone wants to interact with

25
00:01:15,960 --> 00:01:20,090
our NodeJS REST API because that is the rep application

26
00:01:20,090 --> 00:01:22,920
we are exposing to the public at the moment.

27
00:01:22,920 --> 00:01:25,910
We're doing this with the help of a load balancer

28
00:01:25,910 --> 00:01:29,680
to have a unique URL which does not change

29
00:01:29,680 --> 00:01:33,195
even if tasks restart and this load balancer

30
00:01:33,195 --> 00:01:35,930
then forwards the incoming request

31
00:01:35,930 --> 00:01:38,270
to the NodeJS REST API

32
00:01:38,270 --> 00:01:41,780
which then in turn typically reaches out to MongoDB

33
00:01:41,780 --> 00:01:44,860
to store data there or fetch data from there

34
00:01:44,860 --> 00:01:48,010
and then return a response back to the user.

35
00:01:48,010 --> 00:01:50,170
This is our current architecture

36
00:01:50,170 --> 00:01:53,023
and this is what's currently up and running.

