2

I keep reading that Azure Container Instances can be "spun up in seconds". However, my tests have shown that even the simplest (smallest) containers are taking around 45 secs to launch. Is this typical? This container launches on my desktop pretty much instantly.

I have an Alpine/Nginx image with a single static file. About 100Mb. It's hosted in the Azure Container Registry in East Coast 2 with Premium SKU. When I create a container based on this (also in East Coast 2) via the portal is takes around 45 secs before it reports that the container is ready.

Is there something I am doing wrong here? Does doing it interactively via the portal add 40 secs or something?

45 secs is technically seconds, but this is a minimal container and it's getting close to a minute, so, not really what I was expecting.

dommer
  • 368
  • 1
  • 5
  • 13
  • Is this a cold boot? As in, the container host may not have all the images and has to pull them from the registry before it can start. – Greg W Sep 01 '18 at 12:14
  • `I keep reading that Azure Container Instances can be "spun up in seconds". However, my tests have shown that even the simplest (smallest) containers are taking around 45 secs to launch` - Not to be "that" guy but 45 seconds is in the window of "Spun up in seconds". Are you trying to acheive a specific launch time? – joeqwerty Sep 01 '18 at 14:50
  • Was looking for less than 10 secs. Comments from MSFT like "With Azure Container Instances, you can create containers in the cloud in seconds" make it sounds like that could be possible. If that really means 45 secs, then fine. Just wondered if I was missing something. – dommer Sep 01 '18 at 15:38
  • It's a cold boot. But, the registry is hosted in the same Azure data center as the location I'm creating the container in (as per MSFT recommendations). – dommer Sep 01 '18 at 15:39

1 Answers1

3

It's all going to come down to your container image size. On your desktop your caching the image, so it runs instantly. ACI, is stateless so it will not cache your image, each time you launch an instance it has to download it from the repo.

Take a look at the size of your image, see if you can reduce it. If you launch an ACI instance with just a minimal alpine container it will be faster.

Sam Cogan
  • 38,158
  • 6
  • 77
  • 113
  • 3
    45 secs to download a 100Mb imagine from a repo in the same data center seems like a lot, though. Maybe this is just a hard limit, but the "blurb" makes it sound like a container can be fired up pretty quickly. – dommer Sep 01 '18 at 15:35