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

Exam 70-486: Developing ASP.NET MVC 4 Web Applications > Design the application architecture - Objective 1.3: Design and implement the Windows Azure role life cycle > Flashcards

Flashcards in Design the application architecture - Objective 1.3: Design and implement the Windows Azure role life cycle Deck (33)
Loading flashcards...
1

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

Virtual machines, web sites and cloud services.

2

What does a Windows Azure virtual machine provide?

The same functionality as any virtual machine hosted locally.

3

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.

4

What does a Windows Azure cloud service provide?

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

5

What are Windows Azure startup tasks?

They are actions that are performed before a role starts.

6

What are the three types of roles in Windows Azure?

Web, worker and VM

7

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

Web role

8

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

Worker role

9

Which Windows Azure roles can use startup tasks?

Web and worker roles

10

Where are startup tasks defined?

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

11

When do startup tasks run?

Whenever a role recycles or a server reboots.

12

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

Zero

13

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

The role does not start

14

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.

15

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

AppCmd.exe

16

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.

17

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

18

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

5

19

What types of programs can startup tasks run?

Executables, batch files and PowerShell scripts.

20

In Windows Azure, how are application pools normally named?

They are usually named with a GUID

21

In Windows Azure, how are web sites typically named?

rolename_roleinstancenumber

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

22

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.

23

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

They must be installed with startup tasks.

24

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 tra􏰟fic is routed to the instance.

6. The task calls the Microsoft.WindowsAzure.ServiceRuntime.RoleEntryPoint.Run method.

25

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.

26

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.

27

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

OnStart, Run and OnEnd

28

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

true

29

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

The role shuts down

30

When should you override the Run method?

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