3

I'm starting a new project that has strict requirements that the cold-start time has to be minimal. We are talking about sub-second response-time. I haven't found any comparison of the cold-start times by language and runtime version.

Does anyone know of a benchmark of for example is C# cold-start time faster that Node.js or vice versa? What about runtime v1 vs v2?

In here: https://blogs.msdn.microsoft.com/appserviceteam/2018/02/07/understanding-serverless-cold-start/ it says that

Also, it’s important to note that any language running in our 2.0 runtime is in preview and also hasn’t been optimized fully.

but what does that actually mean? How much faster is v1? Is this likely to change in the future to the benefit of v2?

mattipet
  • 277
  • 2
  • 16
  • here is an interesting benchmark but comparing Azure, Amazon and Google serverless product. Amazon is still clearly the leader. I think by design functions will always be a little bit slower for http trigger as it is more an event driven product – Thomas Apr 08 '18 at 11:03
  • Did you forget a link or am I just not seeing it? :) Anyway thanks, I've also come across some comparisons about Azure vs AWS vs GCP but I'm not really worried about Azure not being up to par with the competition. I'm more interested in making the right decisions concerning language and runtime version so that it does not hurt my cold-start times. – mattipet Apr 09 '18 at 03:26
  • Oh sorry https://www.azurefromthetrenches.com/azure-functions-significant-improvements-in-http-trigger-scaling/ – Thomas Apr 09 '18 at 04:26

1 Answers1

4

As of today (april 2018), for a "Hello World" function cold start will be

  • Very similar for Javascript and for precompiled .NET
  • Much less for V1 than for V2

Typical cold startup time for V1 Javascript and precompiled .NET is between 1.5 and 4 seconds.

You can read the detailed analysis in Azure Functions: Cold Starts in Numbers.

Mikhail Shilkov
  • 34,128
  • 3
  • 68
  • 107
  • 1
    Thank you for your answer! I would love to see some real numbers and benchmarks but for now this is the best I've got so far. I'm looking very much forward to your article! Our team has developers who don't develop on Windows locally but rather Mac/Linux so I think we'll get going with runtime v2 and if necessary fallback to v1. Also since all of us know JavaScript, that was always number one choice for us. This just confirms my belief that it is the right choice for us. – mattipet Apr 09 '18 at 03:32
  • @mattipet I've now published that article, see the link in the updated answer. The answer itself also changed quite significantly, please have a look. – Mikhail Shilkov Apr 25 '18 at 14:34