2012-11-28 2 views
3

푸른 대기열의 길이에 따라 내 푸른 작업자 역할을 자동 조절하려고합니다. 모든 documentation에 따르면이 방법은 queueLength 피연산자를 사용하여 매우 간단해야합니다.대기열 길이에 따른 Azure 자동 크기 조절

autoscaler를 구현하고이를 내 서비스에 업로드하고 많은 수의 요소를 대기열에 추가했지만 인스턴스 수가 증가하지 않습니다.

문제를 해결하는 가장 좋은 방법은 무엇입니까? 원격으로 데스크 톱으로 역할을했는데 이벤트 로그에는 아무 것도 없습니다. 내가 확인할 수있는 이벤트/오류 자동 조정에 대한 로그가 있습니까?

편집 : 내 dev 환경에서 응용 프로그램을 실행할 때 autscaler가 ServiceInfo.xml을 성공적으로로드 한 것으로 나타납니다. 대기열 항목과 역할 항목이 있습니다. 그러나 rules.xml 파일에서 규칙이로드 된 것으로 나타나지 않습니다.

기타 편집 : rules.xml 파일에서 reactiverules 및 operands 노드를 제거하면 제약 조건 규칙이 성공적으로로드됩니다. 문제는 그 노드 중 하나에 있습니다.

내 서비스 정보 부 (ServiceInfo) XML 파일 :

<?xml version="1.0" encoding="utf-8"?> 
<serviceModel xmlns="http://schemas.microsoft.com/practices/2011/entlib/autoscaling/serviceModel"> 
    <subscriptions> 
<subscription name="MySubscription" subscriptionId="blah" certificateThumbprint="‎blah" certificateStoreName="My" certificateStoreLocation="CurrentUser"> 
     <storageAccounts> 
     <storageAccount alias="targetstorage" connectionString="DefaultEndpointsProtocol=https;AccountName=blah; AccountKey="blah"> 
      <queues> 
      <queue alias="auditqueue" queueName="auditqueue"/> 
      </queues> 
     </storageAccount> 
     </storageAccounts> 
     <services> 
     <service dnsPrefix="blah" slot="Production" scalingMode="Scale"> 
      <roles> 
      <role alias="ScalingWebRole" roleName="ScalingWebRole" wadStorageAccountName="targetstorage" /> 
      </roles> 
     </service> 
     </services> 
    </subscription> 
    </subscriptions> 
</serviceModel> 

내 규칙 XML 파일 :

<constraintRules> 

    <rule name="Default" enabled="true" rank="1"> 
     <actions> 
     <range target="ScalingWebRole" min="1" max="10" /> 
     </actions> 
    </rule> 

    </constraintRules> 

    <reactiveRules> 

    <rule name="Scale up when queue is long" enabled="true"> 
     <actions> 
     <scale target="ScalingWebRole" by="1" /> 
     </actions> 
     <when> 
     <greaterOrEqual operand="QueueLength_Avg" than="5" /> 
     </when> 
    </rule> 

    <rule name="Scale down when queue is short" enabled="true"> 
     <actions> 
     <scale target="ScalingWebRole" by="-1" /> 
     </actions> 
     <when> 
     <less operand="QueueLength_Avg" than="5" /> 
     </when> 
    </rule> 

    </reactiveRules> 

    <operands> 
    <queueLength alias="QueueLength_Avg" aggregate="Average" queue="auditqueue" timespan="00:01:00" /> 
    </operands> 

</rules> 

답변

1

진단 도구 (줄리안 도밍 게즈 감사)의 도움을 받아 처음 자동 크기 조정 블록이 대기열 길이를 확인하기 위해 서비스를 시작하려고 시도했을 때 실패했습니다. 이는 시스템이 LocalMachine 저장소가 아닌 CurrentUser 저장소에서 인증서를 찾고 있었기 때문입니다.

일단 구성에서 해당 설정을 변경하면 작동하기 시작합니다.

4

와사비 진단 많은 정보를 게시,하지만 당신은 그것을 활성화해야합니다. 역할에서 당신이 autoscaler가 있습니다 .BREAK를 호스팅하는 경우, 다음을 포함하는의 app.config를 업데이트

<system.diagnostics> 
    <sources> 
     <source name="Autoscaling General" switchValue="All"> 
     <listeners> 
      <add name="AzureDiag" /> 
     </listeners> 
     </source> 
     <source name="Autoscaling Updates" switchValue="All"> 
     <listeners> 
     <add name="AzureDiag" /> 
     </listeners> 
     </source> 
    </sources> 
    <sharedListeners> 
     <add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" 
      name="AzureDiag"/> 
    </sharedListeners> 
    <trace> 
     <listeners> 
     <add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" 
      name="AzureDiagnostics"> 
      <filter type="" /> 
     </add> 
     </listeners> 
    </trace> 
    </system.diagnostics> 

다음, 당신의 역할이 뭉치 테이블 (윈도우 Azure 진단 테이블)에 로그 항목을 업로드하도록 구성된 경우, 해당 항목이 표시됩니다.

와사비가 생성하는 로그 항목에 대한 추가 정보는 here입니다.

+0

감사합니다. 나는 그것을 나의 설정에 추가했다. 그러나 그것은 진단을 쓰지 않고있다 (내가 말할 수있는 한). 다른 생각? – Mac