So at this point we got our
running service with this one task
where we then have these two containers.
Our node back in the API and MongoDB.
We also added a volume to MongoDB
to process data and therefore this is
our current application architecture.
We are using AWS ECS
the elastic container service
this manage service for containers by AWS
and there we have one task with our two containers
inside of it, one container for the NodeJS REST API
and one for the MongoDB database.
Now to processed data which is written to the database
across task and container restarts and removals
we are using a volume which is implemented with
help of AWS EFS
which stands for elastic file system
and is a storage service offered by AWS.
This ensures that data is written to a hard drive
which is not erased when a container is removed
and restarted.
Now at the moment when someone wants to use our application
that means that someone wants to interact with
our NodeJS REST API because that is the rep application
we are exposing to the public at the moment.
We're doing this with the help of a load balancer
to have a unique URL which does not change
even if tasks restart and this load balancer
then forwards the incoming request
to the NodeJS REST API
which then in turn typically reaches out to MongoDB
to store data there or fetch data from there
and then return a response back to the user.
This is our current architecture
and this is what's currently up and running.