梁斌penny_Penny Pinching在云中:在单个Azure App Service上运行和管理Web Apps的LOTS

本文主要是介绍梁斌penny_Penny Pinching在云中:在单个Azure App Service上运行和管理Web Apps的LOTS,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

梁斌penny

梁斌penny

I've blogged before about "penny pinching in the cloud." I'll update that series for 2017 soon, but the underlying concepts still apply. Many if you are still using bigger virtual machines than are needed when doing IaaS (Infrastructure as a Service) or when doing PaaS (Platform as a Service) folks are doing "one website per App Service." That's super expensive.

我以前写过关于“一分钱在云端”的博客。 我将在2017年更新该系列,但基本概念仍然适用。 很多人在使用IaaS(基础设施即服务)或PaaS(平台即服务)时仍在使用比需要的更大的虚拟机时,人们正在“每个App Service一个网站”。 那太贵了。

Remember that you can fit as many web applications as memory and CPU will into an Azure App Service Plan. An "App Service Plan" in Azure is effectively the Virtual Machine under your Web Apps. You don't need to think about it as it's totally managed and hidden - but - if you choose think about it you'll be able to squeeze more out of it and you'll pay less.

请记住,您可以在Azure应用服务计划中容纳尽可能多的Web应用程序,如内存和CPU。 Azure中的“应用程序服务计划”实际上是Web应用程序的虚拟机。 您完全不必担心它,因为它是完全托管和隐藏的-但是-如果您选择考虑它,则可以从中挤出更多的钱,而支付的费用却更少。

For example, I have 20 web applications running in a plan I named "DefaultServerFarm." It's a Small Standard Plan (S1) and I pay about $70 a month. Some folks use a Basic (B1) plan if they don't need to scale out and that's about $50 a month. Both B1 and S1 support "unlimited" web apps within them, to the limits of memory. That's what allows me to run 20 modest (but real) sites on the one plan and that's what makes it a good deal from a pricing perspective for me.

例如,有20个Web应用程序在名为“ DefaultServerFarm”的计划中运行。 这是一个小型标准计划(S1) ,我每月支付约70美元。 有些人如果不需要扩展,则使用基本(B1)计划,每月大约50美元。 B1和S1都在其中支持“无限”的Web应用程序,以达到内存限制。 这就是让我可以在一个计划中运行20个适度(但实际)的网站的原因,从定价的角度来看,这对我来说是一笔不错的交易。

I logged in to the Azure Portal recently and noticed the CPU percentage on my plan was higher than usual and higher than I'd like.

我最近登录了Azure门户,发现我计划中的CPU百分比高于通常的水平,也高于我想要的水平。

Why is that web app using so much CPU?

That's the CPU of the machine "under" my 20 sites. I can click here on my App Service Plan's "blade" to see the underlying sites, or just click "Apps" in the blade menu.

那是我20个站点“下方”的计算机的CPU。 我可以在“我的应用服务计划”的“刀片”上单击此处以查看基础站点,或者只需在刀片菜单中单击“应用”。

Running 20 apps in a Single Azure App Service

However, when I'm looking at an app that lives within my plan, there's two super powerful menu items to check out. One is  called "Metrics per instance (Apps)" and one is "Metrics per instance (App Service)." Click the latter option. For many of you it's going to become your favorite area in the Azure Portal. It was a game changer for me as it gave me the internal insight I needed to make sure I can get maximum density in my plan (thereby saving the most money).

但是,当我查看计划范围内的应用程序时,有两个超级强大的菜单项需要签出。 一种称为“每个实例的度量标准(应用程序)”,另一种称为“每个实例的度量标准(应用程序服务)”。 单击后一个选项。 对于许多人来说,它将成为Azure门户中您最喜欢的区域。 对我来说,这是一个改变游戏规则的方法,因为它为我提供了我所需的内部洞察力,以确保我可以在计划中获得最大的密度(从而节省最多的钱)。

Metrics per Instance - App Service Plan

I click here and see "Sites in App Service Plan."

我单击此处,然后看到“应用服务计划中的站点”。

20 sites in a single plan

I can see that over the last few days my CPU has been going up and up...

我可以看到最近几天我的CPU一直在上升...

The CPU is going up and up over a few days

I can see by site:

我可以按网站查看:

A graph showing ALL 20 sites and their CPU

So now I can filter by site and I see that it's ONE site that's going nuts.

因此,现在我可以按网站进行筛选,我发现这是一个疯狂的网站。

One site is using all the CPU

I can then dig in, go to the main CPU charge and see exactly when it started:

然后,我可以进行深入研究,转到主CPU收费处,并确切地了解它的启动时间:

The site is using 2.12 days of CPU

I can change the scale

我可以改变比例

It started on Feb 11th

I had a Web Job stuck in a loop. I restarted and will be monitoring but for now, I'm in a much better place for this one app.

我的Web作业陷入了循环。 我重新启动并将进行监视,但就目前而言,我在使用此应用程序的地方要好得多。

Now it's calming down

Now if I check the App Service Plan itself, I can see everything has calmed down.

现在,如果我检查了应用服务计划本身,则可以看到一切都平静了。

Things have calmed down after the one rogue site was restarted

The point here is that even though it's "Platform as a Service" and we want a layer of abstraction, at no point are things HIDDEN from us. If you want to see the hardware, you can. If you want to see the process tree, you can. A good reminder.

这里的要点是,即使它是“平台即服务”,并且我们想要一个抽象层,也绝不会隐藏任何东西。 如果要查看硬件,可以。 如果要查看流程树,可以。 一个很好的提醒。

