29 lines
10 KiB
Markdown
29 lines
10 KiB
Markdown
|
---
|
||
|
preview_image:
|
||
|
hero:
|
||
|
image: /icons/containers.svg
|
||
|
title: "Azure Cosmos DB and Pulumi Pulumi 1.0 launch event"
|
||
|
title: "Azure Cosmos DB and Pulumi Pulumi 1.0 launch event"
|
||
|
meta_desc: |
|
||
|
A talk from the Pulumi 1.0 launch event, presented by Mikhail Shilkov, Microsoft Azure MVP.
|
||
|
url_slug: azure-cosmos-db-pulumi
|
||
|
featured: false
|
||
|
pre_recorded: true
|
||
|
pulumi_tv: false
|
||
|
unlisted: false
|
||
|
gated: false
|
||
|
type: webinars
|
||
|
external: false
|
||
|
no_getting_started: true
|
||
|
block_external_search_index: false
|
||
|
main:
|
||
|
title: "Azure Cosmos DB and Pulumi 1.0 launch event"
|
||
|
description: |
|
||
|
A talk from the Pulumi 1.0 launch event, presented by Mikhail Shilkov, Microsoft Azure MVP.
|
||
|
sortable_date: 2019-09-30T20:32:25Z
|
||
|
youtube_url: https://www.youtube.com/embed/aHv5MjIxgI8
|
||
|
transcript: |
|
||
|
So now I want is our greatest database of all time and then show in just 15 minutes how we can use it to actually build the application in Asia, globally distribute it and using all the power of customers. And of course, so I will start simple. Let's say I'm developing a service and a micro service and a ecommerce application. I want to show a product on a web page or something like that. And I started simple. I only have two components in my education at the moment. One is and one is as functions which is a service in Asia. And for starters, I just deployed to one region here in the US I use for this. So that's how my typescript program can look like I start with the resource group which is the name, it's like a container for resources in measure. And then the location of that resource group is going to be defined by the configuration of my staff. So I can to deploy me for reasons if I want to. And then I have a resource component for cosmos. And the important bit here is how I can figure locations, you can see based on the name, the locations that it could be in a but for now, I just use 11 location I deploy somewhere in the US. And then I need to define as a function for my app. And I chose to use a component called subscription. And the cool thing about this component is that they can define the code of my application right inside my poly program. So I just type javascript function. I do whatever I want and polo will take care of package it as Asia expects it, deploy it to Asia, I can figure my application exactly the way Asia wants it to be. And I just read jaws can function voice our response and do whatever I want there. So another cool thing there is like in the body of that punch, I can just use a variable customer account that I just define the improvement slide and use it as a just any other job could variable I can keys from my connections to just out of there without taking much care. And Colombia will be smart enough to start deploying with customers and getting the keys from that customer account pass to my function package. It is a zip file, put it on someone's storage and then load any function up to use the zip file. Hold on for me, I just write the function. So this is my first question application. I want to wait several minutes. I get to resource group cos account and then several resources which are required to run in the function of storage account, zip file consumption plan itself. So right now I can write my public page works and I'm sitting here in the US. I'm a happy user. I sit close to the application so I'll get the best possible experience. But my e-commerce side is global. So I have customers in Europe. I have customers in Asia from those locations. It's not going to be that great. Like from San Francisco might get 100 milliseconds. But from Europe, from Germany or Hong Kong, I get like 400 milliseconds. If I have multiple subsequent requests, it starts to build up and I get basically worst experience for, for the outside world. That's not what I want because I want my customers to be happy. So let's make the distribution is the application distributed. So I started with and I will not be clicking the portal to make it distributed. I'll just change my program. I make an extra configuration which list all the locations where I want it to be. And then with typescript tran value, I create Jan area with the other thing I need to do is to map this area into an area of objects which will be compatible to the Cosmos account resource. That's again, just one call to touch map function. So I do that I ramp up again, but it doesn't help of course, because my customer still talks to function app, it doesn't talk to my customers directly. So it still makes a round trip to the US and then US function app talks to customers. Well, it seems to be a real mistake. But when your infrastructure is being, when co managed by one team and managed by other team, it's quite easy to make this mistake and production application. So let's see how we can fix it. Instead, I want to deploy function app every region
|
||
|
|
||
|
---
|