I'm Fargate-d
Less servers or serverless !!
In traditional cloud computing models, developers have to manage virtual machines, storage, and networking resources. But in serverless computing, the cloud provider manages and allocates these resources on demand, based on the amount of usage required by the application.
Serverless computing allows developers to create and deploy applications faster because they can focus on the logic and features of their applications rather than the underlying infrastructure.
What is Fargate?
A computation engine called Fargate from Amazon Web Services (AWS) is used to execute containers in a serverless fashion. It is an approach to container deployment that eliminates the need to control the underlying infrastructure. AWS Fargate, to put it simply, is a serverless compute engine that hides the supporting infrastructure required to run containers.
You only need to package your application in containers, select the memory and CPU requirements, define IAM policies, and start your application when using the Fargate launch type.
Fargate Language.
The main components of Fargate are as follows:
Task definition:- An instruction for launching a Docker container is called a task definition. It includes details on the networking settings, CPU and memory requirements, and container image. Multiple containers can be launched using the same task definition that has been stored.
Task:- A task is the instantiation of a "task definition" within a cluster. When a task is launched, Fargate provisions the required CPU and memory resources to run the container. A task can have one or more containers that run in a single instance of the task. All containers within the same task share the same network namespace, which means that they can communicate with each other using the localhost interface.
An ECS service:- is a collection of tasks that are carried out by your task definition. It offers a mechanism to coordinate and scale several tasks, making it simpler to run and update your containers.
Cluster:- A logical collection of tasks or services. you can have several clusters, and each cluster can have several tasks active in it.
Real-World Scenario
Your application requires a custom container image, which you must create and put on a registry. Build your container image and store it in a registry.
Fargate runs on top of ECS or EKS, so you need to create an ECS cluster first, and in the "Infrastructure" configuration, just choose "AWS Fargate".
Create a Task Definition: A task definition describes how your container should be run, including the container image, CPU and memory requirements, networking, and other settings.
Create an ECS Service: An ECS service allows you to run and maintain a specified number of tasks simultaneously. You can choose the specific Task Definition you created and how many tasks to run at once, and they will start and stop according to the amount you choose.
Depending on the requirements and preferences of your application, the particular features and configurations may change.
Conclusion
Finally, Fargate completely transforms how we manage and deploy containers on the cloud. By offering a serverless container running experience, it frees developers from infrastructure management so they can concentrate on creating and expanding their applications. With Fargate, you can quickly deploy and run containers without the hassle of procuring and managing servers, resulting in a deployment process that is more productive and affordable.
Subscribe to my newsletter
Read articles from Mohamed Salah directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Mohamed Salah
Mohamed Salah
$ echo "I will Linux you !"