Demystifying AWS ECS: Unraveling the Power of Amazon's Elastic Container Service

ECS(Elastic Container Service)          ECS is one of the container services used in the aws, which is also called a container orchestration...



ECS(Elastic Container Service)

        ECS is one of the container services used in the aws, which is also called a container orchestration service. It is easy to run, stop, and manage Docker containers on a cluster. Ecs was highly scalable and faster. It can Host a cluster on a serverless infrastructure managed by ECS. It launches services or tasks by using the fargate launch type.

We have Two Types of ECS launch types.

ECS launch types:

Fargate Launch Type

EC2 Launch Type

 

Fargate Launch Type: AWS Fargate is a technology that you can use with Amazon ECS to run containers without having to manage servers or clusters of Amazon EC2 instances

 it allows to the running of a containerized application without provision and manage backend infrastructure, just register a task definition it will launch the container.

Ec2 launch type: EC2 launch type allows you to run your containerized applications on a cluster of Amazon EC2 instances that you manage.

              Amazon ECS is a regional service that simplifies running application containers in a highly available manner across multiple Availability Zones within a Region. 

  You can create Amazon ECS clusters within a new or existing VPC. 

After a cluster is up and running, you can define task definitions and services that specify which Docker container images to run across your clusters. 

Container images are stored in and pulled from container registries, which may exist within or outside of your AWS infrastructure.

Container and images:

A Docker container is a standardized unit of software development, containing everything that your software application needs to run: code, runtime, system tools, system libraries, etc. Containers are created from a read-only template called an image.

Images are typically built from a Docker file, a plain text file that specifies all of the components that are included in the container. These images are then stored in a registry from which they can be downloaded and run on your cluster.


Task definition:

To run your prepared application in ECS to create a task definition. It is a text file in JSON format, that describes one or more containers, up to a maximum of ten, that form your application.

Tasks and Scheduling:

Creating a task definition for the application within the ECS can specify no of the tasks that will run on your cluster. 

Each task uses the fargate launch type is own isolated boundary. It cannot shares the underlying kernel, CPU resources, memory resources, or elastic network interface with another task.

Scheduler placing the tasks within the cluster 

Types of scheduling

Service scheduler:

     It is suitable for long-running tasks and applications

     It has a strategy to reschedule tasks once the already scheduled task failed

Two service scheduler:

Replica:---> it maintains the desired number of tasks across the cluster. The default task scheduler spread tasks across the availability zone.

Daemon:--> it deploys one task for each active container instance that meets the task placement constraints specified in your cluster. there is no need to specify a desired number of tasks, a task placement strategy, or use Service Auto Scaling policies

Manually Running Tasks--> The Run Task action is ideally suited for processes such as batch jobs that perform work and then stop

Running Tasks on Schedule(LIKE CRON)--> If the tasks are set to run in a particular interval in the cluster. Tasks like backup, and log scan. 

Create a log watch event rule to run one or more tasks in the cluster at a specific time like a cron job.

Custom Schedulers-->  ECS allows the third party scheduler. we can create our own scheduler.

  Custom schedulers are only compatible with tasks using the EC2 launch type. If you are using the Fargate launch type for your tasks, the Start Task API does not work.



Cluster:

When you run tasks using Amazon ECS, you place them on a cluster, which is a logical grouping of resources. When using the Fargate launch type with tasks within your cluster, Amazon ECS manages your cluster resources. 

When using the EC2 launch type, then your clusters are a group of container instances you manage. 

An Amazon ECS container instance is an Amazon EC2 instance that is running the Amazon ECS container agent.

 Amazon ECS downloads your container images from a registry that you specify and runs those images within your cluster.

Container agent:

It allows the container instances to connect with the cluster. 

             It has already been included in the ECS-optimized Ami’s but can also install ec2 instance, ec2 only supports container agents.



 The architecture of an Amazon ECS environment run on AWS Fargate:


The above diagram was the overall architecture of AWS Ecs on the Fargate type.

In the next blog, we are going to create a sample web application using ecs.  


---------------------------------------!!!! Happy Learning with Techiev !!!!!!!!---------------------------------

------------------------Subscribe our Youtube Channel by clicking the below link--------------------- ----------------------------!!https://www.youtube.com/@techieview729!!---------------------
Name

AWS,19,CNCF,9,Devops,38,linux,11,
ltr
item
Techie View: Demystifying AWS ECS: Unraveling the Power of Amazon's Elastic Container Service
Demystifying AWS ECS: Unraveling the Power of Amazon's Elastic Container Service
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHSYMjTFHnaMS42inKEC4WztsU28xh72MvELl4A3zME13-x4jjJAlrVO_bBXGCiphu2NpKXgw9PCaFSFk-ZsjpQwMKLcbKgmFoCGGvQIbW0WLLTcoOy6KLcjGo_edgbPK2YtA4XiZE-IS7/s320/ecs.png
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHSYMjTFHnaMS42inKEC4WztsU28xh72MvELl4A3zME13-x4jjJAlrVO_bBXGCiphu2NpKXgw9PCaFSFk-ZsjpQwMKLcbKgmFoCGGvQIbW0WLLTcoOy6KLcjGo_edgbPK2YtA4XiZE-IS7/s72-c/ecs.png
Techie View
https://www.techiev.com/2021/01/what-is-aws-ecs-elastic-container.html
https://www.techiev.com/
https://www.techiev.com/
https://www.techiev.com/2021/01/what-is-aws-ecs-elastic-container.html
true
7013663511659419322
UTF-8
Loaded All Posts Not found any posts VIEW ALL View Full Article Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy