扩展后,我的应用程序服务无法扩展。这似乎是我几个月来一直试图解决的一种模式。
我已经尝试了以下方法,但是都没有成功:
我的缩放条件取决于CPU和内存。但是,我从未见过CPU超过12%,因此我假设它实际上是根据内存扩展的。
将横向扩展条件设置为在5分钟(平均10分钟)内超过90%的内存。在5分钟的平均时间内,冷却时间和内存缩放比例在70%以下。这似乎没有任何意义,因为如果我的内存利用率已经达到90%,则说明我确实存在底层内存泄漏,应该已经向外扩展。
将横向扩展条件设置为在60分钟(平均10分钟)内平均存储80%以上。冷却时间,并在5分钟内平均在60%以下的条件下扩展内存。这更有意义,因为我看到内存使用量在几个小时内突然下降而下降。
预期行为:在内存使用率降至60%以下的5分钟后,应用程序服务自动缩放将减少实例计数。
题:
如果我的基准CPU保持平均6%的平均水平,而内存保持53%的水平,则衡量指标平滑扩展的理想阈值是多少?意思是,在不担心诸如拍打之类的反模式的情况下,按比例放大的最佳最小值和按比例缩小的最佳最大值是多少?差异较大的阈值20%对我来说更有意义。
替代解决方案:
鉴于与“按钮缩放”一样简单的市场营销涉及的故障排除工作量,几乎不值得使配置模糊不堪(即使没有自定义powershell脚本,您也无法使用IIS度量标准,例如连接计数!) 。我正在考虑由于其不可预测性而禁用自动缩放,因此只需保持2个实例运行以进行自动负载平衡并手动缩放即可。
自动缩放配置:
{
"location": "East US 2",
"tags": {
"$type": "Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage"
},
"properties": {
"name": "CPU and Memory Autoscale",
"enabled": true,
"targetResourceUri": "/redacted",
"profiles": [
{
"name": "Auto created scale condition",
"capacity": {
"minimum": "1",
"maximum": "10",
"default": "1"
},
"rules": [
{
"scaleAction": {
"direction": "Increase",
"type": "ChangeCount",
"value": "1",
"cooldown": "PT10M"
},
"metricTrigger": {
"metricName": "MemoryPercentage",
"metricNamespace": "",
"metricResourceUri": "/redacted",
"operator": "GreaterThanOrEqual",
"statistic": "Average",
"threshold": 80,
"timeAggregation": …Run Code Online (Sandbox Code Playgroud) azure autoscaling azure-web-sites azure-app-service-plans azure-web-app-service
使用 Bootstrap 4,您如何获得与标签内联的表单控件输入。我找不到任何关于如何在保持每个表单组响应行和列的同时内联表单控件的示例。
我遇到的问题是标签占据了整个块,我想要一个更紧凑的控件,其中标签与控件位于同一块上,同时每组标签和输入仍位于响应网格中。
<form action="#" autocomplete="nope">
<div class="form-row">
<div class="form-group col-md-4">
<label for="companyName" class="mr-2 col-form-label-sm">Name: </label>
<input type="text" class="form-control form-control-sm" autocomplete="off" name="companyName" id="companyName" placeholder="Company Name" required="" pattern="^.+$" value="">
</div>
<div class="form-group col-md-4">
<label for="version" class="mr-2 col-form-label-sm">Version: </label>
<input type="text" class="form-control form-control-sm" autocomplete="off" name="version" id="version" placeholder="Version" required="" pattern="^.+$" value="">
</div>
<div class="form-group col-md-4">
<label for="notes" class="mr-2 col-form-label-sm">Notes: </label>
<input type="text" class="form-control form-control-sm" autocomplete="off" name="notes" id="notes" placeholder="Notes" pattern="^.+$" value="">
</div>
</div>
<div class="form-row">
<div class="form-group col-lg-12">
<button type="submit" class="btn btn-primary btn-sm">Add</button>
<button type="button" class="btn …Run Code Online (Sandbox Code Playgroud)