Benchmarking Container Scaling on AWS
This blog post doesn&#x27;t account for an extremely important detail.<p>Right off the bat it mentions &quot;Fargate is now faster than EC2&quot; but this is not the case for practical usage on pre-sized clusters, at least not on EKS.<p>As of today you can&#x27;t avoid a ~30 second hard delay on starting a container on EKS Fargate. It&#x27;s the time it takes for Amazon to understand you want to run a workload and provide the Fargate driven compute resources into your cluster so it&#x27;s available to run your workload.<p>Then on top of that, you will wait however long it takes to download your image from a registry because images aren&#x27;t cached anywhere.<p>In practice this usually means 40-60 seconds to just start a container on EKS Fargate, and if you happen to perform jobs before your main app runs such as a database migration it means you&#x27;re paying this penalty twice (even if your migration is a no-op since it spawns a pod to run the command), so it&#x27;s really a ~90-120 second delay to start a container every single time you deploy your application, which you need to wait for each replica too.<p>Compare that to having an EC2 based cluster where you have the resources provisioned ahead of time. Starting your containers will happen as fast as your process will start, there&#x27;s 0 seconds waiting for the compute resources to be available and since it&#x27;s just an EC2 node images are saved on disk so you only need to download the diff (often very small for app code changes).<p>In practice the difference in night and day, I&#x27;m so happy we moved away from Fargate to managed EC2 nodes on EKS. Things are SO much faster, everything from being able to develop and test things on EKS to every single release of all of our services.