肚脐左下方疼是什么原因| 阿卡波糖什么时候吃| 纱布是什么材质| em是什么意思| 芹菜煮水喝有什么功效| simon什么意思| 盐酸苯海索片治什么病| 甲状腺结节忌口什么| 乐字属于五行属什么| 痤疮是什么东西| 江苏属于什么方向| 咳嗽吃什么菜好| 梦见和妈妈吵架是什么意思| 低血糖吃什么食物| 新生儿缺氧会有什么后遗症| 66什么意思| 小孩子睡觉流口水是什么原因| 夏天肚子疼是什么原因| 孕妇喝什么汤好| 普瑞巴林是什么药| 凌晨十二点是什么时辰| 拔萝卜是什么意思| warning是什么意思| 潜质是什么意思| 鸡精是什么做的| 重阳节又称什么节| 无花果和什么不能一起吃| 阴囊潮湿吃什么食物| 盐酸哌替啶是什么药| 鹊桥是什么意思| 后脑勺胀痛什么原因| 芒果不能和什么一起吃| 水瓶座女生和什么星座男生最配| 为什么吃饱了就犯困| 黄色鞋子配什么颜色裤子| 胎儿永存左上腔静脉是什么意思| acl是什么意思| 一元硬币是什么材质| 胸痒痒是什么原因| 肾囊肿有什么危害| 手指关节痛什么原因| 割包皮是什么意思| 犀牛吃什么食物| 胳膊上的肌肉叫什么| 双侧筛窦粘膜增厚是什么意思| 小茴香是什么| 口红什么牌子最好| 肝胆胰腺属于什么科| 当归长什么样| 肾阳虚和肾阴虚有什么区别症状| 昏什么昏什么| 常字五行属什么| 甲醛什么味| 狮子座跟什么星座最配| 梦见鞋丢了是什么意思| 昆明有什么好玩的| 腥是什么意思| 吴亦凡属什么生肖| 全糖是什么意思| 猫薄荷是什么东西| 伤口出水是什么原因| 甲鱼炖什么好吃| wi-fi是什么意思| 1976年属什么生肖| 清白是什么意思| 抽脂有什么风险和后遗症| 耳朵后面痒是什么原因| 补睾丸吃什么药最好| vivian是什么意思| 归零是什么意思| 郑少秋为什么娶沈殿霞| 舟山念什么| 农历5月25日是什么星座| 氯化钠是什么东西| 肺部检查应该挂什么科| 家里的财位在什么位置| 初恋什么意思| 伴侣是什么| 痢疾吃什么药效果最好| 喝酒前喝什么不容易醉| 塞翁失马什么意思| 类风湿是什么病| 痛风吃什么| 白皮书什么意思| 愚公移山是什么故事| 割包皮属于什么科室| 常德有什么大学| 依稀是什么意思| 看病人买什么水果| 腹胀屁多是什么原因| 什么样的人容易抑郁| 考c1驾照需要什么条件| 灵魂伴侣是什么意思| 悱恻是什么意思| 悲观是什么意思| 回潮是什么意思| 胆红素偏高挂什么科| 线索细胞阳性是什么意思| 路上行人匆匆过是什么歌| 孕妇流鼻血是什么原因| 印堂发黑是什么原因| 什么是再生纤维面料| 康乃馨的花语代表什么| 八纲辨证中的八纲是什么| 对称是什么意思| 崎字五行属什么| 清宫和刮宫有什么区别| 什么叫前列腺| 右肾结晶是什么意思| 高姓和什么姓是世仇| pacu是什么意思| 小孩发烧可以吃什么水果| 蜂窝数据什么意思| 支配是什么意思| 九月十四号是什么星座| 铁锚是什么意思| 满族八大碗都有什么菜| 2003属什么生肖| 碟鱼是什么鱼| 心花怒放是什么意思| 下连是什么意思| 今日是什么生肖日| 瘦马是什么意思| 就读是什么意思| 梦见黑棺材是什么征兆| 小儿消化不良吃什么药最好| 一级法官是什么级别| 出生证明有什么用| 万艾可是什么药| 白兰地兑什么饮料好喝| 运动后恶心想吐是什么原因| 干预治疗是什么意思| 甲亢是什么原因引起的| 手串什么材料的最好| 华佗是什么生肖| 什么食用油最好最健康| 2029是什么年| 什么是好词| 人力资源是做什么的| 栉风沐雨什么意思| 9.4号是什么星座| 眼睛干涩有异物感用什么眼药水| 肚脐上三指是什么地方| 8000年前是什么朝代| 手上长疣是什么原因造成的| 自言自语说话是什么病| 什么叫柏拉图式的爱情| 盆腔镜检查是查什么的| 优生优育检查什么项目| pab是什么意思| 嗓子哑是什么原因引起的| 兴风作浪什么意思| 四月初一是什么星座| 细菌感染是什么原因引起的| 什么运动瘦肚子最快| 菜瓜是什么瓜| 投射效应是什么意思| 酵母菌属于什么菌| 花生有什么营养| 什么是文科什么是理科| 青瓜和黄瓜有什么区别| 做梦梦见好多蛇是什么预兆| 代偿期和失代偿期是什么意思| 被交警开罚单不交有什么后果| a和b生的孩子是什么血型| hmo是什么| 想长胖喝什么奶粉好| 下连是什么意思| 甲状腺结节是什么引起的| 喉咙发炎吃什么药| 痔疮痒痒的是什么原因| 2007年五行属什么| 体罚是什么意思| 屁股疼挂什么科| 看走眼是什么意思| 甄别是什么意思| 盆腔积液是什么| 见利忘义是什么生肖| 医生是什么生肖| 有头皮屑用什么洗发水| 咳嗽一直不好是什么原因| saba是什么药| 结节影是什么意思| 倒拔垂杨柳是什么意思| 凤尾鱼为什么突然就死| 辟邪剑谱和葵花宝典有什么关系| 蓝颜知己什么意思| 开方是什么意思| 颔是什么意思| 异麦芽酮糖醇是什么| 为什么哭了眼睛会肿| 1987年属什么生肖| 黄瓜吃多了有什么坏处| 胃气上逆是什么原因造成的| cocoon是什么意思| hpv45型阳性是什么意思| 安徽菜属于什么菜系| 壮的偏旁叫什么名字| 来例假腰疼是什么原因| 阳痿是什么症状| 梦见洗头发是什么意思| 临床诊断是什么意思| 梦见自己牙齿掉光了是什么征兆| 经血发黑什么原因| 都市丽人是什么意思| 囊胚和冻胚有什么区别| 清风明月什么意思| 走路对身体有什么好处| 窦性心动过速是什么意思| cdf是什么意思| 孩子注意力不集中是什么原因| 葡萄上的白霜是什么| 尼泊尔人是什么人种| 发烧喝什么饮料比较好| 滑膜炎是什么原因引起的| 高抬腿运动有什么好处| 入职需要准备什么材料| 手术后吃什么最好| 咳嗽适合吃什么水果| 屈光和近视有什么区别| 夜尿多吃什么药| 1964属什么| 自强不息的息是什么意思| 虎的偏旁是什么| 掉是什么意思| 两岁宝宝坐飞机需要什么证件| 三维彩超和四维彩超有什么区别| 东北方向五行属什么| 嘴巴发苦是什么原因造成的| 梦见大蜈蚣是什么预兆| 躯体是什么意思| 左侧小腹疼是什么原因| 暖手宝里面是什么| 耳朵痒是什么预兆| 免疫力和抵抗力有什么区别| 黄精为什么要九蒸九晒| 主家是什么意思| 孩子手抖是什么原因| 什么一清二白| 金风玉露是什么意思| 怕吹空调是什么原因| 局座是什么梗| 为什么有白头发| 艾灸灸出水泡是什么情况| 我在你心里是什么颜色| 郑州有什么好玩的| 女人绝经后靠什么排毒| 手发胀是什么原因| 骨折后吃什么好的快| 心肾两虚吃什么中成药| 青岛啤酒节什么时候| 抽烟有什么好处| 晨跑有什么好处| 公报私仇是什么生肖| 狐媚子是什么意思| 查血糖是什么检查项目| et是什么意思| flair呈高信号是什么意思| mchc偏低是什么意思| 九五年属什么| 心电图p是什么意思| 人为什么会自杀| 无缘是什么意思| 三和大神什么意思| 百度

