How is Docker used with microservices

In this tutorial, you will deploy a monolithic Node.js application for a Docker container and then break the application down into microservices without any interruptions. The Node.js application hosts a simple internet forum where users can create threads and exchange messages with one another.

Traditional monolithic architectures are difficult to scale. As an application's code base grows, over time it becomes more and more difficult to update and maintain that code base. This not only makes the introduction of new functions, languages, frameworks and technologies difficult, but also limits innovation and the implementation of new ideas.

Within a microservices architecture, each application component is executed as its own service and communicates with other services via a clearly defined API. Microservices are developed based on the capabilities of a company. Each service performs a specific function. Microservices can be written using various frameworks and programming languages. They can be delivered independently, as a single service, or as a group of services.

In this tutorial, we will show you how to run a simple monolithic application in a Docker container, deploy the same application as microservices, and route traffic to the microservices without interruptions. When you're done, you can use this tutorial and the code in it as a template to develop and deploy your own containerized microservices on AWS.

Monolithic architecture

The entire Node.js application runs as a single service in a container. All containers have the same functions. When an application spikes, the entire architecture must scale.

Microservices architecture

Each function of the Node.js application is executed as a separate service within its own container. The services can be scaled and updated independently of one another.

Experience with AWS: Advanced

Needed time: 2 hours

Costs: Every service in this architecture is included in the AWS Free Tier. If you are not within the free tier usage limits, you will be billed less than $ 0.25 * to complete this tutorial.

Technologies used: To complete this tutorial, you will need the following:

*This estimate is based on the assumption that you will accept the recommended configurations throughout the tutorial and complete all resources within 24 hours.

** Accounts created within the last 24 hours may not have all of the resources available to complete this project.