SQL
Azure is a scalable and highly available database utility service in
the cloud. Like all other Windows Azure services, it runs in Microsoft
data centers around the world. The data center infrastructure provides
the SQL Azure service with load balancing, failover and replication
capabilities. Figure 1 illustrates the high-level SQL Azure architecture.
As shown in Figure 1,
the SQL Azure service is composed of four layers: infrastructure,
platform, services, and client. All the layers except the client layer
run inside a Microsoft data center.
1. Infrastructure Layer
The infrastructure
layer is the supporting layer providing administration of hardware and
operating systems required by the services layer. This is the core data
center layer that is shared across multiple services in a data center.
2. Platform Layer
The platform layer consists of
the SQL Server instances and the SQL Azure fabric, and Management
services. The SQL Server instances represent the deployed databases,
their replicas, and the operating system instances that host the SQL
Server instances. The SQL Azure fabric is the underlying framework that automates the deployment, replication, failover, and load balancing of the database servers.
The SQL Azure fabric is
responsible for creating three replicas of your database instance and
provides automatic failover capabilities to these instances. As shown
in Figure 2,
if the primary instance of your database experiences a failure, the SQL
Azure fabric designates one of the replicas as the primary instance and
automatically routes all the communications to the new primary
instance. In an effort to maintain three replicas at all times, SQL
Azure also creates a new replica of the database.
The Management
services are responsible for maintaining the health, upgrades,
consistency, and provisioning of the hardware and software to support
the SQL Azure fabric.
3. Services Layer
The services layer
comprises external (customer) facing machines and performs as a gateway
to the platform layer. It exposes the tabular data stream (TDS),
billing, metering, and account provisioning services to customers.
The services layer exposes
the TDS protocol on port 1433 over Secure Sockets Layer (SSL). The
services layer is also responsible for routing connections to the
primary database instance in the platform layer. This layer maintains
runtime information about your database replicas and routes the TDS
coming from client applications to the appropriate primary instance.
The services layer is also responsible for provisioning your database
when you create a database in SQL Azure. The provisioning of databases
involves communicating with the SQL Azure fabric in the platform layer
to provision appropriate replicas of the database.
The billing and
metering service is responsible for monitoring the runtime usage of
your database for billing purposes. The billing and metering service
tracks the usage of databases at the account level.
4. Client Layer
The client layer is the only
layer that runs outside of the Microsoft data center. The client layer
doesn't include any SQL Azure–specific components; instead, it uses all
the existing features of SQL Server client components like ADO.NET,
ODBC, Visual Studio.NET, SQL Server Management Studio, ADO.NET Data
Services, and so on. The client API initiates a TDS connection to SQL
Azure on port 1433, which is routed by the services layer to the
platform layer to the appropriate database instance.