It’s so quick and easy to deploy an application out into Microsoft Azure and make it available for anyone in the world to use. It’s even quicker if you utilize all the Platform as a Service (PaaS) services like Azure App Service (Web Apps, API Apps, Logic Apps, etc) including Azure SQL Database and Azure Cosmos DB. However, it can be a bit more tricky to make that application resilient to failure, specifically regional failure. How do you design an application to be truly globally resilient? What if a specific data center or region goes down? Will your application stay up and keep your users productive?

You can add high availability by increasing the number of instances, but that only applies to a single region. You could implement failover, but does that offer the best experience for your users? This article goes through many of the tips and techniques that can be used within Microsoft Azure to build truly glopbally resilient applications.

Deploying to Azure App Service

Azure App Service provides capabilities to easily deploy and host your applications using Platform as a Service (PaaS) services that offer fully managed underlying Virtual Machines (VMs). This means that you no longer need to worry about managing the Operating System (OS) updates and patches, or even the install and update of the framework runtimes for .NET, Java, Php, etc. Azure App Service really eases the process to make deployment to Dev, Test, and Production environments much easier. It even includes some manual and autoscaling features to help you handle the scalability of your applications.

Azure App Service is a really great PaaS offering, but it can’t stand alone when it comes to Global Availability and Resiliency.

