Previous Contents Index Next |
Sun Java System Application Server Standard and Enterprise Edition 7 2004Q2 Update 2 System Deployment Guide

> ## Chapter 3
> Selecting a Topology

> After estimating the factors related to performance as explained in Chapter 2, "Planning your Environment," you should decide the topology that you will use to deploy Sun Java™ System Application Server 7 Enterprise Edition. A topology is the schematic arrangement of Application Server components (machines, application server instances, and HADB nodes), and the communication flow between these components.

> There are two fundamental deployment topologies. Both topologies have common building blocks: multiple Application Server instances in a cluster, a mirrored set of HADB nodes, and HADB spare nodes. Both of them require a set of common configuration settings to function properly.

> This chapter discusses the following:

> - Common Requirements
> - Co-located Topology
> - Separate Tier Topology
> - Comparison of Topologies
> - Determining Which Topology to Use

> ##

> Common Requirements

> The following topics in this section describe the requirements that are common to both the topologies:

> - General Requirements
> - HADB Nodes and Machines
> - Load Balancer Configuration

> ### General Requirements

> Both topologies must meet the following general requirements:

> - Machines that host HADB nodes must be provided in pairs.
> - Each DRU must have the same number of machines. You must create the HADB database in such a way that the mirrored (paired) nodes are on a different DRU than the primary nodes.
> - Each machine that hosts HADB nodes must have local disk storage, which is used to store all persisted information in the HADB.
> - Machines that host the HADB nodes must run the same operating system. These machines should be as identical as possible in terms of configuration and performance.
> - For HTTP and SFSB session information to be persisted to the HADB, the application server instances must be in a cluster and satisfy all related requirements. For more information on configuring clusters, see Sun Java System Application Server Administration Guide.
> - The machines hosting the application server instances should be as identical as possible in terms of configuration and performance. This is because the load balancer plug-in uses a round-robin policy for load balancing, and if you have machines of different classes hosting instances, then the load will not be balanced in the most optimum way across these machines.
> - Each DRU should preferably have a separate Uninterruptible Power Supply (UPS).

> ### HADB Nodes and Machines

> Each DRU contains a complete copy of the data in the HADB and can continue servicing requests if the other DRU becomes unavailable. However, if a node in one DRU and its mirror in another DRU fail at the same time, some portion of your data is lost. For this reason, it is important that you do not set up your system in a way that both DRUs can be impacted by a single failure, such as a power failure or a disk failure.

> Note | Each DRU must run on a completely independent, redundant system.

> Follow these guidelines when setting up the HADB nodes and machines:

> - To increase capacity and throughput, add nodes in pairs with one node for each DRU.
> - Set up each DRU with a number of spare nodes equal to the number of nodes running on each machine. This is because if each machine in the configuration runs n data nodes, the failure of a single machine brings down n nodes.
> - Run the same number of HADB nodes on all machines and thereby balance the load as evenly as possible.

> Caution | Do not run nodes from different DRUs on the same machine. If you must run nodes from different DRUs on the same machine, ensure that the machine can handle any single point of failure (failures related to disk, memory, CPU, power, operating system crashes and so on).

> ### Load Balancer Configuration

> Both the topologies comprise application server instances in a cluster. These instances persist session information to the HADB. You must configure the load balancer to include configuration information for all the application server instances in the cluster.

> For more information on setting up a cluster and adding application server instances to it, see Sun Java System Application Server Administration Guide.

> ##

> Co-located Topology

> In the co-located topology, the Application Server instance and the HADB nodes are on the same machine (hence the name co-located). This topology requires fewer machines than the separate-tier topology. The co-located topology uses CPUs more efficiently—an Application Server instance and an HADB node share one machine and the processing is distributed evenly among them.

> A minimum of two machines are required for this topology. To improve throughput, more machines can be added in pairs.

> Note | The co-located topology is a good fit for large, Symmetric Multiprocessing (SMP) machines as you can take full advantage of the processing power of these machines.

> ### Example of Co-located Topology

> Figure 3-1 shows an example of co-located topology.

> Figure 3-1 Example of Co-located Topology

