16

Is it possible to scale an ACI running container?

Problem:

We have some old-school Cloud Services (.NET Framework v4.7.1) we're migrating to Docker containers, we've successfully got them running and responding in Azure Container Instances now, but need the ability to be able to scale them for load and resilience.

This is part of a larger project where we're also running our newer solution inside k8s - all .NET Core 2 microservices.

The goal will eventually be to bring them into the main k8s solutions when we have the ability to run Windows and Linux nodes against the same master, allowing us to run both projects in the same cluster.

huysmania
  • 1,054
  • 5
  • 11
Kieron
  • 26,748
  • 16
  • 78
  • 122
  • ACI is standalone service, you choose scale when you create service. If you use ACI connector for AKS then you will be able to scale from within Kubernetes itself. Windows containers are in beta currently and scheduled to go GA somewhere in second half of 2018 – Gregory Suvalian May 14 '18 at 16:13
  • Thanks @GregorySuvalian, where about is that configuration for the scale? – Kieron May 14 '18 at 16:53
  • There is only 2 choices currently for Windows containers which you can find here https://learn.microsoft.com/en-us/azure/container-instances/container-instances-quotas and have to be allocated during instantiation time – Gregory Suvalian May 14 '18 at 20:45

2 Answers2

14

It is not possible to scale a specific ACI instance. If you wanted more CPU/Memory you would need to redeploy that container.

You can Horizontally scale ACI, i.e. add more containers, however, ACI does not support load balancers, so you would need to manage the collection of IP addresses you would be provided with. Of course, you could deploy a frontend container to spread the load.

As mentioned in comments, you can connect AKS to ACI, and use Kubernetes to handle orchestration and scale. Unfortunately, I don't believe Windows is supported under AKS currently (though that should be arriving very soon I imagine)

Depending on your use case, you may be better deploying to a standalone cluster while AKS / ACI catch up with what you need.

Michael B
  • 11,887
  • 6
  • 38
  • 74
  • 3
    indeed ACI seems to me a half-baked solution from MS just to let people hop on docker wave. It's pretty much a way to do a "docker run" in azure. Good for small setups but definitely not right to scale. – Kat Lim Ruiz Feb 13 '19 at 20:59
  • 2
    It's half-baked for linux instances too if it makes you feel better – JJCV Dec 03 '19 at 16:02
8

You can use an ARM template to easily deploy multiple Azure container instances. Have a look at the 'copy' function in particular.

Then you can use Azure DNS traffic manager to load balance between the various containers.

Brendan Burns
  • 724
  • 3
  • 3
  • have you compared this approach to azure kubernetes service [aks] virtual kubelet support for azure container instances [aci] and found it a simpler and more economical setup to run if you don't need all the fancy monitoring and container instance recovery capabilities of aks? – myusrn Dec 30 '18 at 03:22