However, while Azure App Service is really amazing from a PaaS perspective, it still falls short on true high availability and global resiliency. The way you achieve global scale, resiliency and very high availability is to combine Azure App Service with the Azure Traffic Manager load balancer, and other data services that offer the rest of the global resiliency stack that is needed.

Achieving Application Global Availability

Achieving Global Availability of your applications starts with the capability of any user anywhere in the world being able to access your application. This stand-alone can be done with a single Azure App Service Web App service instance. However, just accessing from anywhere in the world is not enough. There are concerns of latency, loading time, download speed, and disaster recovery / failover to just name a few that additionally need to be met.

There are 2 main services that allow for an application to achieve a much higher level of global availability. These services are truly global services within Azure and both offer a different kind of service that when used together offer amazing application availability scenarios to be built at a global scale. These services are:

  • Azure Traffic Manager
  • Azure CDN

Using Azure Traffic Manager with Azure App Service

Azure Traffic Manager is a DNS-based Load Balancer. It works by directing client traffic to a specific application instance in an Azure Region by resolving the DNS lookup of the domain name (like build5nines.com) to resolve to the IP Address of the specific app instance that should handle the request. This means that by working on the DNS level, Azure Traffic Manager is not a Proxy server and therefore does not add any real performance degradation in order to use. It actually will help you greatly improve the performance of you globally distributed, globally available applications.

When configured, your domain name (like build5nines.com) would be setup to go to the DNS domain name of the Azure Traffic Manager instance. Then Azure Traffic Manager would be configured to load balance instances of your application across multiple Azure Regions around the world. You would place application instances in App Service as close to your employees or users as possible; spread across 2 or more Azure Regions as necessary.

Designing Globally Resilient Apps with Azure App Service and Cosmos DB 1

For example, use a Performance algorithm for load balancing with Azure Traffic Manager, the requests from users located in North America would get directed to your application instance hosted in the Azure East US Region. And, requests from users located in Europe would get directed to your application instance in the Azure North Europe Region.

In addition to spreading the traffic out across the application instances in different Azure Regions, the Azure Traffic Manager will also monitor the health of the instances. This allows for Traffic Manager to automatically remove unhealthy instances from the pool and stop directing traffic to those instances until the time when they become healthy again. This allows you to handle scenarios when the Azure East US Region is down and instead of the application being unavailable, the traffic from those users would simply be directed to the Azure North Europe Region automatically instead.

Using Azure CDN with Azure App Service

A Content Delivery Network (CDN) offers the capability to host cached instances of static content at multiple locations around the world, then serve that content up with lower network latency to clients from the closest location to that user. The Azure CDN service is a Platform as a Service (PaaS) service that offers this CDN capabilities within the Microsoft Azure cloud.

The Azure CDN service is a global service that utilizes many CDN edge locations around the world to offer serving up static content with the lowest latency possible. In fact, the Azure CDN locations are NOT simply all the Azure Regions, there are actually more CDN edge locations around the world than there are Azure Regions (at the time of writing this). As a result, there is likely a CDN edge location closer to your users or employees than the primary Azure Region where your application is hosted.

When you carry the Azure CDN out to a global scale of users and clients of your application being distributed globally, then it is certain that a CDN edge location will always be closer to your users than your primary Azure Region, or even your secondary Azure Regions when you’re using Azure Traffic Manager.

An additional benefit of using Azure CDN to serve up static content for your applications is that it will offload the serving of that content from your application instances to the Azure CDN service. This will mean a decrease in the amount of load your application instances will need to handle in order to service requests. In many cases this can mean an increase in performance and overall capacity of those application instance to handle requests.

Azure App Service + Traffic Manager + Azure CDN

