The subscription model of SQL Azure determines that data is isolated between subscriptions. In fact, the SQL Azure platform saves user data on multiple SQL Azure physical servers, and uses the SQL Server replication function (Replicas) to achieve high availability.
6-2 shows that on the SQL Azure platform, after a user creates a database, SQL Azure creates three database copies through the replication function. One of the three replicas serves as the primary database. All data requests are first applied to the primary database and synchronized to the other two replica databases.
When the primary database fails, SQL Azure selects one of the other two replicas as the primary database, create a new copy at the same time to ensure that all three copies exist at the same time, as shown in 6-3. With the replication Feature Based on Three replicas, SQL Azure ensures 99.9% high availability.
-2 three database copies created by SQL Azure
-3 SQL Azure creates a new copy when the primary database fails
The architecture of SQL Azure on the server side is 6-4. First, the database requests sent from the Internet are processed by a load balancing server based on the TDS (Tabular Data Stream) protocol. This server Load balancer uses a viscosity algorithm to ensure that all requests of the same link are routed to the same physical server. At the same time, because it is based on the TDS protocol, so long as the client also uses the TDS protocol, these requests are acceptable, such as ADO.. NET, ODBC, and so on, thus ensuring SQL Azure's consistent use of developers.
Database access requests are forwarded to the Gateway server through the Server Load balancer. The Gateway server acts as a proxy and forwarding. First, It authenticates and authorizes the request to ensure that only valid requests can enter the next level of operation. It also performs firewall verification on requests to ensure that the requester's IP address must be set in the SQL Azure firewall to allow access. Finally, the Gateway also has an internal access counter to prevent DoS (Denial of Service) attacks. As shown in Figure 6-4, the Gateway consists of multiple servers. After the operation, it forwards the TDS request to the corresponding SQL Azure physical server based on the connection string, that is, the server on which the user database is actually saved.
For a large number of database servers, SQL Azure provides the underlying control module for creation, migration, configuration, fault recovery, load balancing, and other functions.
-4 SQL Azure Server Architecture