> Application Server instances are hosted as follows:

> - Application Server instance A is hosted on machine SYS0,
> - Application Server instance B hosted is on machine SYS1,
> - Application Server instance C is hosted on machine SYS2, and
> - Application Server instance D is hosted on machine SYS3.

> These four instances form a cluster that persists information to the two DRUs:

> - DRU0 comprises two machines: SYS0 and SYS2. HADB Node active 0 is on the machine SYS0. HADB Node spare 2 is on the machine SYS2.
> - DRU1 comprises two machines: SYS1 and SYS3. HADB Node active 1 is on the machine SYS1. HADB Node spare 3 is on the machine SYS3.

> Note | The configuration settings described in this document assume that the host names for the machines correspond to the machine names as described in the topologies. For example, for the reference co-located topology, the host names are SYS0, SYS1, SYS2, and SYS3. This applies to both the topologies (and their variations).

> #### Configuration Settings for Reference Co-located Topology

> Use the clsetup command for configuring the cluster (as part of the cluster configuration, the clsetup command creates an HADB database and sets up the JDBC connection pool and the JDBC resource for the HADB). For information on using clsetup, see Sun Java System Application Server Installation Guide.

> The clsetup command uses the following input files:

> - clresource.conf: This is the resource configuration file for the application server instances and the HADB.
> - clinstance.conf: This file contains information about application server instances.

> Note | Make changes to these input files as described in the subsequent sections before you run clsetup command.

> ##### Changes to clresource.conf File

> For configuration related to the topologies described in this guide, the following properties should be changed in the clresource.conf file:

> - hosts: A comma separated list of host names for the machines that host HADB active nodes. For each HADB active node, include the host name of the machine. Therefore, if a machine hosts two HADB nodes, the host name of the machine must appear twice.
> - steadypoolsize: The value of the steadypoolsize property is calculated using the following formula:

> 8*(number of HADB nodes)/(number of application server instances)

> If the resulting number is a decimal, round it off to the next even number.

> - maxpoolsize: The value of the maxpoolsize property is calculated using the following formula:

> 16*(number of HADB nodes)/(number of application server instances)

> If the resulting number is a decimal, round it off to the next even number.

> Note | The HADB nodes include both active and spare nodes. The description and the calculation of values described here apply to both the topologies (and their variations).

> Table # describes the changes needed to the clresource.conf file for the reference co-located topology. The left column lists the section in the file where the property to be changed is listed, the middle column lists the property name, and the right column lists the value of the property

> Table 3-1 Changes Needed to the clresource.conf File for Reference Co-located Topology

> Section of clresource.conf File in Which the Property Appears | Property Name | Value
> HADBINFO | hosts | SYS0,SYS1,SYS2,SYS3
> JDBC_CONNECTION_POOL | steadypoolsize | 8
> JDBC_CONNECTION_POOL | maxpoolsize | 16

> ##### Changes to clinstance.conf File

> In the clinstance.conf file, include information for each instance. For detailed information, see Sun Java System Application Server Installation Guide. This applies to both topologies and their variations.

> ### Variation of Co-located Topology

> For better scalability and throughput, you can increase the number of application server instances and HADB nodes by adding more machines.

> For example, you can add two machines, each with one application server instance and one HADB node. Make sure that you add the HADB nodes in pairs, assigning one node for each DRU. This configuration is shown in Figure 3-2.

> Figure 3-2 Variation of Co-located Topology

> In this variation, the machines SYS4 and SYS5 have been added to the sample co-located topology described in Example of Co-located Topology.

> Application Server instances are hosted as follows:

> - Application Server instance A is hosted on machine SYS0,
> - Application Server instance B is hosted on machine SYS1,
> - Application Server instance C is hosted on machine SYS2,
> - Application Server instance D is hosted on machine SYS3,
> - Application Server instance E is hosted on machine SYS4, and
> - Application Server instance F is hosted on machine SYS5.

> These instances form a cluster that persists information to the DRUs:

> - DRU0 comprises the machines SYS0, SYS2, and SYS4. HADB Node active 0 is on the machine SYS0. HADB Node active 2 is on the machine SYS2. HADB Node spare 4 is on the machine SYS4.
> - DRU1 comprises the machines SYS1, SYS3, and SYS5. HADB Node active 1 is on the machine SYS1. HADB Node active 3 is on the machine SYS3. HADB Node spare 5 is on the machine SYS5.

> #### Configuration Settings for Variation to the Reference Co-located Topology

> Make the changes as described in the subsequent sections before you run the clsetup command.

> ##### Changes to clresource.conf File

> Table # describes the changes needed to the clresource.conf file for the variation to the reference co-located topology as described in this section. The left column lists the section in the file in which the property to be changed is listed, the middle column lists the property name, and the right column lists the value of the property. For more information on the values of these properties, see Changes to clresource.conf File.

> Table 3-2 Changes Needed to clresource.conf File for Variation to Reference Co-located Topology

> Section of clresource.conf File in Which the Property Appears | Property Name | Value
> HADBINFO | hosts | SYS0,SYS1,SYS2,SYS3,SYS4,SYS5
> JDBC_CONNECTION_POOL | steadypoolsize | 8
> JDBC_CONNECTION_POOL | maxpoolsize | 16

> ##### Changes to clinstance.conf File

> In the clinstance.conf file, include the information for each instance. For more information, see Sun Java System Application Server Installation Guide.

> ##

> Separate Tier Topology

> In this topology, Application Server instances and the HADB nodes are on different machines (hence the name separate tier).

> This topology requires more hardware than the co-located topology. This topology may be a good fit if you have different types of machines—you can allocate one set of machines to host the Application Server instances and another to host the HADB nodes. For example, you can use more powerful machines for the Application Server instances and less powerful machines for the HADB.

> ### Sample Configuration

> Figure 3-3 shows an example of the separate tier topology.

> Figure 3-3 Reference Separate Tier Topology

> In this reference topology, the Application Server instance A is hosted on machine SYS0 and the Application Server instance B is hosted on the machine SYS1.

> These two instances form a cluster that persists session information to DRUs as follows:

> - DRU0 comprises two machines: SYS2 and SYS4. The HADB Node active 0 is on machine SYS2 and the HADB Node spare 2 is on machine SYS4.
> - DRU1 comprises two machines SYS3 and SYS5. The HADB Node active 1 is on machine SYS3 and the HADB Node spare 3 on machine SYS5.

> All the nodes on a DRU are on different machines, so that even if one machine becomes unavailable, the complete data for any DRU continues to be available on other machines.

> #### Configuration Settings for Reference Separate Tier Topology

> Make the changes as described in the subsequent sections to these input files before you run the clsetup command.

> ##### Changes to clresource.conf File

> Table # describes the changes needed to the clresource.conf file for the reference separate tier topology. The left column lists the section in the file in which the property to be changed is listed, the middle column lists the property name, and the right column lists the value of the property. For more information on the values of these properties, see Changes to clresource.conf File.

> Table 3-3 Changes Needed to clresource.conf File for Reference Separate Tier Topology

> Section of clresource.conf File in Which the Property Appears | Property Name | Value
> HADBINFO | hosts | SYS2,SYS3,SYS4,SYS5
> JDBC_CONNECTION_POOL | steadypoolsize | 16
> JDBC_CONNECTION_POOL | maxpoolsize | 32

> ##### Changes to clinstance.conf File

> In the clinstance.conf file, include information for each instance. For more information, see Sun Java System Application Server Installation Guide.

> ### Variation of Separate Tier Topology

> You can increase the number of Application Server instances by adding more machines horizontally to the configuration. For example, you can add another machine to the reference configuration by creating a new Application Server instance. Similarly, you can increase the number of HADB nodes by adding more machines to host HADB nodes. Make sure that you add the HADB nodes in pairs with one node for each DRU.

> This configuration is shown in Figure 3-4.

> Figure 3-4 Variation of Separate Tier Topology

> In this configuration, each machine hosting Application Server instances has two Application Server instances. There are thus a total of six Application Server instances in the cluster.

> The HADB nodes are on machines SYS3, SYS4, SYS5, and SYS6.