Sponsor: Excited about the future in ASP.NET? The folks at Progress held an awesome webinar which gives a 360⁰ view of the new ASP.NET Core and how it compares to WebForms and MVC. Watch it now on demand!

赞助者:对ASP.NET的未来感到兴奋吗? Progress的人们举办了一个很棒的网络研讨会,可以360°观看新的ASP.NET Core及其与WebForms和MVC的比较。 现在点播观看!

翻译自: https://www.hanselman.com/blog/penny-pinching-in-the-cloud-running-and-managing-lots-of-web-apps-on-a-single-azure-app-service

梁斌penny

这篇关于梁斌penny_Penny Pinching在云中:在单个Azure App Service上运行和管理Web Apps的LOTS的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/327477

相关文章

如何用Docker运行Django项目

本章教程,介绍如何用Docker创建一个Django,并运行能够访问。 一、拉取镜像 这里我们使用python3.11版本的docker镜像 docker pull python:3.11 二、运行容器 这里我们将容器内部的8080端口,映射到宿主机的80端口上。 docker run -itd --name python311 -p

综合安防管理平台LntonAIServer视频监控汇聚抖动检测算法优势

LntonAIServer视频质量诊断功能中的抖动检测是一个专门针对视频稳定性进行分析的功能。抖动通常是指视频帧之间的不必要运动,这种运动可能是由于摄像机的移动、传输中的错误或编解码问题导致的。抖动检测对于确保视频内容的平滑性和观看体验至关重要。 优势 1. 提高图像质量 - 清晰度提升:减少抖动,提高图像的清晰度和细节表现力,使得监控画面更加真实可信。 - 细节增强:在低光条件下,抖

Java Web指的是什么

Java Web指的是使用Java技术进行Web开发的一种方式。Java在Web开发领域有着广泛的应用,主要通过Java EE(Enterprise Edition)平台来实现。  主要特点和技术包括: 1. Servlets和JSP:     Servlets 是Java编写的服务器端程序,用于处理客户端请求和生成动态网页内容。     JSP(JavaServer Pages)

软考系统规划与管理师考试证书含金量高吗?

2024年软考系统规划与管理师考试报名时间节点: 报名时间:2024年上半年软考将于3月中旬陆续开始报名 考试时间:上半年5月25日到28日,下半年11月9日到12日 分数线:所有科目成绩均须达到45分以上(包括45分)方可通过考试 成绩查询:可在“中国计算机技术职业资格网”上查询软考成绩 出成绩时间:预计在11月左右 证书领取时间:一般在考试成绩公布后3~4个月,各地领取时间有所不同

安全管理体系化的智慧油站开源了。

AI视频监控平台简介 AI视频监控平台是一款功能强大且简单易用的实时算法视频监控系统。它的愿景是最底层打通各大芯片厂商相互间的壁垒,省去繁琐重复的适配流程,实现芯片、算法、应用的全流程组合,从而大大减少企业级应用约95%的开发成本。用户只需在界面上进行简单的操作,就可以实现全视频的接入及布控。摄像头管理模块用于多种终端设备、智能设备的接入及管理。平台支持包括摄像头等终端感知设备接入,为整个平台提

BUUCTF靶场[web][极客大挑战 2019]Http、[HCTF 2018]admin

目录   [web][极客大挑战 2019]Http 考点:Referer协议、UA协议、X-Forwarded-For协议 [web][HCTF 2018]admin 考点:弱密码字典爆破 四种方法:   [web][极客大挑战 2019]Http 考点:Referer协议、UA协议、X-Forwarded-For协议 访问环境 老规矩,我们先查看源代码

跨系统环境下LabVIEW程序稳定运行

在LabVIEW开发中,不同电脑的配置和操作系统(如Win11与Win7)可能对程序的稳定运行产生影响。为了确保程序在不同平台上都能正常且稳定运行,需要从兼容性、驱动、以及性能优化等多个方面入手。本文将详细介绍如何在不同系统环境下,使LabVIEW开发的程序保持稳定运行的有效策略。 LabVIEW版本兼容性 LabVIEW各版本对不同操作系统的支持存在差异。因此,在开发程序时,尽量使用

EasyPlayer.js网页H5 Web js播放器能力合集

最近遇到一个需求,要求做一款播放器,发现能力上跟EasyPlayer.js基本一致,满足要求: 需求 功性能 分类 需求描述 功能 预览 分屏模式 单分屏(单屏/全屏) 多分屏(2*2) 多分屏(3*3) 多分屏(4*4) 播放控制 播放(单个或全部) 暂停(暂停时展示最后一帧画面) 停止(单个或全部) 声音控制(开关/音量调节) 主辅码流切换 辅助功能 屏

从状态管理到性能优化:全面解析 Android Compose

文章目录 引言一、Android Compose基本概念1.1 什么是Android Compose?1.2 Compose的优势1.3 如何在项目中使用Compose 二、Compose中的状态管理2.1 状态管理的重要性2.2 Compose中的状态和数据流2.3 使用State和MutableState处理状态2.4 通过ViewModel进行状态管理 三、Compose中的列表和滚动

9.8javaweb项目总结

1.主界面用户信息显示 登录成功后,将用户信息存储在记录在 localStorage中,然后进入界面之前通过js来渲染主界面 存储用户信息 将用户信息渲染在主界面上,并且头像设置跳转,到个人资料界面 这里数据库中还没有设置相关信息 2.模糊查找 检测输入框是否有变更,有的话调用方法,进行查找 发送检测请求,然后接收的时候设置最多显示四个类似的搜索结果