Summary: CaaS

A summary of this chapter.

We'll cover the following

Conclusion

To summarize, Azure Container Instances are not, and never will be, production-ready. AWS ECS is fully there, and Google Cloud Run is very close to being production-ready.

Finally, can any of those services be qualified as serverless? To answer that question, let’s define the features we expect from managed serverless computing.

It’s supposed to remove the need to manage infrastructure or at least simplify it greatly. It should provide scalability and high availability, and it should charge us for what our users use while making sure that our apps are running only when needed. We can summarize those as follows:

  • No need to manage infrastructure.
  • Out-of-the-box scalability and high availability.
  • “Pay what your users use” model.

If we take these three points as the base evaluation for whether something is serverless or not, we can easily discard both Azure Container Instances and AWS ECS with Fargate.

Azure

  • Azure Container Instances service doesn’t have out-of-the-box scalability and high-availability.
  • As a matter of fact, it has no scalability of any kind and, therefore, it cannot be highly available.
  • On top of that, we don’t pay what our users use since it cannot scale to zero replicas, so our app is always running, no matter whether someone is consuming it or not.
  • As such, our bill will be based on the amount of preassigned resources (memory and CPU).
  • The only major serverless computing feature that it does provide is hands-off infrastructure.

AWS

  • AWS ECS with Fargate does provide some sort of scalability.
  • It’s not necessarily an out-of-the-box experience, but it’s there.
  • Nevertheless, it fails to abstract infrastructure management, and it suffers from the same problem as ACI when billing is concerned.
  • Since we cannot scale our applications to zero replicas when they aren’t used, we have to pay for resources they’re consuming, independent of our users’ needs.

GCP

  • Google Cloud Run is, by all accounts, a serverless implementation of Containers as a Service.
  • It removes the need to manage infrastructure, and it provides horizontal scaling as an out-of-the-box solution while still allowing us to fine-tune the behavior.
  • It scales to zero when not in use, so it does adhere to the “pay what your users use” model. Google Cloud Run is, without doubt, the best of the three.

Here’s a table that summarizes the findings.

Get hands-on with 1200+ tech skills courses.