Hands-on Microservices With Docker on AWS (Part 3)

Part 1, Part 2, Part 3, Part 4

Introduction

Previously, we talked about how to deploy our container using ECR/ECS and Fargate. We are able to see the log in task. This time we will learn to scale the application with an ALB. In this lab, we will clearly demonstrate a service is comprised of multiple tasks and will keep them up and running.

Solution Diagram

An ECS Service will maintain a desired task count and integrate with the ALB. Previously, we already created ECS and ALB using CloudFormation. We will update those resources to host the containerized service.

Scale an Application With an ALB

In ECS page, select Clusters=>Cluster-mysfits-fargate and click the service shown as bottom.

Then we simply click Update.

We update the latest revision used in previous. You may be slightly different from me, just choose the latest.

Click Skip to review.

Then Update Service.

When we see success message, click View Service.

Go to Tasks, wait for our latest revision deployment changing from pending to running.

Now go to S3, choose the bucket created by CloudFormation. Then select Properties.

Scroll down and click this link.

We are able to see our application now.

Leave a Reply