SlideShare a Scribd company logo
1 of 49
Taking Care of a Cloud Environment: Windows Azure Maarten BalliauwRealDolmen @maartenballiauwhttp://blog.maartenballiauw.be
Who am I? Maarten Balliauw Antwerp, Belgium www.realdolmen.com Focus on web ASP.NET, ASP.NET MVC, PHP, Azure, VSTS, … MVP ASP.NET http://blog.maartenballiauw.be http://twitter.com/maartenballiauw
Agenda Windows Azure Environment Fabric Controller Windows Azure Guest OS  Fabric Agent Diagnostic Monitor Interacting with the Environment Interacting with the Fabric Monitoring and Diagnostics Management API Bringing it all together: Automatic scaling Takeaways Q&A
Windows Azure Environment Where will my application live?
Windows Azure environment
Fabric Controller Communicates with every server within the Fabric Interacts with a “Fabric Agent” on each machine Monitors every VM, application and instance Service Management is performed by the Fabric Controller
Fabric Controller Manages the life cycle of Azure services Allocates resources Provisioning Deployment Monitoring Manages VM’s and physical machines in the fabric Based on a state machine 1 heartbeat = comparing services’ goal states with the current node states, tries to move node to goal state if possible
Fabric Controller Resource allocation based on # update and fault domains OS features/versions Network channels Available load balancers Resource allocation is transactional Deployments and upgrades Automatically Optional: manual through service portal Maintenance Standard health and failure monitoring Reported by Fabric Agent Discovered by Fabric Controller
Networking VIP automatically registered in load balancers Load balancer traffic only to role instances in goal state Upgrades can be done by VIP swap Web Role VIP Web Role
Windows Azure Environment
Windows Azure Environment Fabric Controller Virtual machine Windows Azure Guest OS (http://bit.ly/aZqSdp)  Fabric agent Diagnostic monitor Your web/worker role instance
Windows Azure Guest OS Based on Windows Server 2008 Enterprise 3 current versions Windows Azure Guest OS 1.0 (Release 200912-01) Windows Azure Guest OS 1.1 (Release 201001-01) Windows Azure Guest OS 1.2 (Release 201003-01) Similar environment as W2K8 server Filesystem Performance counters Event logs ... <ServiceConfigurationserviceName="service-name"osVersion="WA-GUEST-OS-1.2_201003-01">
Fabric Agent Runs on every node Separate process Reports current instance’s operational status to FC Goal state Failures Health
Diagnostic Monitor Runs on every node Separate process Performs automatic and on-demand diagnostics transfer
Interacting with the Fabric What can I do to make the most out of it?
Interacting with the Fabric Trough Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment What it provides... Read the deployment id Read configuration values from ServiceConfiguration.cscfg Get references to local resources Request a recycle of the role instance Capture events Configuration changes Status checks (where FC checks FA) Get the current role instance And a list of all the other role instances in the current role And even a list of all the roles in the deployment (i.e. other web/worker roles)
Use Cases Read the deployment id Can be used to use the Management API Read configuration values Configure your application through ServiceConfiguration.cscfg Allow your configuration to be modified through Windows Azure portal Get references to local resources Local, temporary storage on a role instance Use for caching data Use for temporary file processing ... Request a recycle of the role instance i.e. after a configuration change or a specific event
Use Cases Capture events RoleEnvironment_Changing and RoleEnvironment_Changed Respond to changes in the Environment Configuration change Topology changes RoleEnvironment_StatusCheck Inform fabric controller of the current state Intercept FA status reporting Implement your own status reporting conditions “SetBusy” RoleEnvironment_Stopping What to do when the current role is stopping? I.e. unmount of drives, resource cleanup, ...
Use Cases Get all role instances in the current role Status checks Know about endpoints Inter-role communication?
Inter-Role Communication Demo
Inter-Role Communication Scenario: chat application Users get connected to different worker roles Worker roles should relay messages to other users Implement separate worker roles Internal endpoint Looping other roles and relaying
Monitoring and Diagnostics What is my application doing?
Diagnostics: Single Server vs. the Cloud Single Server Static Environment Single well-known instance Traceable local transactions Local Access Feasible All in one TS session Data & tools co-located In-Place Changes Cloud Dynamic Environment Multi-instance, elastic capacity Distributed transactions Local Access Infeasible Many nodes Distributed, scaled-out data Service Upgrades
Monitoring and Diagnostics Trough Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitor What it provides... API for monitoring & data collection for cloud apps Support standard diagnostics API Manage all role instances or one specific instance Scalable: built on WA storage and used by WA components Developer in control
Windows Azure Diagnostics Configuration Role Instance Role Data collection (traces, logs, crash dumps) Quota enforcement  Diagnostic Monitor Local directory storage Windows Data Sources IIS Logs & Failed Request Logs Perf Counters Windows Event Logs
Windows Azure Diagnostics Request upload Role Instance Windows Azure Storage Role Diagnostic Monitor Local directory storage Windows Data Sources Scheduled or on-demand upload
Windows Azure Diagnostics Development Fabric Windows Azure Hosted Service
Development Fabric Windows Azure Diagnostics Windows Azure Hosted Service Diagnostic Manager Some diagnostics application Controller Code Configure
Feature Summary Local data buffering Configurable trace, perf counter, Windows event log, IIS log & file buffering Local buffer quota management Query & modify config from the cloud or from the desktop per role instance Transfer to WA Storage Scheduled & on-demand Filter by data type, verbosity & time range Transfer completion notification Query & modify from the cloud and from the desktop per role instance
Feature Matrix
Sample: Activate WA Diagnostics // This is done for you automatically by  // Windows Azure Tools for Visual Studio // Add a reference to Microsoft.WindowsAzure.Diagnostics usingMicrosoft.WindowsAzure.Diagnostics;   // Activate diagnostics in the role's OnStart() method publicoverrideboolOnStart() {     // Use the connection string contained in the      // application configuration setting named      // "DiagnosticsConnectionString”       // If the value of this setting is      // "UseDevelopmentStorage=true" then will use dev stg DiagnosticMonitor.Start("DiagnosticsConnectionString");     ... }
Sample: Web.Config Changes <!–     This is automatically inserted by VS.The listener routes  System.Diagnostics.Trace messages to      Windows Azure Diagnostics. --> <system.diagnostics>   <trace>     <listeners>       <addtype="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="AzureDiagnostics">         <filtertype="" />       </add>     </listeners>   </trace> </system.diagnostics>
Sample: Generate Diagnostics Data stringmyRoleInstanceName = RoleEnvironment.CurrentRoleInstance.Id; // Trace with standard .Net tracing APIs System.Diagnostics.Trace.TraceInformation(   "Informational trace from " + myRoleInstanceName);   // Capture full crash dumps CrashDumps.EnableCollection(true); // Capture mini crash dumps CrashDumps.EnableCollection(false);
Sample: Enable Local Data Buffering // Managed traces, IIS logs, failed request logs,  // crashdumps and WA diags internal logs are buffered  // in local storage by default. Other data sources must be  // added explicitly DiagnosticMonitorConfigurationdiagConfig =  DiagnosticMonitor.GetDefaultInitialConfiguration(); // Add performance counter monitoring PerformanceCounterConfigurationprocTimeConfig = new PerformanceCounterConfiguration(); // Run typeperf.exe /q to query for counter names procTimeConfig.CounterSpecifier =    @"rocessor(*) Processor Time"; procTimeConfig.SampleRate = System.TimeSpan.FromSeconds(1.0); diagConfig.PerformanceCounters.DataSources.Add(procTimeConfig); // Continued on next slide...
Sample: Enable Local Data Buffering // Continued from previous slide...   // Add event collection from the Windows Event Log // Syntax: <Channel>!<xpath query>  // http://msdn.microsoft.com/en-us/library/dd996910(VS.85).aspx  diagConfig.WindowsEventLog.DataSources.Add("System!*"); // Restart diagnostics with this custom local buffering  // configuration DiagnosticMonitor.Start(   "DiagnosticsConnectionString",  diagConfig);
Sample: Web.Config Changes <!--     You can optionally enable IIS failed request tracing.     This has some performance overhead     A service upgrade is required to toggle this setting. --> <system.webServer>   <tracing>     <traceFailedRequests>       <addpath="*">         <traceAreas>           <addprovider="ASP"verbosity="Verbose" />           <addprovider="ASPNET" areas="Infrastructure,Module,Page,AppService" verbosity="Verbose" />           <addprovider="ISAPI Extension"verbosity="Verbose"/>           <addprovider="WWW Server"verbosity="Verbose"/>         </traceAreas>         <failureDefinitionsstatusCodes="200-599"/>       </add>     </traceFailedRequests>   </tracing> </system.webServer>
Sample: Scheduled Data Transfer // Start off with the default initial configuration DiagnosticMonitorConfiguration dc = DiagnosticMonitor.GetDefaultInitialConfiguration(); dc.WindowsEventLog.DataSources.Add("Application!*"); dc.WindowsEventLog.ScheduledTransferPeriod =  System.TimeSpan.FromMinutes(5.0); DiagnosticMonitor.Start("DiagnosticsConnectionString", dc);
Sample: On-Demand Data Transfer // On-Demand transfer of buffered files. // This code can live in the role, or on the desktop, // or even in another service. varddm = newDeploymentDiagnosticManager( storageAccount,  deploymentID); varridm = ddm.GetRoleInstanceDiagnosticManager( roleName, roleInstanceName); vardataBuffersToTransfer = DataBufferName.Logs; OnDemandTransferOptionstransferOptions =    newOnDemandTransferOptions(); transferOptions.From = DateTime.MinValue; transferOptions.To = DateTime.UtcNow; transferOptions.LogLevelFilter = LogLevel.Critical; GuidrequestID = ridm.BeginOnDemandTransfer( dataBuffersToTransfer, transferOptions);
Cerebrata Diagnostics Manager Demo
Storage Considerations Standard WA Storage costs apply for transactions, storage & bandwidth Data Retention Local buffers are aged out by the Diagnostic Monitor according to configurable quotas You control data retention for data in table/blob storage You should manage cleanup of this! Query Performance on Tabular Data Partitioned by high-order bits of the tick count Query by time is efficient Filter by verbosity level at transfer time
Common Diagnostic Tasks Performance measurement Resource usage Troubleshooting and debugging Problem detection Quality of Service Metrics Capacity planning Traffic analysis (users, views, peak times) Billing Auditing
Management API How do I manage my deployments?
Management API Trough Microsoft.Samples.WindowsAzure.Management.* What it provides... X509 client certificates for authentication View, create, delete, swap, … deployments Edit configuration (and change instance count) List and view properties for hosted services, storage accounts and affinity groups Also exists as PowerShell scripts Msbuild tasks (CI & auto-deploy anyone?)
Using the management API
Auto-Scaling Bringing it all together
Auto-Scaling As easy as doing this? Unfortunately: no… “When” should it scale? “How” should it scale? “Who” / “What” is responsible for scaling? <InstancesminInstances="3" maxInstances="10" />
Auto-Scaling – “When” Different for every application Based on performance counters Based on queue length / workload Based on the weather? Weight of metrics Trends in metric data Answer: “Sensors” “Scaling logic provider”
Auto-Scaling - Sensors Sensors provide metrics and trend Performance counter Queue length Custom
Auto-Scaling – “How” Average topology change takes up to 15 minutes What if your load goes up too fast? Weight of metrics Trends in metric data Answer: “Scaling logic provider”

More Related Content

What's hot

Reactive Programming in Java 8 with Rx-Java
Reactive Programming in Java 8 with Rx-JavaReactive Programming in Java 8 with Rx-Java
Reactive Programming in Java 8 with Rx-JavaKasun Indrasiri
 
Sitecore 7: A developers quest to mastering unit testing
Sitecore 7: A developers quest to mastering unit testingSitecore 7: A developers quest to mastering unit testing
Sitecore 7: A developers quest to mastering unit testingnonlinear creations
 
Serverless APIs, the Good, the Bad and the Ugly (2019-09-19)
Serverless APIs, the Good, the Bad and the Ugly (2019-09-19)Serverless APIs, the Good, the Bad and the Ugly (2019-09-19)
Serverless APIs, the Good, the Bad and the Ugly (2019-09-19)Paco de la Cruz
 
Springboot2 postgresql-jpa-hibernate-crud-example with test
Springboot2 postgresql-jpa-hibernate-crud-example with testSpringboot2 postgresql-jpa-hibernate-crud-example with test
Springboot2 postgresql-jpa-hibernate-crud-example with testHyukSun Kwon
 
Arquillian Constellation
Arquillian ConstellationArquillian Constellation
Arquillian ConstellationAlex Soto
 
A fresh look at Java Enterprise Application testing with Arquillian
A fresh look at Java Enterprise Application testing with ArquillianA fresh look at Java Enterprise Application testing with Arquillian
A fresh look at Java Enterprise Application testing with ArquillianVineet Reynolds
 

What's hot (10)

Reactive Programming in Java 8 with Rx-Java
Reactive Programming in Java 8 with Rx-JavaReactive Programming in Java 8 with Rx-Java
Reactive Programming in Java 8 with Rx-Java
 
Struts2 - 101
Struts2 - 101Struts2 - 101
Struts2 - 101
 
Sitecore 7: A developers quest to mastering unit testing
Sitecore 7: A developers quest to mastering unit testingSitecore 7: A developers quest to mastering unit testing
Sitecore 7: A developers quest to mastering unit testing
 
Forgive me for i have allocated
Forgive me for i have allocatedForgive me for i have allocated
Forgive me for i have allocated
 
Serverless APIs, the Good, the Bad and the Ugly (2019-09-19)
Serverless APIs, the Good, the Bad and the Ugly (2019-09-19)Serverless APIs, the Good, the Bad and the Ugly (2019-09-19)
Serverless APIs, the Good, the Bad and the Ugly (2019-09-19)
 
Tdd iPhone For Dummies
Tdd iPhone For DummiesTdd iPhone For Dummies
Tdd iPhone For Dummies
 
AWS Java SDK @ scale
AWS Java SDK @ scaleAWS Java SDK @ scale
AWS Java SDK @ scale
 
Springboot2 postgresql-jpa-hibernate-crud-example with test
Springboot2 postgresql-jpa-hibernate-crud-example with testSpringboot2 postgresql-jpa-hibernate-crud-example with test
Springboot2 postgresql-jpa-hibernate-crud-example with test
 
Arquillian Constellation
Arquillian ConstellationArquillian Constellation
Arquillian Constellation
 
A fresh look at Java Enterprise Application testing with Arquillian
A fresh look at Java Enterprise Application testing with ArquillianA fresh look at Java Enterprise Application testing with Arquillian
A fresh look at Java Enterprise Application testing with Arquillian
 

Viewers also liked

Sherlock Homepage - A detective story about running large web services (VISUG...
Sherlock Homepage - A detective story about running large web services (VISUG...Sherlock Homepage - A detective story about running large web services (VISUG...
Sherlock Homepage - A detective story about running large web services (VISUG...Maarten Balliauw
 
Sherlock Homepage - A detective story about running large web services - WebN...
Sherlock Homepage - A detective story about running large web services - WebN...Sherlock Homepage - A detective story about running large web services - WebN...
Sherlock Homepage - A detective story about running large web services - WebN...Maarten Balliauw
 
DNS for Developers - NDC Oslo 2016
DNS for Developers - NDC Oslo 2016DNS for Developers - NDC Oslo 2016
DNS for Developers - NDC Oslo 2016Maarten Balliauw
 
Sherlock Homepage - A detective story about running large web services - NDC ...
Sherlock Homepage - A detective story about running large web services - NDC ...Sherlock Homepage - A detective story about running large web services - NDC ...
Sherlock Homepage - A detective story about running large web services - NDC ...Maarten Balliauw
 
Social Media @ BASF
Social Media @ BASFSocial Media @ BASF
Social Media @ BASFBASF
 
10 performance and scalability secrets of ASP.NET websites
10 performance and scalability secrets of ASP.NET websites10 performance and scalability secrets of ASP.NET websites
10 performance and scalability secrets of ASP.NET websitesoazabir
 

Viewers also liked (6)

Sherlock Homepage - A detective story about running large web services (VISUG...
Sherlock Homepage - A detective story about running large web services (VISUG...Sherlock Homepage - A detective story about running large web services (VISUG...
Sherlock Homepage - A detective story about running large web services (VISUG...
 
Sherlock Homepage - A detective story about running large web services - WebN...
Sherlock Homepage - A detective story about running large web services - WebN...Sherlock Homepage - A detective story about running large web services - WebN...
Sherlock Homepage - A detective story about running large web services - WebN...
 
DNS for Developers - NDC Oslo 2016
DNS for Developers - NDC Oslo 2016DNS for Developers - NDC Oslo 2016
DNS for Developers - NDC Oslo 2016
 
Sherlock Homepage - A detective story about running large web services - NDC ...
Sherlock Homepage - A detective story about running large web services - NDC ...Sherlock Homepage - A detective story about running large web services - NDC ...
Sherlock Homepage - A detective story about running large web services - NDC ...
 
Social Media @ BASF
Social Media @ BASFSocial Media @ BASF
Social Media @ BASF
 
10 performance and scalability secrets of ASP.NET websites
10 performance and scalability secrets of ASP.NET websites10 performance and scalability secrets of ASP.NET websites
10 performance and scalability secrets of ASP.NET websites
 

Similar to Taking care of a cloud environment

Microsoft Windows Azure - Diagnostics Presentation
Microsoft Windows Azure - Diagnostics PresentationMicrosoft Windows Azure - Diagnostics Presentation
Microsoft Windows Azure - Diagnostics PresentationMicrosoft Private Cloud
 
Inside Azure Diagnostics (DevLink 2014)
Inside Azure Diagnostics (DevLink 2014)Inside Azure Diagnostics (DevLink 2014)
Inside Azure Diagnostics (DevLink 2014)Michael Collier
 
Fabric - Realtime stream processing framework
Fabric - Realtime stream processing frameworkFabric - Realtime stream processing framework
Fabric - Realtime stream processing frameworkShashank Gautam
 
Sherlock Homepage (Maarten Balliauw)
Sherlock Homepage (Maarten Balliauw)Sherlock Homepage (Maarten Balliauw)
Sherlock Homepage (Maarten Balliauw)Visug
 
Inside Azure Diagnostics
Inside Azure DiagnosticsInside Azure Diagnostics
Inside Azure DiagnosticsMichael Collier
 
Msdn Workflow Services And Windows Server App Fabric
Msdn Workflow Services And Windows Server App FabricMsdn Workflow Services And Windows Server App Fabric
Msdn Workflow Services And Windows Server App FabricJuan Pablo
 
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...Ivanti
 
Spark Streaming Recipes and "Exactly Once" Semantics Revised
Spark Streaming Recipes and "Exactly Once" Semantics RevisedSpark Streaming Recipes and "Exactly Once" Semantics Revised
Spark Streaming Recipes and "Exactly Once" Semantics RevisedMichael Spector
 
Java on Windows Azure
Java on Windows AzureJava on Windows Azure
Java on Windows AzureDavid Chou
 
CloudConnect 2011 - Building Highly Scalable Java Applications on Windows Azure
CloudConnect 2011 - Building Highly Scalable Java Applications on Windows AzureCloudConnect 2011 - Building Highly Scalable Java Applications on Windows Azure
CloudConnect 2011 - Building Highly Scalable Java Applications on Windows AzureDavid Chou
 
Windows Server AppFabric Caching - What it is & when you should use it?
Windows Server AppFabric Caching - What it is & when you should use it?Windows Server AppFabric Caching - What it is & when you should use it?
Windows Server AppFabric Caching - What it is & when you should use it?Robert MacLean
 
State management
State managementState management
State managementteach4uin
 
Amazon EC2 Systems Manager for Hybrid Cloud Management at Scale
Amazon EC2 Systems Manager for Hybrid Cloud Management at ScaleAmazon EC2 Systems Manager for Hybrid Cloud Management at Scale
Amazon EC2 Systems Manager for Hybrid Cloud Management at ScaleAmazon Web Services
 

Similar to Taking care of a cloud environment (20)

Microsoft Windows Azure - Diagnostics Presentation
Microsoft Windows Azure - Diagnostics PresentationMicrosoft Windows Azure - Diagnostics Presentation
Microsoft Windows Azure - Diagnostics Presentation
 
Inside Azure Diagnostics (DevLink 2014)
Inside Azure Diagnostics (DevLink 2014)Inside Azure Diagnostics (DevLink 2014)
Inside Azure Diagnostics (DevLink 2014)
 
Fabric - Realtime stream processing framework
Fabric - Realtime stream processing frameworkFabric - Realtime stream processing framework
Fabric - Realtime stream processing framework
 
PDC Highlights
PDC HighlightsPDC Highlights
PDC Highlights
 
Sherlock Homepage (Maarten Balliauw)
Sherlock Homepage (Maarten Balliauw)Sherlock Homepage (Maarten Balliauw)
Sherlock Homepage (Maarten Balliauw)
 
Beyond Unit Testing
Beyond Unit TestingBeyond Unit Testing
Beyond Unit Testing
 
Inside Azure Diagnostics
Inside Azure DiagnosticsInside Azure Diagnostics
Inside Azure Diagnostics
 
Msdn Workflow Services And Windows Server App Fabric
Msdn Workflow Services And Windows Server App FabricMsdn Workflow Services And Windows Server App Fabric
Msdn Workflow Services And Windows Server App Fabric
 
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
 
Spark Streaming Recipes and "Exactly Once" Semantics Revised
Spark Streaming Recipes and "Exactly Once" Semantics RevisedSpark Streaming Recipes and "Exactly Once" Semantics Revised
Spark Streaming Recipes and "Exactly Once" Semantics Revised
 
2310 b 15
2310 b 152310 b 15
2310 b 15
 
2310 b 15
2310 b 152310 b 15
2310 b 15
 
Java on Windows Azure
Java on Windows AzureJava on Windows Azure
Java on Windows Azure
 
CloudConnect 2011 - Building Highly Scalable Java Applications on Windows Azure
CloudConnect 2011 - Building Highly Scalable Java Applications on Windows AzureCloudConnect 2011 - Building Highly Scalable Java Applications on Windows Azure
CloudConnect 2011 - Building Highly Scalable Java Applications on Windows Azure
 
TO Hack an ASP .NET website?
TO Hack an ASP .NET website?  TO Hack an ASP .NET website?
TO Hack an ASP .NET website?
 
Hack ASP.NET website
Hack ASP.NET websiteHack ASP.NET website
Hack ASP.NET website
 
Windows Server AppFabric Caching - What it is & when you should use it?
Windows Server AppFabric Caching - What it is & when you should use it?Windows Server AppFabric Caching - What it is & when you should use it?
Windows Server AppFabric Caching - What it is & when you should use it?
 
State management
State managementState management
State management
 
Amazon EC2 Systems Manager for Hybrid Cloud Management at Scale
Amazon EC2 Systems Manager for Hybrid Cloud Management at ScaleAmazon EC2 Systems Manager for Hybrid Cloud Management at Scale
Amazon EC2 Systems Manager for Hybrid Cloud Management at Scale
 
About QTP 9.2
About QTP 9.2About QTP 9.2
About QTP 9.2
 

More from Maarten Balliauw

Bringing nullability into existing code - dammit is not the answer.pptx
Bringing nullability into existing code - dammit is not the answer.pptxBringing nullability into existing code - dammit is not the answer.pptx
Bringing nullability into existing code - dammit is not the answer.pptxMaarten Balliauw
 
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...Maarten Balliauw
 
Building a friendly .NET SDK to connect to Space
Building a friendly .NET SDK to connect to SpaceBuilding a friendly .NET SDK to connect to Space
Building a friendly .NET SDK to connect to SpaceMaarten Balliauw
 
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...Maarten Balliauw
 
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...Maarten Balliauw
 
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...Maarten Balliauw
 
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...Maarten Balliauw
 
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se....NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...Maarten Balliauw
 
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...Maarten Balliauw
 
NDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and Search
NDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and SearchNDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and Search
NDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and SearchMaarten Balliauw
 
Approaches for application request throttling - Cloud Developer Days Poland
Approaches for application request throttling - Cloud Developer Days PolandApproaches for application request throttling - Cloud Developer Days Poland
Approaches for application request throttling - Cloud Developer Days PolandMaarten Balliauw
 
Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...
Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...
Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...Maarten Balliauw
 
Approaches for application request throttling - dotNetCologne
Approaches for application request throttling - dotNetCologneApproaches for application request throttling - dotNetCologne
Approaches for application request throttling - dotNetCologneMaarten Balliauw
 
CodeStock - Exploring .NET memory management - a trip down memory lane
CodeStock - Exploring .NET memory management - a trip down memory laneCodeStock - Exploring .NET memory management - a trip down memory lane
CodeStock - Exploring .NET memory management - a trip down memory laneMaarten Balliauw
 
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...Maarten Balliauw
 
ConFoo Montreal - Approaches for application request throttling
ConFoo Montreal - Approaches for application request throttlingConFoo Montreal - Approaches for application request throttling
ConFoo Montreal - Approaches for application request throttlingMaarten Balliauw
 
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...Maarten Balliauw
 
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...Maarten Balliauw
 
DotNetFest - Let’s refresh our memory! Memory management in .NET
DotNetFest - Let’s refresh our memory! Memory management in .NETDotNetFest - Let’s refresh our memory! Memory management in .NET
DotNetFest - Let’s refresh our memory! Memory management in .NETMaarten Balliauw
 
VISUG - Approaches for application request throttling
VISUG - Approaches for application request throttlingVISUG - Approaches for application request throttling
VISUG - Approaches for application request throttlingMaarten Balliauw
 

More from Maarten Balliauw (20)

Bringing nullability into existing code - dammit is not the answer.pptx
Bringing nullability into existing code - dammit is not the answer.pptxBringing nullability into existing code - dammit is not the answer.pptx
Bringing nullability into existing code - dammit is not the answer.pptx
 
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...
 
Building a friendly .NET SDK to connect to Space
Building a friendly .NET SDK to connect to SpaceBuilding a friendly .NET SDK to connect to Space
Building a friendly .NET SDK to connect to Space
 
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
 
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...
 
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
 
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...
 
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se....NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...
 
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...
 
NDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and Search
NDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and SearchNDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and Search
NDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and Search
 
Approaches for application request throttling - Cloud Developer Days Poland
Approaches for application request throttling - Cloud Developer Days PolandApproaches for application request throttling - Cloud Developer Days Poland
Approaches for application request throttling - Cloud Developer Days Poland
 
Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...
Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...
Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...
 
Approaches for application request throttling - dotNetCologne
Approaches for application request throttling - dotNetCologneApproaches for application request throttling - dotNetCologne
Approaches for application request throttling - dotNetCologne
 
CodeStock - Exploring .NET memory management - a trip down memory lane
CodeStock - Exploring .NET memory management - a trip down memory laneCodeStock - Exploring .NET memory management - a trip down memory lane
CodeStock - Exploring .NET memory management - a trip down memory lane
 
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
 
ConFoo Montreal - Approaches for application request throttling
ConFoo Montreal - Approaches for application request throttlingConFoo Montreal - Approaches for application request throttling
ConFoo Montreal - Approaches for application request throttling
 
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
 
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
 
DotNetFest - Let’s refresh our memory! Memory management in .NET
DotNetFest - Let’s refresh our memory! Memory management in .NETDotNetFest - Let’s refresh our memory! Memory management in .NET
DotNetFest - Let’s refresh our memory! Memory management in .NET
 
VISUG - Approaches for application request throttling
VISUG - Approaches for application request throttlingVISUG - Approaches for application request throttling
VISUG - Approaches for application request throttling
 

Recently uploaded

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 

Recently uploaded (20)

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 

Taking care of a cloud environment

  • 1. Taking Care of a Cloud Environment: Windows Azure Maarten BalliauwRealDolmen @maartenballiauwhttp://blog.maartenballiauw.be
  • 2. Who am I? Maarten Balliauw Antwerp, Belgium www.realdolmen.com Focus on web ASP.NET, ASP.NET MVC, PHP, Azure, VSTS, … MVP ASP.NET http://blog.maartenballiauw.be http://twitter.com/maartenballiauw
  • 3. Agenda Windows Azure Environment Fabric Controller Windows Azure Guest OS Fabric Agent Diagnostic Monitor Interacting with the Environment Interacting with the Fabric Monitoring and Diagnostics Management API Bringing it all together: Automatic scaling Takeaways Q&A
  • 4. Windows Azure Environment Where will my application live?
  • 6. Fabric Controller Communicates with every server within the Fabric Interacts with a “Fabric Agent” on each machine Monitors every VM, application and instance Service Management is performed by the Fabric Controller
  • 7. Fabric Controller Manages the life cycle of Azure services Allocates resources Provisioning Deployment Monitoring Manages VM’s and physical machines in the fabric Based on a state machine 1 heartbeat = comparing services’ goal states with the current node states, tries to move node to goal state if possible
  • 8. Fabric Controller Resource allocation based on # update and fault domains OS features/versions Network channels Available load balancers Resource allocation is transactional Deployments and upgrades Automatically Optional: manual through service portal Maintenance Standard health and failure monitoring Reported by Fabric Agent Discovered by Fabric Controller
  • 9. Networking VIP automatically registered in load balancers Load balancer traffic only to role instances in goal state Upgrades can be done by VIP swap Web Role VIP Web Role
  • 11. Windows Azure Environment Fabric Controller Virtual machine Windows Azure Guest OS (http://bit.ly/aZqSdp) Fabric agent Diagnostic monitor Your web/worker role instance
  • 12. Windows Azure Guest OS Based on Windows Server 2008 Enterprise 3 current versions Windows Azure Guest OS 1.0 (Release 200912-01) Windows Azure Guest OS 1.1 (Release 201001-01) Windows Azure Guest OS 1.2 (Release 201003-01) Similar environment as W2K8 server Filesystem Performance counters Event logs ... <ServiceConfigurationserviceName="service-name"osVersion="WA-GUEST-OS-1.2_201003-01">
  • 13. Fabric Agent Runs on every node Separate process Reports current instance’s operational status to FC Goal state Failures Health
  • 14. Diagnostic Monitor Runs on every node Separate process Performs automatic and on-demand diagnostics transfer
  • 15. Interacting with the Fabric What can I do to make the most out of it?
  • 16. Interacting with the Fabric Trough Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment What it provides... Read the deployment id Read configuration values from ServiceConfiguration.cscfg Get references to local resources Request a recycle of the role instance Capture events Configuration changes Status checks (where FC checks FA) Get the current role instance And a list of all the other role instances in the current role And even a list of all the roles in the deployment (i.e. other web/worker roles)
  • 17. Use Cases Read the deployment id Can be used to use the Management API Read configuration values Configure your application through ServiceConfiguration.cscfg Allow your configuration to be modified through Windows Azure portal Get references to local resources Local, temporary storage on a role instance Use for caching data Use for temporary file processing ... Request a recycle of the role instance i.e. after a configuration change or a specific event
  • 18. Use Cases Capture events RoleEnvironment_Changing and RoleEnvironment_Changed Respond to changes in the Environment Configuration change Topology changes RoleEnvironment_StatusCheck Inform fabric controller of the current state Intercept FA status reporting Implement your own status reporting conditions “SetBusy” RoleEnvironment_Stopping What to do when the current role is stopping? I.e. unmount of drives, resource cleanup, ...
  • 19. Use Cases Get all role instances in the current role Status checks Know about endpoints Inter-role communication?
  • 21. Inter-Role Communication Scenario: chat application Users get connected to different worker roles Worker roles should relay messages to other users Implement separate worker roles Internal endpoint Looping other roles and relaying
  • 22. Monitoring and Diagnostics What is my application doing?
  • 23. Diagnostics: Single Server vs. the Cloud Single Server Static Environment Single well-known instance Traceable local transactions Local Access Feasible All in one TS session Data & tools co-located In-Place Changes Cloud Dynamic Environment Multi-instance, elastic capacity Distributed transactions Local Access Infeasible Many nodes Distributed, scaled-out data Service Upgrades
  • 24. Monitoring and Diagnostics Trough Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitor What it provides... API for monitoring & data collection for cloud apps Support standard diagnostics API Manage all role instances or one specific instance Scalable: built on WA storage and used by WA components Developer in control
  • 25. Windows Azure Diagnostics Configuration Role Instance Role Data collection (traces, logs, crash dumps) Quota enforcement Diagnostic Monitor Local directory storage Windows Data Sources IIS Logs & Failed Request Logs Perf Counters Windows Event Logs
  • 26. Windows Azure Diagnostics Request upload Role Instance Windows Azure Storage Role Diagnostic Monitor Local directory storage Windows Data Sources Scheduled or on-demand upload
  • 27. Windows Azure Diagnostics Development Fabric Windows Azure Hosted Service
  • 28. Development Fabric Windows Azure Diagnostics Windows Azure Hosted Service Diagnostic Manager Some diagnostics application Controller Code Configure
  • 29. Feature Summary Local data buffering Configurable trace, perf counter, Windows event log, IIS log & file buffering Local buffer quota management Query & modify config from the cloud or from the desktop per role instance Transfer to WA Storage Scheduled & on-demand Filter by data type, verbosity & time range Transfer completion notification Query & modify from the cloud and from the desktop per role instance
  • 31. Sample: Activate WA Diagnostics // This is done for you automatically by // Windows Azure Tools for Visual Studio // Add a reference to Microsoft.WindowsAzure.Diagnostics usingMicrosoft.WindowsAzure.Diagnostics;   // Activate diagnostics in the role's OnStart() method publicoverrideboolOnStart() { // Use the connection string contained in the // application configuration setting named // "DiagnosticsConnectionString” // If the value of this setting is // "UseDevelopmentStorage=true" then will use dev stg DiagnosticMonitor.Start("DiagnosticsConnectionString"); ... }
  • 32. Sample: Web.Config Changes <!– This is automatically inserted by VS.The listener routes System.Diagnostics.Trace messages to Windows Azure Diagnostics. --> <system.diagnostics> <trace> <listeners> <addtype="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="AzureDiagnostics"> <filtertype="" /> </add> </listeners> </trace> </system.diagnostics>
  • 33. Sample: Generate Diagnostics Data stringmyRoleInstanceName = RoleEnvironment.CurrentRoleInstance.Id; // Trace with standard .Net tracing APIs System.Diagnostics.Trace.TraceInformation( "Informational trace from " + myRoleInstanceName);   // Capture full crash dumps CrashDumps.EnableCollection(true); // Capture mini crash dumps CrashDumps.EnableCollection(false);
  • 34. Sample: Enable Local Data Buffering // Managed traces, IIS logs, failed request logs, // crashdumps and WA diags internal logs are buffered // in local storage by default. Other data sources must be // added explicitly DiagnosticMonitorConfigurationdiagConfig = DiagnosticMonitor.GetDefaultInitialConfiguration(); // Add performance counter monitoring PerformanceCounterConfigurationprocTimeConfig = new PerformanceCounterConfiguration(); // Run typeperf.exe /q to query for counter names procTimeConfig.CounterSpecifier = @"rocessor(*) Processor Time"; procTimeConfig.SampleRate = System.TimeSpan.FromSeconds(1.0); diagConfig.PerformanceCounters.DataSources.Add(procTimeConfig); // Continued on next slide...
  • 35. Sample: Enable Local Data Buffering // Continued from previous slide...   // Add event collection from the Windows Event Log // Syntax: <Channel>!<xpath query> // http://msdn.microsoft.com/en-us/library/dd996910(VS.85).aspx diagConfig.WindowsEventLog.DataSources.Add("System!*"); // Restart diagnostics with this custom local buffering // configuration DiagnosticMonitor.Start( "DiagnosticsConnectionString", diagConfig);
  • 36. Sample: Web.Config Changes <!-- You can optionally enable IIS failed request tracing. This has some performance overhead A service upgrade is required to toggle this setting. --> <system.webServer> <tracing> <traceFailedRequests> <addpath="*"> <traceAreas> <addprovider="ASP"verbosity="Verbose" /> <addprovider="ASPNET" areas="Infrastructure,Module,Page,AppService" verbosity="Verbose" /> <addprovider="ISAPI Extension"verbosity="Verbose"/> <addprovider="WWW Server"verbosity="Verbose"/> </traceAreas> <failureDefinitionsstatusCodes="200-599"/> </add> </traceFailedRequests> </tracing> </system.webServer>
  • 37. Sample: Scheduled Data Transfer // Start off with the default initial configuration DiagnosticMonitorConfiguration dc = DiagnosticMonitor.GetDefaultInitialConfiguration(); dc.WindowsEventLog.DataSources.Add("Application!*"); dc.WindowsEventLog.ScheduledTransferPeriod = System.TimeSpan.FromMinutes(5.0); DiagnosticMonitor.Start("DiagnosticsConnectionString", dc);
  • 38. Sample: On-Demand Data Transfer // On-Demand transfer of buffered files. // This code can live in the role, or on the desktop, // or even in another service. varddm = newDeploymentDiagnosticManager( storageAccount, deploymentID); varridm = ddm.GetRoleInstanceDiagnosticManager( roleName, roleInstanceName); vardataBuffersToTransfer = DataBufferName.Logs; OnDemandTransferOptionstransferOptions = newOnDemandTransferOptions(); transferOptions.From = DateTime.MinValue; transferOptions.To = DateTime.UtcNow; transferOptions.LogLevelFilter = LogLevel.Critical; GuidrequestID = ridm.BeginOnDemandTransfer( dataBuffersToTransfer, transferOptions);
  • 40. Storage Considerations Standard WA Storage costs apply for transactions, storage & bandwidth Data Retention Local buffers are aged out by the Diagnostic Monitor according to configurable quotas You control data retention for data in table/blob storage You should manage cleanup of this! Query Performance on Tabular Data Partitioned by high-order bits of the tick count Query by time is efficient Filter by verbosity level at transfer time
  • 41. Common Diagnostic Tasks Performance measurement Resource usage Troubleshooting and debugging Problem detection Quality of Service Metrics Capacity planning Traffic analysis (users, views, peak times) Billing Auditing
  • 42. Management API How do I manage my deployments?
  • 43. Management API Trough Microsoft.Samples.WindowsAzure.Management.* What it provides... X509 client certificates for authentication View, create, delete, swap, … deployments Edit configuration (and change instance count) List and view properties for hosted services, storage accounts and affinity groups Also exists as PowerShell scripts Msbuild tasks (CI & auto-deploy anyone?)
  • 45. Auto-Scaling Bringing it all together
  • 46. Auto-Scaling As easy as doing this? Unfortunately: no… “When” should it scale? “How” should it scale? “Who” / “What” is responsible for scaling? <InstancesminInstances="3" maxInstances="10" />
  • 47. Auto-Scaling – “When” Different for every application Based on performance counters Based on queue length / workload Based on the weather? Weight of metrics Trends in metric data Answer: “Sensors” “Scaling logic provider”
  • 48. Auto-Scaling - Sensors Sensors provide metrics and trend Performance counter Queue length Custom
  • 49. Auto-Scaling – “How” Average topology change takes up to 15 minutes What if your load goes up too fast? Weight of metrics Trends in metric data Answer: “Scaling logic provider”
  • 50. Auto-Scaling – Scaling logic Scaling logic provider uses sensor data to suggest an action (up/fast-up/down/stable) To implement per application Just a suggestion!
  • 51. Auto-Scaling – “Who”/”What” A dedicated server / worker role? At least two workers for WA SLA: costs! The application itself? Master election (which role instance responsible?) Answer: Approach will differ per application…
  • 52. Auto-Scaling - Responsabilities More approaches are possible Dedicated worker On-premise monitoring app The app itself Master election based on RoleEnvironment.Roles
  • 54. Auto-Scaling Demo Scaling based on custom sensor # users logged in Monitoring done by the app itself Which brings everything together: Master election  Role Environment Performance counters  Diagnostics API Queue length  Storage API Scaling (changing # instances in config)  Management API
  • 55. Takeaways What to remember?
  • 56. Takeaways Windows Azure Environment components Fabric Controller Windows Azure Guest OS Fabric Agent Diagnostic Monitor All components provide interaction Interacting with the Fabric Monitoring and Diagnostics Management API Bringing it all together gives you power!

Editor's Notes

  1. http://snarfed.org/space/windows_azure_detailshttp://azure.snagy.name/blog/?p=93