We already have set up our project under Windows Live ID in the Windows Azure Developer portal , but we don't have our hosted service yet. It will take only a few minutes to set it up and get it ready for our project.
The first thing to do is to log into the portal at http://www.windows.azure.com. Once we have logged in, we will see all of our Windows Azure projects under My Projects
(in this case, we have only one; yet, as growth happens in the cloud,
we can host multiple projects under a single Windows Live ID).
We need to click on our project name to get access to our services.
In this next screen in the
portal, we see two easy links to get started on adding a new service.
Click either of the circled links:
There are two different types of services for Windows Azure: Storage Account and Hosted Services.
We learned about the Storage Account service when we first went over
our Blob, Queue, and Table Storage, but what is this Hosted Service?
It's the home for our applications (web and worker roles),
configuration, and settings on the Windows Azure Fabric Controller.
Choose the Hosted Services to continue our setup process.
Setting Hosted Service identifiers
Once we pick the Hosted
Service, it's time to configure the service. In the first step of the
setup, we'll have to choose a label (name) and description for the
service. These names and descriptions are just friendly identifiers for
the service, and are used in the Windows Azure Developer portal, Visual
Studio Publishing Wizard, and the Windows Azure Management Tool (http://code.msdn.microsoft.com/windowsazuremmc).
After we've put a label and description to our Hosted Service, click the Next button to move onto the second page of the workflow, where we'll define our Public Service Name
for our public URL. This must be globally unique, so we must choose a
name that no other Hosted Service is currently using. There is a button
conveniently located next to the control that allows us to check the
availability of the chosen name. As we see, the label beneath the form
indicates that the name we have chosen for our public URL is available.
Affinity Groups — geographically grouping services
Next, we'll choose an Affinity
Group for our Hosted Service. Affinity Groups are a nice way to allow
us to choose where our applications and services will live, and also
gives us some key benefits. By creating an Affinity Group and assigning
services to the group, a few things happen.
First, Windows Azure makes
the best effort to put all of the assigned services into a single data
center in the specified geographic region. What does this do? Well, it
helps execute faster transactions between services within the same data
center. There will be fewer hops in the network for communication
between the services.
Another benefit to keeping
your dependent services in a single affinity group is that Microsoft
doesn't charge for bandwidth used within data center region. This will
help keep costs lower as the services will not need to leave the data
center for communication between each other, and you will not be billed
for bandwidth related to the communications. However, note that
transactions are still billable even when in the same data center, so
it's not entirely free to communicate between services within the same
data center.
One last thing to consider
when choosing our Affinity Group is where the majority of our users
will be. If we have a concentrated area of traffic from our customers,
it's best to choose the region closest to that area. That will speed up
the request and response time from and to our customers over the
Internet.
For our example, imagine our customer base is mainly in the United
States, primarily in the Chicago, IL area. As this area is in the
central US, toward the northern end of the country, we are going to
choose the North Central US region for our Affinity Group. Because we've
already set up our storage account, we're going to tell Windows Azure
that we have another service that is related to this Hosted Service and
that we wish to create a new Affinity Group. Our Affinity Group will be
descriptively named North Central United States. Click the Create button, and we're all finished for now.