> DRU0 comprises two machines:

> - SYS3 that hosts the HADB Node active 0 and the HADB Node active 2
> - SYS5, that hosts the HADB Node spare 4 and the HADB Node spare 6.

> DRU1 comprises two machines:

> - SYS4 that hosts the HADB Node active 1 and HADB Node active 3.
> - SYS6 that hosts the HADB Node spare 5 and HADB Node spare 7.

> Each machine hosting HADB nodes hosts two HADB nodes each. There are thus a total of eight HADB nodes (four active nodes and four spare nodes).

> #### Configuration Settings for Variation to Reference Separate Tier Topology

> Make the changes as described in the subsequent sections before you run the clsetup command.

> ##### Changes to clresource.conf File

> Table # describes the changes needed to the clresource.conf file for the variation to the reference separate tier topology. The left column lists the section in the file in which the property to be changed is listed, the middle column lists the property name, and the right column lists the value of the property. For more information on the values of these properties, see Changes to clresource.conf File.

> Table 3-4 Changes Needed to clresource.conf File for Variation to Reference Separate Tier Topology

> Section of clresource.conf File in Which the Property Appears | Property Name | Value
> HADBINFO | hosts | SYS3,SYS4,SYS3,SYS4,SYS5,SYS6,SYS5,SYS6
> JDBC_CONNECTION_POOL | steadypoolsize | 12
> JDBC_CONNECTION_POOL | maxpoolsize | 22

> ##### Changes to clinstance.conf File

> In the clinstance.conf file, include information for each Application Server instance. For more information, see Sun Java System Application Server Installation Guide.

> ##

> Comparison of Topologies

> Table # presents a comparison of the co-located topology and the separate tier topology.

> Table 3-5 Comparison of Topologies

> Topology | Advantages | Disadvantages
> --- | --- | ---
> Co-located Topology | Requires fewer numbers of machines as compared to the separate tier topology. Because the HADB nodes and the application server instances are on the same tier, you can create an application server instance on each spare node to handle additional load. Improved effectiveness of CPU utilization. An application server instance and an HADB node share one machine and the processing is distributed evenly among them. Useful for large, Symmetric Multiprocessing (SMP) machines as you can take full advantage of the processing power of these machines. | Increased complexity of maintenance. For example, if you want to perform maintenance tasks (that require shutting down of machines) on HADB nodes, the application server instances on the machine hosting HADB nodes also become unavailable while the machine is unavailable.
> Separate Tier Topology | Easier maintenance. For example, you can perform maintenance tasks for the machines that host application server instances without having to bring down HADB nodes. Useful in situations where you have different types of machines. You can allocate a different set of machines to the application server instances tier and to the HADB tier. For example, you can use the more powerful machines for the application server instances tier and the less powerful machines for the HADB tier. | Requires more machines as compared to the co-located topology. Because application server instances and HADB nodes are located on separate tiers, application server instances cannot be located on the machines that host the HADB spare nodes. Reduced effectiveness of CPU utilization. The tier consisting of application server instances and the tier consisting of HADB nodes will likely have uneven loads. This is more significant when the number of machines is smaller (four to six).

> ##

> Determining Which Topology to Use

> You should test the different topologies mentioned in this chapter and experiment with different combinations of machines and CPUs to determine which topology (or its variation) best meets your performance and availability requirements.

> Determine what trade offs you want to make to serve your needs the best. For example, if ease of maintenance is a critical requirement for you, the separate tier topology is more suitable. However, you will have to use a higher number of machines as compared to the co-located topology.

> An important factor in the choice of topology is the type of machines you have in your setup. If you have large, Symmetric Multiprocessing (SMP) machines in your system, the co-located topology is an attractive option because you can take full advantage of the processing power of these machines. If you have different types of machines, separate tier topology may be more useful because you can allocate a different set of machines to the application server instances tier and to the HADB tier. For example, you can use more powerful machines for the application server instances tier and the less powerful machines for the HADB tier.

> Previous Contents Index Next

> Copyright 2005 Sun Microsystems, Inc. All rights reserved.