Flashcards in Design the application architecture - Objective 1.3: Design and implement the Windows Azure role life cycle Deck (33)
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?
If you are going to run a middle-tier application without IIS in Windows Azure, which role should you use?
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?
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?
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?
What is the error code returned from AppCmd.exe when you get an "Access Denied" error?
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?
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?
1. Instance is marked as Starting. It will no longer receive traffic.
2. 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.
3. The role host process is started and the site is created in IIS.
4. The task calls the Microsoft.WindowsAzure.ServiceRuntime.RoleEntryPoint.OnStart method.
5. The instance is marked as Ready and trafic is routed to the instance.
6. The task calls the Microsoft.WindowsAzure.ServiceRuntime.RoleEntryPoint.Run method.
What are the similarities between the OnStart method and a startup task?
1. They both have the same timeout.
2. They are executed again if the role is recycled.
3. You can configure both to run ahead of the role.
What are the differences between the OnStart method and a startup task?
1. A startup task runs in a different process which allows it to run under different privileges.
2. State can be shared between the OnStart method and the Run method because they are in the same application domain.
3. A startup task can be configured as either a background or foreground task that runs in parallel to the role.
Which three major events can you override after startup tasks are completed?
OnStart, Run and OnEnd
What value must be returned from the OnStart method to indicate success?
What happens if you override the Run method and return from the function?
The role shuts down