AWS Fargate - A quick review!
Just a few days ago AWS launched Fargate - a service that runs docker containers serverless, based on individual needs. For us this is great news! We are running a couple of ECS based APIs and we are always having the same problem: How many instances should we reserve and how do we efficiently manage all of them?
Fargate removes this problem by simply taking the docker containers and running them virtually on any machine that works. Maintaining multiple ECS clusters can be quite time consuming. And unfortunately it’s rather a hazzle to have different sizes of EC2 instances running within the same cluster (it’s certainly possible though).
Now, for our specific needs this is also helpful because we are working with a bunch of smaller startups where cost is a big consideration. With the normal EC2 model for ECS it was required to always have an “empty” instances running that served as a free space for new deployments. This is of course assuming that we only need one instance to host the entire application, however in any case you would need to have at least one free instance that would host the new version of a task before it goes live. With Fargate we don’t have to worry about that anymore, AWS will simply deploy a new task independent of EC2 instances - great!
With regards to cost things get a little interesting. Fargate charges by the minute. Okay, for a lot of projects that may be relevant, for the majority of what we do (APIs that is) we care more about daily or monthly costs. A minimally configured task in Fargate costs $13.68 currently. A minimally configured task using EC2 costs $8.352 currently. Therefore AWS Fargate is definetely decently more expensive than plain EC2 instances. However, the szenario in which we see Fargate surpas the old EC2 normal is when it comes to scalability. Once an application is pretty established and you can foresee the usage we can optimize pricing by buying reserved instances. However, if we have cases where we really don’t know the growth, we expect a sudden growth or the usage varies depending on times (like only a couple of days a month), Fargate becomes the more interesting option since we remain flexible and are not bound to reserved instances.
It will be interesting to see how Fargate develops and if AWS will offer some discount pricing as well. Especially for APIs and alike such a service would offer great benefit. We’ll monitor the development closely!
If you hvae any questions or would like us to take a look at your infrastructure just shoot us an email!