The benefits and reasons to use Azure Traffic Manager and Azure CDN listed above sound really great, however, what does it all look like put together? To better visualize this stuff put together into the overall architecture of an application, here’s a simple diagram that offers a more visual layout to how these services can be used together.

Achieving Data Global Availability

Designing the globally resilient and hosting infrastructure as outline previously is really great, however it still doesn’t address the Data needs of the system. Achieving data global availability and resiliency isn’t quite as straight forward as the front-end application piece. How exactly can you achieve the same global availability and resiliency on the Database level?

Traditionally, you will have a single database server host your database. This could be SQL Server or Oracle on-premises for example, or even Azure SQL Database in the Microsoft Azure cloud. Scaling this single database instance generally involves just adding additional capacity to the server in the form of CPU / RAM / HDD on-premises, or adding additional DTU’s in Azure SQL Database. However, this vertical scaling by just “adding more power” has a finite limit of scalability. Also, it doesn’t solve any redundancy and global availability needs either. A single database instance is a single point of failure and a huge liability.

A single database instance is a single point of failure and a huge liability.

In the Microsoft Azure cloud, the best database options are to use PaaS services. IaaS can be used, but then you have a huge array of responsibilities to manage yourself, from the VM, to the Operating System, including updates and patches, and the database software too! With Azure PaaS services, you have a managed VM that manages all that underlying infrastructure work for you. This enables you to solely manage your data, access, and backup / geo-redundency configurations.

The 2 database services within Azure that offer the best global availability support are:

  • Azure SQL Database
  • Azure Cosmos DB (formerly DocumentDB)
  • Global Availability with SQL Database

With Azure SQL Database, you can host you database using a “relational database as a service”. This offers a fully managed VM, with additional scaling capabilities and other features built into the platform. Compared to a on-premises SQL Server or SQL Server hosted within a Virtual Machine (VM), Azure SQL Database is the best database option to choose.

FYI, Microsoft recently released MySQL and PostgreSQL as a server database offerings within Azure. However, only time will tell whether those services will be as robust and featurefull as Azure SQL Database has become.

With Azure SQL Database, you have the option to configure geo-replication or geo-redundency of your database. You can do this for up to 4 additional copies. These 4 additional copies will be read-only, while your primary database instance will be writable.

With Azure SQL Database, you have the option to configure geo-replication or geo-redundency of your database.

This helps with implementing a proper failover strategy. Basically, if the primary database goes down for some reason (regional outage, service disruption, etc.) then you can failover to one of the secondaries to make that the new primary. However, this process is NOT automatic by default. You either need to manually failover your Azure SQL Database when necessary, or configure automatic failover with a Failover Group.

While you can implement automatic failover of your applications, as shown previously with App Service using Traffic Manager, your Azure SQL Database failover can be configured with an automatic failover group. Without a Failover Group configuration, you would need to failover the database manually, by changing the applications Connection String so it will connect to the new Primary database instance. With a SQL Database Failover Group, your SQL Database will have a single connection endpoint that doesn’t change after the failover is triggered automatically.

Fun Fact: While Azure SQL Database shares the same code base with the SQL Server database engine , it’s not the same as just hosting SQL Server in an Azure VM. Azure SQL Database is built for the cloud from the ground up. It is also hosted using Azure Service Fabric for the underlying infrastructure hosted within Azure.

Even through the Azure SQL Database replicas are read-only, you can still use them with your various application instances across the globe. You basically just need to setup / code your system to use the nearest Secondary SQL Database for ready operations (queries, lookups, etc), then connect tot he Primary for all SQL Database write. This way your application will mostly remain functional if the Primary database goes down, and degrade their functionality gracefully. Then when the application is back up again because you performed a failover to promote a Secondary to be the new Primary and reconfigured your application instances accordingly, then your application will be back at 100% capacity from a functionality perspective.

Global Availability with Azure Cosmos DB

Azure Cosmos DB (formerly named DocumentDB) is a truly globally available NoSQL database as a service. Initially when provisioning Azure Cosmos DB you data is stored in a single Azure Region with no redundancy. However, you can easily configure multi-region geo-replication. Additionally, the Cosmos DB geo-replication is implemented differently and better than Azure SQL Database where you have a single Cosmos DB endpoint URL / Domain Name by default to connect to; then the platform handles automatic redirection for reading and writing to the nearest region without the need to manually failover.

Azure Cosmos DB is a globally distributed NoSQL database as a service built to natively run in the cloud.

