Partilhar via


Network Topologies (SQL Server Compact Edition)

When transferring data between Microsoft SQL Server 2005 Compact Edition (SQL Server Compact Edition) clients and SQL Server, the data passes through Microsoft Internet Information Services (IIS). For your network, you might configure a single server to host both IIS and SQL Server, or you might have multiple servers to enhance performance and security and multiple firewalls to additionally enhance security. The network topology you choose to implement is based on your security and performance needs.

Network Topologies

Although there are many possible network topologies that you can use for transferring data between SQL Server Compact Edition clients and SQL Server, there are three common network topologies:

Single-Server Topology

In this topology, IIS, the SQL Server Publisher, and the SQL Server Distributor all reside on a single server. This server may or may not be located behind a firewall. If it is, you only have to open port 80 to Internet traffic.

Single-server topology

Two-Server Topology

In this topology, IIS is configured on one server, and the SQL Server Publisher and the SQL Server Distributor are configured on a separate server. The server running IIS may be separated from the rest of the network (including the computer that is running SQL Server) by a firewall, and may also be protected from the Internet by an additional firewall. The firewall between the client and IIS must have port 80 open, while the firewall between IIS and SQL Server must have two ports open: port 80 and the port assigned to the instance of SQL Server. This second port is typically 1443.

Two-server topology

Enterprise Topology

If you are supporting very large numbers of SQL Server Compact Edition Subscribers that synchronize at the same time, you can partition the work across multiple computers that are running IIS. This reduces data transfer delays.

Enterprise topology

If additional load balancing is required on the computer that is running SQL Server, you can create a republishing hierarchy on multiple computers. The top-level Publisher publishes data to SQL Server Subscribers. They in turn republish the data to the SQL Server Compact Edition Subscribers. Load balancing is static in the sense that each SQL Server Compact Edition Subscriber is assigned to one of the republishers and always synchronizes with that republisher.

Note

SQL Server Compact Edition does not support alternative synchronization partners.

As with a two-server topology, firewalls can be used between the clients and IIS, and between the IIS servers and the republishers.

Enterprise topology (load balancing)

Using Windows Clustering

SQL Server Compact Edition replication can be used on a Microsoft Windows cluster that contains a farm of Web servers running IIS. However, the SQL Server Compact Edition Server Agent must maintain session state across client calls; therefore, you must use load-balancing hardware or software that can maintain session state between the SQL Server Compact Edition Client Agent and the SQL Server Compact Edition Server Agent.

Load-balancing systems typically work as follows: Clients access the cluster using a common domain name with a single virtual IP address; the load-balancing hardware or software intercepts the incoming HTTP traffic and directs it to one of the servers in the cluster.

SQL Server Compact Edition can be used with a variety of load-balancing systems, for example Windows Network Load Balancing (NLB). Windows NLB is included as part of Windows 2003 Advanced Server and Windows 2000 Datacenter Server. NLB can be used with SQL Server Compact Edition because NLB supports client affinity. This is an option that ensures that the client is always directed to the same server running IIS within the cluster. Note that if a server or network failure occurs during a client session, a new logon is required to re-authenticate the client and reestablish session state. Also, adding a new server running IIS to the cluster redirects some client traffic to the new server. This can affect existing sessions.

For more information, see "Windows Clustering Technologies" in the technical resources for Microsoft Windows Server 2003 at the Microsoft Windows Server 2003 Web site.