Design the application architecture - Objective 1.3: Design and implement the Windows Azure role life cycle Flashcards
What are the three different types of solutions offered in Windows Azure?
Virtual machines, web sites and cloud services.
What does a Windows Azure virtual machine provide?
The same functionality as any virtual machine hosted locally.
What does a Windows Azure web site provide?
A way to host ASP.Net web sites without the overhead of maintaining a virtual machine along with automatic scalability, fast deployment and almost immediate startup.
What does a Windows Azure cloud service provide?
It is the original Windows Azure Platform as a Service (PaaS) offering.
What are Windows Azure startup tasks?
They are actions that are performed before a role starts.
What are the three types of roles in Windows Azure?
Web, worker and VM
If you are simply going to run a web site in IIS in Windows Azure, which role should you use?
Web role
If you are going to run a middle-tier application without IIS in Windows Azure, which role should you use?
Worker role
Which Windows Azure roles can use startup tasks?
Web and worker roles
Where are startup tasks defined?
In the Task element of the Startup element of the ServiceDefinition.csdef file
When do startup tasks run?
Whenever a role recycles or a server reboots.
What error code must a startup task return before the startup process will complete successfully?
Zero
What happens when a startup task returns a non-zero error code?
The role does not start
When multiple startup tasks are defined for a role, how are they executed in relation to each other?
They are executed according to their taskType attribute. Simple tasks are executed synchronously. Background and foreground tasks are started asynchronously in parallel to the startup of the role.
Which tool is used in Windows Azure to manage IIS settings at startup?
AppCmd.exe
Why should you take care in modifying the web.config section in the startup task?
Startup tasks can be run more than once and modifying the web.config file could cause runtime errors.
An example would be adding a section to the web.config file which when run more than once would cause a runtime error.
What is the error code returned from AppCmd.exe when you try to add the same section to the web.config file more than once?
183
What is the error code returned from AppCmd.exe when you get an “Access Denied” error?
5
What types of programs can startup tasks run?
Executables, batch files and PowerShell scripts.
In Windows Azure, how are application pools normally named?
They are usually named with a GUID
In Windows Azure, how are web sites typically named?
rolename_roleinstancenumber
This ensures each website name is different for each version of the role.
In Windows Azure, why must registry changes be added to startup tasks?
Windows Azure virtual machines are stateless and the registry changes would not be saved when the role restarts.
In Windows Azure, how do you install third-party applications that your web site may depend on?
They must be installed with startup tasks.
What 6 steps are taken when a role starts?
- Instance is marked as Starting. It will no longer receive traffic.
- Startup tasks are executed according to their taskType attribute: Simple tasks are executed synchronously. Background and foreground tasks are started asynchronously. This is in parallel with the startup task.
- The role host process is started and the site is created in IIS.
- The task calls the Microsoft.WindowsAzure.ServiceRuntime.RoleEntryPoint.OnStart method.
- The instance is marked as Ready and trafic is routed to the instance.
- The task calls the Microsoft.WindowsAzure.ServiceRuntime.RoleEntryPoint.Run method.