Design the application architecture - Objective 1.3: Design and implement the Windows Azure role life cycle Flashcards

1
Q

What are the three different types of solutions offered in Windows Azure?

A

Virtual machines, web sites and cloud services.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does a Windows Azure virtual machine provide?

A

The same functionality as any virtual machine hosted locally.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does a Windows Azure web site provide?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does a Windows Azure cloud service provide?

A

It is the original Windows Azure Platform as a Service (PaaS) offering.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are Windows Azure startup tasks?

A

They are actions that are performed before a role starts.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the three types of roles in Windows Azure?

A

Web, worker and VM

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

If you are simply going to run a web site in IIS in Windows Azure, which role should you use?

A

Web role

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

If you are going to run a middle-tier application without IIS in Windows Azure, which role should you use?

A

Worker role

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Which Windows Azure roles can use startup tasks?

A

Web and worker roles

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Where are startup tasks defined?

A

In the Task element of the Startup element of the ServiceDefinition.csdef file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

When do startup tasks run?

A

Whenever a role recycles or a server reboots.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What error code must a startup task return before the startup process will complete successfully?

A

Zero

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What happens when a startup task returns a non-zero error code?

A

The role does not start

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

When multiple startup tasks are defined for a role, how are they executed in relation to each other?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which tool is used in Windows Azure to manage IIS settings at startup?

A

AppCmd.exe

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Why should you take care in modifying the web.config section in the startup task?

A

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.

17
Q

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?

A

183

18
Q

What is the error code returned from AppCmd.exe when you get an “Access Denied” error?

A

5

19
Q

What types of programs can startup tasks run?

A

Executables, batch files and PowerShell scripts.

20
Q

In Windows Azure, how are application pools normally named?

A

They are usually named with a GUID

21
Q

In Windows Azure, how are web sites typically named?

A

rolename_roleinstancenumber

This ensures each website name is different for each version of the role.

22
Q

In Windows Azure, why must registry changes be added to startup tasks?

A

Windows Azure virtual machines are stateless and the registry changes would not be saved when the role restarts.

23
Q

In Windows Azure, how do you install third-party applications that your web site may depend on?

A

They must be installed with startup tasks.

24
Q

What 6 steps are taken when a role starts?

A
  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 tra􏰟fic is routed to the instance.
  6. The task calls the Microsoft.WindowsAzure.ServiceRuntime.RoleEntryPoint.Run method.
25
Q

What are the similarities between the OnStart method and a startup task?

A
  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.
26
Q

What are the differences between the OnStart method and a startup task?

A
  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.
27
Q

Which three major events can you override after startup tasks are completed?

A

OnStart, Run and OnEnd

28
Q

What value must be returned from the OnStart method to indicate success?

A

true

29
Q

What happens if you override the Run method and return from the function?

A

The role shuts down

30
Q

When should you override the Run method?

A

When you want to run code for the life of the role instance

31
Q

When is the ASP.Net Application_Start method called?

A

Immediately after the OnStart method.

32
Q

What is the hard time limit of the OnStop method?

A

Five minutes

33
Q

What happens if the OnStop method does not complete by the end of the time limit?

A

The process is terminated