Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News AWS Fargate Significantly Improves Windows Container Launch Times

AWS Fargate Significantly Improves Windows Container Launch Times

AWS has announced improved launch times for Windows containers running on AWS Fargate. Launch times were improved by pre-baking the AMIs, leveraging EC2 fast launch, and eliminating the network proxy. The team has also provided recommendations for users to further enhance their container launch times.

AWS states they "have reduced the infrastructure ready time by up to 42% for Windows Server 2022 Core". They note that Fargate Windows launch times can be divided into three high-level buckets: infrastructure ready time, container image pull time, and task startup time.

Infrastructure ready time encompasses the time needed to provision the underlying compute and progress to pulling the container image. Container image pull time involves containerd pulling and extracting the container image. Finally, task startup time covers the Fargate agent working with containerd to start the task containers with the appropriate configuration.

The AWS team pre-baked more efficient Windows Server AMIs specifically optimized for Fargate. This reduces the set-up required for each individual container thereby reducing potential latency and errors in the deployment process. Mark Nash, senior consultant with Contino, describes an image bakery as:

A codified, automated and repeatable process where you create custom images used for creating VMs, Containers or Disks. They can help speed up the provisioning time for a VM by baking the required configuration of the systems into the VM image rather than configuring it after the instance is built.

The team also enabled EC2 fast launch for Fargate Windows task launches. EC2 fast launch leverages pre-provisioned snapshots to minimize the need for reboots and complicated initialization steps during the Windows OS launch process.

Behind the scenes, EC2 fast launch creates a set of temporary t3 instances based on the provided settings. Snapshots of those instances are taken once they complete the standard launch steps. The original instances are terminated and the snapshots are used as needed to produce the requested instances. AWS has committed that "sufficient Fast Launch snapshots are available at all times for catering to the demand".

The team replaced a side-car-based networking proxy with an improved process that runs Fargate worker processes from within the task network namespace. This removes the need for the network proxy entirely. Finally, Fargate is now starting the instance bootstrap immediately after the Windows Server OS boot process is completed versus waiting for the EC2 Launch Agent to begin the process.

The team has some recommendations to further improve the launch performance of Windows Server tasks running on Fargate. To make full use of the Fargate Windows cache, the containers need to be built on a recent Windows Server base image. New base container images are released by Microsoft on the second Tuesday of each month. The Fargate Windows cache only stores the latest and the previous month's Windows Server core base images.

The team also recommends using Windows Server 2022 Core images as they have a smaller footprint and therefore faster boot times. Part of that footprint reduction is achieved by not providing a GUI or Windows desktop features.

Google Cloud's closest equivalent service to AWS Fargate is Cloud Run. However, at the time of writing, Cloud Run does not support the Windows operating system for its containers. Azure's equivalent service is Azure Container Intances which has support for both Linux and Windows containers.

Windows is only available with AWS Fargate when running on Amazon ECS. There is no Windows support available when running Fargate on Amazone EKS. The improved launch times are available in all regions that AWS Fargate is available in.

About the Author

Rate this Article