{"id":881,"date":"2019-11-14T00:00:00","date_gmt":"2019-11-14T00:00:00","guid":{"rendered":"https:\/\/azure.microsoft.com\/blog\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi"},"modified":"2025-06-26T23:47:15","modified_gmt":"2025-06-27T06:47:15","slug":"how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi","status":"publish","type":"post","link":"https:\/\/azure.microsoft.com\/en-us\/blog\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi\/","title":{"rendered":"How to build globally distributed applications with Azure Cosmos DB and Pulumi"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><em>This post was co-authored by Mikhail Shilkov, Software Engineer, Pulumi.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Pulumi is reinventing how people build modern cloud applications, with a unique platform that combines deep systems and infrastructure innovation with elegant programming models and developer tools.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We live in amazing times when people and businesses on different continents can interact at the speed of light. Numerous industries and applications target users around the globe: e-commerce websites, multiplayer online games, connected IoT devices, collaborative work and leisure experiences, and many more. All of these applications demand computing and data infrastructure in proximity to the end-customers to minimize latency and keep the user experience engaging. The modern cloud makes these scenarios possible.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"azure-infrastructure\">Azure infrastructure<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Azure Cosmos DB provides a turn-key data distribution to any number of regions, meaning that locations can be added or removed along the way while running production workloads. Azure takes care of data replication, resiliency, and efficiency while providing APIs for read and write operations with a latency of less than 10 milliseconds.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In contrast, compute services\u2014virtual machines, container instances, Azure App Services, Azure Functions, and managed Azure Kubernetes Service\u2014are located in a single Azure region. To make good use of the geographic redundancy of the database, users should deploy their application to each of the target regions.<\/p>\n\n\n\n<figure class=\"wp-block-image has-custom-border\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2019\/11\/ac144afc-8e7c-4732-bd76-856c04ec5f07.webp\" alt=\"An image showing globally distributed applications.\" style=\"border-radius:0px\" title=\"An image showing globally distributed applications.\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Globally distributed application<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Application regions must stay in sync with Azure Cosmos DB regions to enjoy low-latency benefits. Operational teams must manage the pool of applications and services to provide the correct locality in addition to auto-scaling configuration, efficient networking, security, and maintainability.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To help manage the complexity, the approach of <strong>infrastructure as code<\/strong> comes to the rescue.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"infrastructure-as-code\">Infrastructure as code<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">While the Azure portal is an excellent pane-of-glass for all Azure services, it shouldn\u2019t be used directly to provision production applications.&nbsp;Instead, we should strive to describe the infrastructure in terms of a program which can be executed to create all the required cloud resources.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Traditionally, this could be achieved with an automation script, e.g., a PowerShell Cmdlet or a bash script calling the Azure CLI. However, this approach is laborious and error prone. Bringing an environment from its current state to the desired is often non-trivial. A failure in the middle of the script often requires manual intervention to repair environments, leading to downtime.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Desired state configuration<\/strong> is another style of infrastructure definition. A user describes the desired final state of infrastructure in a declarative manner, and the tooling takes care of bringing an environment from its current state to the parity with the desired state. Such a program is more natural to evolve and track changes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Azure Resource Manager Templates<\/strong> is the bespoke desired-state-configuration tool in the world of Azure. The state is described as a JSON template, listing all the resources and properties. However, large JSON templates can be quite hard to write manually. They have a high learning curve and quickly become large, complex, verbose, and repetitive. Developers find themselves missing simple programming language possibilities like iterations or custom functions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><a href=\"https:\/\/www.pulumi.com\" target=\"_blank\" rel=\"noopener\">Pulumi<\/a> <\/strong>solves this problem by using general-purpose programming languages to describe the desired state of cloud infrastructure. Using JavaScript, TypeScript, or Python reduces the amount of code many-fold, while bringing constructs like functions and components to the DevOps toolbox.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"global-applications-with-pulumi\">Global applications with Pulumi<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To illustrate the point, we developed a TypeScript program to provision a distributed application in Azure.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The target scenario requires quite a few resources to distribute the application across multiple Azure regions, including:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"wp-block-list-item\">Provision an Azure Cosmos DB account in multiple regions<\/li>\n\n\n\n<li class=\"wp-block-list-item\">Deploy a copy of the application layer to each of those regions<\/li>\n\n\n\n<li class=\"wp-block-list-item\">Connect each application to the Azure Cosmos DB local replica<\/li>\n\n\n\n<li class=\"wp-block-list-item\">Add a Traffic Manager to route user requests to the nearest application endpoint<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image has-custom-border\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2019\/11\/9c5d8a83-2540-41cd-8b1a-cbaf83e82b1f.webp\" alt=\"A diagram showing the flow of global application with Azure and Pulumi.\" style=\"border-radius:0px\" title=\"A diagram showing the flow of global application with Azure and Pulumi.\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Global application with Azure and Pulumi<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, instead of coding this manually, we can rely on Pulumi&#8217;s CosmosApp component as described in <a href=\"https:\/\/www.pulumi.com\/blog\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi\/\" target=\"_blank\" rel=\"noopener\">How To Build Globally Distributed Applications with Azure Cosmos DB and Pulumi<\/a>. The component creates distributed Azure Cosmos DB resources, as well as the front-end routing component while allowing pluggable compute layer implementation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can find the sample code in <a href=\"https:\/\/github.com\/pulumi\/examples\/tree\/master\/azure-ts-cosmosapp-component\" target=\"_blank\" rel=\"noopener\">Reusable Component to Create Globally-distributed Applications with Azure Cosmos DB<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Pulumi CLI executes the code, translate it to the tree of resources to create, and deploys all of them to Azure:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2019\/11\/31026554-3e30-4602-88db-5adec33e5233.webp\" alt=\"A screenshot showing Pulumi's CLI executing the code. \" title=\"A screenshot showing Pulumi's CLI executing the code. \" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After the command succeeds, the application is up and running in three regions of my choice.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"next-steps\">Next steps<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Infrastructure as code is instrumental in enabling modern DevOps practices in the universe of global and scalable cloud applications.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Pulumi lets you use a general-purpose programming language to define infrastructure. It brings the best tools and practices from the software development world to the domain of infrastructure management.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Try the CosmosApp (available on GitHub\u2014<a href=\"https:\/\/github.com\/pulumi\/examples\/tree\/master\/azure-ts-cosmosapp-component\" target=\"_blank\" rel=\"noopener\">TypeScript<\/a>, <a href=\"https:\/\/github.com\/pulumi\/examples\/tree\/master\/azure-cs-cosmosapp-component\" target=\"_blank\" rel=\"noopener\">C#<\/a>)&nbsp;with serverless functions, containers, or virtual machines to&nbsp;<a href=\"https:\/\/www.pulumi.com\/docs\/get-started\/azure\/\" target=\"_blank\" rel=\"noopener\">get started<\/a>&nbsp;with Pulumi and Azure.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We live in amazing times when people and businesses at different continents can interact at the speed of light. Numerous industries and applications target users around the globe: e-commerce websites, multiplayer online games, connected IoT devices, collaborative work and leisure experience, and many more.<\/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":[1473,1485],"tags":[],"audience":[3055,3053,3056],"content-type":[1497],"product":[1538],"tech-community":[],"topic":[],"coauthors":[375],"class_list":["post-881","post","type-post","status-publish","format-standard","hentry","category-databases","category-internet-of-things","audience-developers","audience-it-decision-makers","audience-it-implementors","content-type-partnerships","product-azure-cosmos-db","review-flag-iot-1680286585-835"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to build globally distributed applications with Azure Cosmos DB and Pulumi | Microsoft Azure Blog<\/title>\n<meta name=\"description\" content=\"We live in amazing times when people and businesses at different continents can interact at the speed of light. Numerous industries and applications target users around the globe: e-commerce websites, multiplayer online games, connected IoT devices, collaborative work and leisure experience, and many more.\" \/>\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\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to build globally distributed applications with Azure Cosmos DB and Pulumi | Microsoft Azure Blog\" \/>\n<meta property=\"og:description\" content=\"We live in amazing times when people and businesses at different continents can interact at the speed of light. Numerous industries and applications target users around the globe: e-commerce websites, multiplayer online games, connected IoT devices, collaborative work and leisure experience, and many more.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/azure.microsoft.com\/en-us\/blog\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi\/\" \/>\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=\"2019-11-14T00:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-27T06:47:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2019\/11\/ac144afc-8e7c-4732-bd76-856c04ec5f07.webp\" \/>\n<meta name=\"author\" content=\"Rimma Nehme\" \/>\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=\"Rimma Nehme\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 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\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi\/\"},\"author\":[{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/rimma-nehme\/\",\"@type\":\"Person\",\"@name\":\"Rimma Nehme\"}],\"headline\":\"How to build globally distributed applications with Azure Cosmos DB and Pulumi\",\"datePublished\":\"2019-11-14T00:00:00+00:00\",\"dateModified\":\"2025-06-27T06:47:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi\/\"},\"wordCount\":818,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2019\/11\/ac144afc-8e7c-4732-bd76-856c04ec5f07.webp\",\"articleSection\":[\"Databases\",\"Internet of things\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/azure.microsoft.com\/en-us\/blog\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi\/\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi\/\",\"name\":\"How to build globally distributed applications with Azure Cosmos DB and Pulumi | Microsoft Azure Blog\",\"isPartOf\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2019\/11\/ac144afc-8e7c-4732-bd76-856c04ec5f07.webp\",\"datePublished\":\"2019-11-14T00:00:00+00:00\",\"dateModified\":\"2025-06-27T06:47:15+00:00\",\"description\":\"We live in amazing times when people and businesses at different continents can interact at the speed of light. Numerous industries and applications target users around the globe: e-commerce websites, multiplayer online games, connected IoT devices, collaborative work and leisure experience, and many more.\",\"breadcrumb\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/azure.microsoft.com\/en-us\/blog\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi\/#primaryimage\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2019\/11\/ac144afc-8e7c-4732-bd76-856c04ec5f07.webp\",\"contentUrl\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2019\/11\/ac144afc-8e7c-4732-bd76-856c04ec5f07.webp\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog home\",\"item\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Databases\",\"item\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/category\/databases\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to build globally distributed applications with Azure Cosmos DB and Pulumi\"}]},{\"@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":"How to build globally distributed applications with Azure Cosmos DB and Pulumi | Microsoft Azure Blog","description":"We live in amazing times when people and businesses at different continents can interact at the speed of light. Numerous industries and applications target users around the globe: e-commerce websites, multiplayer online games, connected IoT devices, collaborative work and leisure experience, and many more.","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\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi\/","og_locale":"en_US","og_type":"article","og_title":"How to build globally distributed applications with Azure Cosmos DB and Pulumi | Microsoft Azure Blog","og_description":"We live in amazing times when people and businesses at different continents can interact at the speed of light. Numerous industries and applications target users around the globe: e-commerce websites, multiplayer online games, connected IoT devices, collaborative work and leisure experience, and many more.","og_url":"https:\/\/azure.microsoft.com\/en-us\/blog\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi\/","og_site_name":"Microsoft Azure Blog","article_publisher":"https:\/\/www.facebook.com\/microsoftazure","article_published_time":"2019-11-14T00:00:00+00:00","article_modified_time":"2025-06-27T06:47:15+00:00","og_image":[{"url":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2019\/11\/ac144afc-8e7c-4732-bd76-856c04ec5f07.webp","type":"","width":"","height":""}],"author":"Rimma Nehme","twitter_card":"summary_large_image","twitter_creator":"@azure","twitter_site":"@azure","twitter_misc":{"Written by":"Rimma Nehme","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi\/#article","isPartOf":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi\/"},"author":[{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/rimma-nehme\/","@type":"Person","@name":"Rimma Nehme"}],"headline":"How to build globally distributed applications with Azure Cosmos DB and Pulumi","datePublished":"2019-11-14T00:00:00+00:00","dateModified":"2025-06-27T06:47:15+00:00","mainEntityOfPage":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi\/"},"wordCount":818,"commentCount":0,"publisher":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization"},"image":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi\/#primaryimage"},"thumbnailUrl":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2019\/11\/ac144afc-8e7c-4732-bd76-856c04ec5f07.webp","articleSection":["Databases","Internet of things"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/azure.microsoft.com\/en-us\/blog\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi\/","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi\/","name":"How to build globally distributed applications with Azure Cosmos DB and Pulumi | Microsoft Azure Blog","isPartOf":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi\/#primaryimage"},"image":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi\/#primaryimage"},"thumbnailUrl":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2019\/11\/ac144afc-8e7c-4732-bd76-856c04ec5f07.webp","datePublished":"2019-11-14T00:00:00+00:00","dateModified":"2025-06-27T06:47:15+00:00","description":"We live in amazing times when people and businesses at different continents can interact at the speed of light. Numerous industries and applications target users around the globe: e-commerce websites, multiplayer online games, connected IoT devices, collaborative work and leisure experience, and many more.","breadcrumb":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/azure.microsoft.com\/en-us\/blog\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi\/#primaryimage","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2019\/11\/ac144afc-8e7c-4732-bd76-856c04ec5f07.webp","contentUrl":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2019\/11\/ac144afc-8e7c-4732-bd76-856c04ec5f07.webp"},{"@type":"BreadcrumbList","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/how-to-build-globally-distributed-applications-with-azure-cosmos-db-and-pulumi\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog home","item":"https:\/\/azure.microsoft.com\/en-us\/blog\/"},{"@type":"ListItem","position":2,"name":"Databases","item":"https:\/\/azure.microsoft.com\/en-us\/blog\/category\/databases\/"},{"@type":"ListItem","position":3,"name":"How to build globally distributed applications with Azure Cosmos DB and Pulumi"}]},{"@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\/881","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=881"}],"version-history":[{"count":1,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts\/881\/revisions"}],"predecessor-version":[{"id":43987,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts\/881\/revisions\/43987"}],"wp:attachment":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/media?parent=881"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/categories?post=881"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/tags?post=881"},{"taxonomy":"audience","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/audience?post=881"},{"taxonomy":"content-type","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/content-type?post=881"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/product?post=881"},{"taxonomy":"tech-community","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/tech-community?post=881"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/topic?post=881"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/coauthors?post=881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}