In this tutorial, you will deploy a monolithic node.js application to a Docker container, then decouple the application into microservices without any downtime. The node.js application hosts a simple message board with threads and messages between users.

Traditional monolithic architectures are hard to scale. As an application's code base grows, it becomes complex to update and maintain. Introducing new features, languages, frameworks, and technologies becomes very hard, limiting innovation and new ideas.

Within a microservices architecture, each application component runs as its own service and communicates with other services via a well-defined API. Microservices are built around business capabilities, and each service performs a single function. Microservices can be written using different frameworks and programming languages, and you can deploy them independently, as a single service, or as a group of services.

During this tutorial, we will show you how to run a simple monolithic application in a Docker container, deploy the same application as microservices, then switch traffic to the microservices without any downtime. After you are done, you can use this tutorial and the code in it as a template to build and deploy your own containerized microservices on AWS.

application architecture
Monolithic Architecture

Monolithic Architecture

The entire node.js application is run in a container as a single service and each container has the same features as all other containers. If one application feature experiences a spike in demand, the entire architecture must be scaled.

Microservices Architecture

Microservices Architecture

Each feature of the node.js application runs as a separate service within its own container. The services can scale and be updated independently of the others.

AWS Experience: Intermediate

Time to Complete: 2 hours

Cost to Complete: Each service used in this architecture is eligible for the AWS Free Tier. If you are outside the usage limits of the Free Tier, completing this tutorial will cost you less than $0.25*.

Technologies Used: To complete this tutorial, you will use:

*This estimate assumes you follow the recommended configurations throughout the tutorial and terminate all resources within 24 hours.

**Accounts that have been created within the last 24 hours might not have access to all of the resources required to complete this project yet.