{"id":3062,"date":"2018-02-07T00:00:00","date_gmt":"2018-02-07T08:00:00","guid":{"rendered":"https:\/\/azure.microsoft.com\/blog\/understanding-serverless-cold-start"},"modified":"2025-06-27T08:21:55","modified_gmt":"2025-06-27T15:21:55","slug":"understanding-serverless-cold-start","status":"publish","type":"post","link":"https:\/\/azure.microsoft.com\/en-us\/blog\/understanding-serverless-cold-start\/","title":{"rendered":"Understanding serverless cold start"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>Update June 2019: <\/strong>Cold start mitigations for dynamic scaling functions are now available in the Premium plan. <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/azure-functions\/functions-premium-plan#pre-warmed-instances\">Read more here<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Cold start is a large discussion point for serverless architectures and is a point of ambiguity for many users of Azure Functions. The goal of this post is to help you understand what cold start is, why it happens, and how you can architect your solutions around it. To provide this explanation, we\u2019ll be going deep into some technical details of how Azure Functions works behind the scenes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"consumption-plan-vs-dedicated-plan\">Consumption plan vs. dedicated plan<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Azure Functions comes in two main flavors, consumption and dedicated. The difference between the two is important, choosing one over the other not only dictates the behavior of your application but also how you\u2019re billed. The consumption plan is our \u201cserverless\u201d model, your code reacts to events, effectively scales out to meet whatever load you\u2019re seeing, scales down when code isn\u2019t running, and you\u2019re billed only for what you use. Plus, all of this happens without you thinking about what Microsoft Azure is doing behind the scenes. The dedicated plan on the other hand, involves renting control of a virtual machine. This control means you can do whatever you like on that machine. It\u2019s always available and might make more sense financially if you have a function which needs to run 24\/7. If you\u2019re curious and want a more detailed explanation, check out our <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/azure-functions\/functions-scale\">documentation<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-cold-start\">What is cold start?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Broadly speaking, cold start is a term used to describe the phenomenon that applications which haven\u2019t been used take longer to start up. In the context of Azure Functions, latency is the total time a user must wait for their function. From when an event happens to start up a function until that function completes responding to the event. So more precisely, a cold start is an increase in latency for Functions which haven\u2019t been called recently. When using Azure Functions in the dedicated plan, the Functions host is always running, which means that cold start isn\u2019t really an issue. So, our scope is narrowed to Functions running the serverless consumption model. Let\u2019s go deeper.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-happens-when-i-write-a-function\">What happens when I write a function?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Suppose you\u2019re writing your first function. You\u2019ve provisioned a function app, created your function based on one of our templates, and are modifying it to fit your business needs. You save, and now wait for your specified trigger to initiate your function. Later, your function triggers. When this process begins, since you haven\u2019t yet executed anything, all your code and config exist only as files in Azure Storage. Let\u2019s pause and think through broadly what still needs to happen for your code to run:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li class=\"wp-block-list-item\"><p>Azure must allocate your application to a server with capacity.<\/p><\/li>\n\n\n\n<li class=\"wp-block-list-item\"><p>The Functions runtime must then start up on that server.<\/p><\/li>\n\n\n\n<li class=\"wp-block-list-item\"><p>Your code then needs to execute.<\/p><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Steps 1 and 2, if done unintelligently can take a while, spinning up and configuring a server takes time. To make this experience better for users, instead of starting from scratch every time, we\u2019ve implemented a way to keep a pool of servers warm and draw workers from that pool. What this means is that at any point in time there are idle workers that have been preconfigured with the Functions runtime up and running. Making these \u201cpre-warmed sites\u201d happen has given us measurable \u202fimprovements on our cold start times. Things are now on the order of three to four times faster. Now, let\u2019s go back and walk through a more detailed view of what happens when you trigger the execution of a function when resources haven\u2019t yet been allocated.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-happens-during-a-cold-start\">What happens during a cold start<\/h2>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/02\/4cca2941-3df2-49aa-bb73-495dc64b2ead.webp\" alt=\"\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\">\n<li class=\"wp-block-list-item\"><p>Azure allocates a preconfigured server from the pool of warm workers to your app. This server already has the Functions runtime running on it, but it is unspecialized.<\/p><\/li>\n\n\n\n<li class=\"wp-block-list-item\">This worker becomes specialized by configuring the Functions runtime in ways that are specific to your app. A few things happen to do this specialization, including:\n<ul class=\"wp-block-list\">\n<li class=\"wp-block-list-item\">The Azure Functions infrastructure mounts your Azure Files content to the worker you\u2019ve been assigned<\/li>\n\n\n\n<li class=\"wp-block-list-item\"><p>App settings specific to your function app are applied to the worker<\/p><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li class=\"wp-block-list-item\">The Functions runtime resets, and any required extensions are loaded onto the worker. To figure out which extensions to load, the runtime reads the function.json files of any function in the function app. For instance, this happens if you\u2019re using <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/azure-functions\/durable-functions-overview\">Durable Functions<\/a>, or if you have input or output bindings.<\/li>\n\n\n\n<li class=\"wp-block-list-item\">The Functions themselves are loaded into memory by language providers. This will take a varying amount of time based on the size of your application.<\/li>\n\n\n\n<li class=\"wp-block-list-item\"><p>Your code runs.<\/p><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">If you\u2019ve executed your function recently steps 1-4 have already happened, the resources are already allocated, and your site is warm. As you can imagine, in this scenario things are considerably faster. We deallocate resources after roughly 20 minutes of inactivity, after which your next call will be a cold start and this entire process will happen again.\u202f This is illustrated above.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"is-the-team-making-any-more-improvements\">Is the team making any more improvements?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Yes! This post is simply a point in time (February 2018) analysis of how things work, and many specifics are subject to change. As evidence, we recently released an update to the runtime and for our general availability languages we\u2019re seeing a further 50 percent improvement on cold start times. I won\u2019t go super deep on it here, but this update fixed a regression in our native image generation. For more details, read up on <a href=\"https:\/\/docs.microsoft.com\/en-us\/dotnet\/framework\/tools\/ngen-exe-native-image-generator\" target=\"_blank\" rel=\"noopener\">NGEN<\/a> or check out the<a href=\"https:\/\/github.com\/Azure\/azure-webjobs-sdk-script\/releases\/tag\/v1.0.11490\" target=\"_blank\" rel=\"noopener\"> release<\/a> itself, we are fully open sourced.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-can-i-improve-my-code-to-help-avoid-long-cold-starts\">How can I improve my code to help avoid long cold starts?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now that we have a baseline understanding of what\u2019s happening behind the scenes to cause cold start, we can start to address how to architect your solutions to avoid it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Language: First and foremost, use our generally available languages such as C#, F#, and JavaScript. We have several experimental languages which aren\u2019t fully supported and optimized most of them actually spin up a new process on every execution, which impacts latency a great deal. Also, it\u2019s important to note that any language running in our 2.0 runtime is in preview and also hasn\u2019t been optimized fully. We expect these languages to perform better in the future, but for now, stick to the GA languages mentioned above. For more specifics, see our <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/azure-functions\/functions-versions\" target=\"_blank\" rel=\"noopener\">documentation<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"write-lightweight-code\">Write lightweight code<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Dependencies: When you deploy your code, your dependencies are added as files to your application. As outlined in step 4 above, all code needed by your app eventually gets loaded into memory, which takes longer with a larger application. So, if you have a ton of dependencies, you\u2019ll get a longer cold start due to increased time for I\/O operations from Azure Files, and longer time needed to load a bigger app into memory. This is a thing we see all the time for folks writing Functions in JavaScript, npm trees can get huge. Not only does this increase the size of your app, but also increases the number of files that Azure Files has to handle, which causes further slowdown. For this scenario in particular, we\u2019ve released a tool to help. Check out <a href=\"https:\/\/github.com\/Azure\/azure-functions-pack\/releases\/tag\/1.0.0\" target=\"_blank\" rel=\"noopener\">Funcpack<\/a> to learn more!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Efficient Code: Sometimes the answer is simply writing more efficient code. There are a few approaches to note here, first try to make as much processing as possible asynchronous. Functions won\u2019t perform well if you have a heavyweight synchronous call blocking your code from completing. Along this vein, try to minimize the amount of work that has to happen before your code starts up and avoid code which consumes a lot of CPU. If you\u2019re concerned about this yourself, we recommend trying out <a href=\"https:\/\/azure.microsoft.com\/en-us\/services\/application-insights\/\" target=\"_blank\" rel=\"noopener\">Application Insights<\/a>. It\u2019s a fantastic monitoring tool and can help isolate application slowdown from platform slowdown.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"avoiding-cold-start-altogether\">Avoiding cold start altogether<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Dedicated Mode: As mentioned before, running Functions in an App Service Plan alleviates these issues since you control what happens on your VM. This is slightly more expensive, and isn\u2019t serverless, but if your solution has a hard requirement for low latency on every individual call, consider using the Dedicated mode.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"feedback\">Feedback<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Feedback is always welcome. If you want to tell us what you think or reach out to the product team directly for any other reason, engage with us on Twitter or GitHub!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u201cCold start\u201d is a large discussion point for serverless architectures and is a point of ambiguity for many users of Azure Functions. The goal of this post is to help you understand what cold start is, why it happens, and how you can architect your solutions around it.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ms_queue_id":[],"ep_exclude_from_search":false,"_classifai_error":"","_classifai_text_to_speech_error":"","_alt_title":"","footnotes":"","msx_community_cta_settings":[]},"categories":[1462],"tags":[],"audience":[3055,3056],"content-type":[1511],"product":[],"tech-community":[],"topic":[],"coauthors":[97],"class_list":["post-3062","post","type-post","status-publish","format-standard","hentry","category-serverless","audience-developers","audience-it-implementors","content-type-best-practices","review-flag-1680286581-295","review-flag-1-1680286581-825","review-flag-2-1680286581-601","review-flag-24-7-1680286585-656","review-flag-4-1680286581-250","review-flag-7-1680286581-146","review-flag-alway-1680286580-106","review-flag-ga-1680286584-289","review-flag-gener-1680286584-335","review-flag-new-1680286579-546","review-flag-percent","review-flag-vm-1680286585-143"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Understanding serverless cold start | Microsoft Azure Blog<\/title>\n<meta name=\"description\" content=\"\u201cCold start\u201d is a large discussion point for serverless architectures and is a point of ambiguity for many users of Azure Functions. The goal of this post is to help you understand what cold start is, why it happens, and how you can architect your solutions around it.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/azure.microsoft.com\/en-us\/blog\/understanding-serverless-cold-start\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Understanding serverless cold start | Microsoft Azure Blog\" \/>\n<meta property=\"og:description\" content=\"\u201cCold start\u201d is a large discussion point for serverless architectures and is a point of ambiguity for many users of Azure Functions. The goal of this post is to help you understand what cold start is, why it happens, and how you can architect your solutions around it.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/azure.microsoft.com\/en-us\/blog\/understanding-serverless-cold-start\/\" \/>\n<meta property=\"og:site_name\" content=\"Microsoft Azure Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/microsoftazure\" \/>\n<meta property=\"article:published_time\" content=\"2018-02-07T08:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-27T15:21:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/02\/4cca2941-3df2-49aa-bb73-495dc64b2ead.webp\" \/>\n<meta name=\"author\" content=\"Microsoft Azure\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@azure\" \/>\n<meta name=\"twitter:site\" content=\"@azure\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Microsoft Azure\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/understanding-serverless-cold-start\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/understanding-serverless-cold-start\/\"},\"author\":[{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/microsoft-azure\/\",\"@type\":\"Person\",\"@name\":\"Microsoft Azure\"}],\"headline\":\"Understanding serverless cold start\",\"datePublished\":\"2018-02-07T08:00:00+00:00\",\"dateModified\":\"2025-06-27T15:21:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/understanding-serverless-cold-start\/\"},\"wordCount\":1417,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/understanding-serverless-cold-start\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/02\/4cca2941-3df2-49aa-bb73-495dc64b2ead.webp\",\"articleSection\":[\"Serverless\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/azure.microsoft.com\/en-us\/blog\/understanding-serverless-cold-start\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/understanding-serverless-cold-start\/\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/understanding-serverless-cold-start\/\",\"name\":\"Understanding serverless cold start | Microsoft Azure Blog\",\"isPartOf\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/understanding-serverless-cold-start\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/understanding-serverless-cold-start\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/02\/4cca2941-3df2-49aa-bb73-495dc64b2ead.webp\",\"datePublished\":\"2018-02-07T08:00:00+00:00\",\"dateModified\":\"2025-06-27T15:21:55+00:00\",\"description\":\"\u201cCold start\u201d is a large discussion point for serverless architectures and is a point of ambiguity for many users of Azure Functions. The goal of this post is to help you understand what cold start is, why it happens, and how you can architect your solutions around it.\",\"breadcrumb\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/understanding-serverless-cold-start\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/azure.microsoft.com\/en-us\/blog\/understanding-serverless-cold-start\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/understanding-serverless-cold-start\/#primaryimage\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/02\/4cca2941-3df2-49aa-bb73-495dc64b2ead.webp\",\"contentUrl\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/02\/4cca2941-3df2-49aa-bb73-495dc64b2ead.webp\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/understanding-serverless-cold-start\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog home\",\"item\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Serverless\",\"item\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/category\/serverless\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Understanding serverless cold start\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#website\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/\",\"name\":\"Microsoft Azure Blog\",\"description\":\"Get the latest Azure news, updates, and announcements from the Azure blog. From product updates to hot topics, hear from the Azure experts.\",\"publisher\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization\",\"name\":\"Microsoft Azure Blog\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2024\/06\/microsoft_logo.webp\",\"contentUrl\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2024\/06\/microsoft_logo.webp\",\"width\":512,\"height\":512,\"caption\":\"Microsoft Azure Blog\"},\"image\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/microsoftazure\",\"https:\/\/x.com\/azure\",\"https:\/\/www.instagram.com\/microsoftdeveloper\/\",\"https:\/\/www.linkedin.com\/company\/16188386\",\"https:\/\/www.youtube.com\/user\/windowsazure\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/person\/c702e5edd662b328b49b7e1180cab117\",\"name\":\"shakir\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g7664e653ea371ce16eaf75e9fa8952c4\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g\",\"caption\":\"shakir\"},\"sameAs\":[\"https:\/\/azure.microsoft.com\"],\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/shakir\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Understanding serverless cold start | Microsoft Azure Blog","description":"\u201cCold start\u201d is a large discussion point for serverless architectures and is a point of ambiguity for many users of Azure Functions. The goal of this post is to help you understand what cold start is, why it happens, and how you can architect your solutions around it.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/azure.microsoft.com\/en-us\/blog\/understanding-serverless-cold-start\/","og_locale":"en_US","og_type":"article","og_title":"Understanding serverless cold start | Microsoft Azure Blog","og_description":"\u201cCold start\u201d is a large discussion point for serverless architectures and is a point of ambiguity for many users of Azure Functions. The goal of this post is to help you understand what cold start is, why it happens, and how you can architect your solutions around it.","og_url":"https:\/\/azure.microsoft.com\/en-us\/blog\/understanding-serverless-cold-start\/","og_site_name":"Microsoft Azure Blog","article_publisher":"https:\/\/www.facebook.com\/microsoftazure","article_published_time":"2018-02-07T08:00:00+00:00","article_modified_time":"2025-06-27T15:21:55+00:00","og_image":[{"url":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/02\/4cca2941-3df2-49aa-bb73-495dc64b2ead.webp","type":"","width":"","height":""}],"author":"Microsoft Azure","twitter_card":"summary_large_image","twitter_creator":"@azure","twitter_site":"@azure","twitter_misc":{"Written by":"Microsoft Azure","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/understanding-serverless-cold-start\/#article","isPartOf":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/understanding-serverless-cold-start\/"},"author":[{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/microsoft-azure\/","@type":"Person","@name":"Microsoft Azure"}],"headline":"Understanding serverless cold start","datePublished":"2018-02-07T08:00:00+00:00","dateModified":"2025-06-27T15:21:55+00:00","mainEntityOfPage":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/understanding-serverless-cold-start\/"},"wordCount":1417,"commentCount":0,"publisher":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization"},"image":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/understanding-serverless-cold-start\/#primaryimage"},"thumbnailUrl":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/02\/4cca2941-3df2-49aa-bb73-495dc64b2ead.webp","articleSection":["Serverless"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/azure.microsoft.com\/en-us\/blog\/understanding-serverless-cold-start\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/understanding-serverless-cold-start\/","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/understanding-serverless-cold-start\/","name":"Understanding serverless cold start | Microsoft Azure Blog","isPartOf":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/understanding-serverless-cold-start\/#primaryimage"},"image":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/understanding-serverless-cold-start\/#primaryimage"},"thumbnailUrl":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/02\/4cca2941-3df2-49aa-bb73-495dc64b2ead.webp","datePublished":"2018-02-07T08:00:00+00:00","dateModified":"2025-06-27T15:21:55+00:00","description":"\u201cCold start\u201d is a large discussion point for serverless architectures and is a point of ambiguity for many users of Azure Functions. The goal of this post is to help you understand what cold start is, why it happens, and how you can architect your solutions around it.","breadcrumb":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/understanding-serverless-cold-start\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/azure.microsoft.com\/en-us\/blog\/understanding-serverless-cold-start\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/understanding-serverless-cold-start\/#primaryimage","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/02\/4cca2941-3df2-49aa-bb73-495dc64b2ead.webp","contentUrl":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/02\/4cca2941-3df2-49aa-bb73-495dc64b2ead.webp"},{"@type":"BreadcrumbList","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/understanding-serverless-cold-start\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog home","item":"https:\/\/azure.microsoft.com\/en-us\/blog\/"},{"@type":"ListItem","position":2,"name":"Serverless","item":"https:\/\/azure.microsoft.com\/en-us\/blog\/category\/serverless\/"},{"@type":"ListItem","position":3,"name":"Understanding serverless cold start"}]},{"@type":"WebSite","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#website","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/","name":"Microsoft Azure Blog","description":"Get the latest Azure news, updates, and announcements from the Azure blog. From product updates to hot topics, hear from the Azure experts.","publisher":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/azure.microsoft.com\/en-us\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization","name":"Microsoft Azure Blog","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2024\/06\/microsoft_logo.webp","contentUrl":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2024\/06\/microsoft_logo.webp","width":512,"height":512,"caption":"Microsoft Azure Blog"},"image":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/microsoftazure","https:\/\/x.com\/azure","https:\/\/www.instagram.com\/microsoftdeveloper\/","https:\/\/www.linkedin.com\/company\/16188386","https:\/\/www.youtube.com\/user\/windowsazure"]},{"@type":"Person","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/person\/c702e5edd662b328b49b7e1180cab117","name":"shakir","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g7664e653ea371ce16eaf75e9fa8952c4","url":"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g","caption":"shakir"},"sameAs":["https:\/\/azure.microsoft.com"],"url":"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/shakir\/"}]}},"msxcm_display_generated_audio":false,"msxcm_animated_featured_image":null,"distributor_meta":false,"distributor_terms":false,"distributor_media":false,"distributor_original_site_name":"Microsoft Azure Blog","distributor_original_site_url":"https:\/\/azure.microsoft.com\/en-us\/blog","push-errors":false,"_links":{"self":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts\/3062","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/comments?post=3062"}],"version-history":[{"count":1,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts\/3062\/revisions"}],"predecessor-version":[{"id":44099,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts\/3062\/revisions\/44099"}],"wp:attachment":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/media?parent=3062"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/categories?post=3062"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/tags?post=3062"},{"taxonomy":"audience","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/audience?post=3062"},{"taxonomy":"content-type","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/content-type?post=3062"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/product?post=3062"},{"taxonomy":"tech-community","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/tech-community?post=3062"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/topic?post=3062"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/coauthors?post=3062"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}