With Azure Cosmos DB you can configure any number of Secondary regions and the service will automatically handle replicating your data out to each of those locations. The Cosmos DB service will also handle automatic failover in the event that your Primary region goes down.?The way that Cosmos DB handles the Primary and Secondary regions is that the “Primary” region is the only Writable region, and all the Secondary regions are Read-Only.

The automatic failover of Azure Cosmos DB is really enabled by the fact that the data replication between the instances works on an Eventually Consistent model. Once the data is written to the Writable / Primary region, it will then be replicated asynchronously to the Secondary / Read-only regions. In terms of consistency, the previously written data will be eventually consistent across all of the configured regions.

Using Azure Cosmos DB, the application as it’s geo-distributed across multiple Azure Regions and load balanced with Azure Traffic Manager, then only needs to be configured with a single database connection string to connect to the Azure Cosmos DB endpoint. Then the Cosmos DB service handles the load balancing effectively across the Writable and Read-only instances of Cosmos DB spread across the chosen regions.

Need Help Choosing the Right Partition Key in Azure Cosmos DB? It’s important to choose the right partition key for your Azure Cosmos DB collections. This will affect the scalability and performance of your database. The “Azure Cosmos DB: Understanding Partition Keys” written by Chris Pietschmann will help give you a better understanding of how to choose the right partition key for your Azure Cosmos DB database.

Achieving Full Stack Global Availability and Resiliency

Truly globally available and resilient systems can be build by combining the previously mentioned method and techniques. High availability and resiliency can be achieved from the front-end and API tiers of an application, all the way down to the database level. The system will then be protected adequately from isolated and regional service disruptions or outages.

Designing appropriately for the cloud means to design applications and systems on a global scale. The ease of the Microsoft Azure cloud also enables this to be done more easily and far less cost prohibitive than ever before. Budgets will go much further, and even small teams or organizations can achieve much higher levels of overall service that was possible only a few short years ago. This is all thanks to the Microsoft Azure cloud and all the amazing PaaS services and global scale that is offers.

To finish this article off, here’s a diagram that shows many of the components above put together into a single system that is truly globally available, highly available, and globally resilient against failure, service outages, and even regional outages.

Designing Globally Resilient Apps with Azure App Service and Cosmos DB 2

Chris Pietschmann is a Microsoft MVP, HashiCorp Ambassador, and Microsoft Certified Trainer (MCT) with 20+ years of experience designing and building Cloud & Enterprise systems. He has worked with companies of all sizes from startups to large enterprises. He has a passion for technology and sharing what he learns with others to help enable them to learn faster and be more productive.
Microsoft MVP HashiCorp Ambassador

Discover more from Build5Nines

Subscribe now to keep reading and get access to the full archive.

Continue reading

一国两制是什么时候提出的 恐龙什么时候灭绝的 拔罐对身体有什么好处 肝郁气滞血瘀吃什么药 病毒的繁殖方式是什么
军士长是什么军衔 面色发黄是什么原因 罄竹难书的罄什么意思 movefree是什么药 为什么明星都不戴黄金
岔气吃什么药 ct和b超有什么区别 中心思想是什么意思 三三两两是什么生肖 意大利面是用什么做的
纯粹是什么意思 中唐筛查是检查什么 腰眼疼是什么原因引起的 妹汁是什么意思 6.19是什么日子
浅表性胃炎吃什么中药hcv8jop8ns3r.cn pt950是什么金hcv9jop7ns0r.cn 为什么要穿内裤hcv8jop6ns7r.cn 梅毒的病原体是什么hcv8jop5ns3r.cn 告诉我们什么道理hcv7jop6ns9r.cn
赴汤蹈火的汤是什么意思hcv8jop3ns9r.cn 戒奶涨奶痛有什么缓解方法hcv8jop3ns0r.cn 静的部首是什么hcv8jop1ns6r.cn 海马是什么动物hcv8jop3ns0r.cn 凤尾鱼为什么突然就死hcv9jop6ns2r.cn
当律师需要什么条件aiwuzhiyu.com 内分泌科属于什么科hcv8jop8ns6r.cn 手指甲软薄是缺什么hcv8jop6ns4r.cn 脖子长小肉粒是什么原因hcv7jop9ns4r.cn 免冠照片是什么意思hcv8jop6ns9r.cn
鸟在家里做窝预示什么hcv9jop2ns0r.cn 十全十美是什么意思hcv9jop6ns8r.cn 肺部感染有什么症状baiqunet.com 虾仁不能和什么食物一起吃weuuu.com 美缝剂什么牌子的好hcv8jop0ns6r.cn
百度