Previous     Contents     Index     DocHome     Next     
iPlanet Application Server 6.0 Administration and Deployment Guide



Chapter 7   Increasing Fault Tolerance and Server Resources


This chapter describes increasing iPlanet Application Server resources, which can increase application performance.

The following topics are included in this chapter:

Increasing iPlanet Application Server (iAS) resources, such as number of threads, number of processes, and number of restart attempts can increase the performance of the applications running on the server and reduce the likelihood of application downtime.

When planning how to increase server resources, you must take into account the resources of the iAS machine. For instance, if the machine is not capable of handling additional processes, you can negatively affect the performance of an application by increasing the number of processes running on that machine. Likewise, assigning additional threads to a process removes available threads from the system-wide thread pool, limiting the system's ability to process other thread-utilizing requests, such as database access.



About Adding and Tuning Server Processes



You can add a Java Server (KJS) or C++ Server (KCS) process to increase fault tolerance. By having one or two additional processes, an application is more likely to respond to users' requests. If one process fails, for instance, the second or third process can take its place, decreasing the amount of time an application is unavailable. This is particularly useful for applications that have known problems that can cause a process to fail.

In addition, you can add a Bridge process to enable direct communication to application components hosted by a KJS process on an iAS Server using RMI/IIOP. When a request originates from a Rich Client, it is sent to iAS by way of an Bridge process. This allows Rich Clients to communicate directly to application components on iAS.



Adding and Tuning Java and C++ Processes



You can add more KJS processes for Java applications and add more KCS processes for C++ applications. It is usually not necessary to add more than two processes for each type of application, Java and C++. If an application cannot run on one or two processes, there are most likely errors in the code that are causing the processes to fail. Those errors should be addressed by the application developer.

To add a Java or C++ process, perform the following steps:

  1. On the iAS Administration Tool toolbar, click the General button to open the General window.

  2. In the left pane of the General window, select the iAS machine where you want to add the KJS process.

  3. From the File menu, choose New, then Process.

    The Add Process dialog box appears.



  4. In the Process drop-down box, choose KJS or KCS.

  5. In the Port Number text box, specify an unused port number where the additional process will run.

  6. Click OK to add the new process.

  7. if this process is to be used in a single-threaded environment, perform the following steps:

    1. Click the process in the left pane of the General window.

    2. In the right pane of the window, set the Default Minimum and Default Maximum Threads to 1.

  8. Click the Apply Changes button to save your changes.


Adding a CXS Process

You must add a CXS (Bridge) process if Rich Clients are to communicate directly with EJBs hosted on a KJS process via the Internet Inter-ORB Protocol (IIOP). Typically, requests are made through via a web path where requests originate at a Web Browser and then are processed by JSPs and servlets which in turn access EJBs. This web path uses the HTTP protocol. In the case of Rich Clients, requests are made through a Java program directly to EJBs using the CORBA Executive Server (CXS), a Java engine within iAS which acts as a bridge between Rich Clients and EJBs. For more information about Rich Clients see the Programmer's Guide.



Figure 7-1    iPlanet Application Server Communication Architecture

To add a CXS (Bridge) process, perform the following steps:

  1. On the iAS Administration Tool toolbar, click the General button to open the General window.

  2. In the left pane of the General window, select the iAS machine where you want to add the CXS process.

  3. From the File menu, choose New, then Process.

    The Add Process dialog box appears.



  4. In the Process drop-down box, choose CXS.

  5. In the Port text box, specify an unused port number where the additional process will run. This is an internal iAS engine port.

  6. In the IIOP Port text box, specify a port number to be used by the Rich Client to talk to CXS. This is the port in which CXS listens for the Rich Client.

  7. Click OK to add the new process.

  8. if this process is to be used in a single-threaded environment, perform the following steps:

    1. Click the process in the left pane of the General window.

    2. In the right pane of the window, set the Default Minimum and Default Maximum Threads to 1.

  9. Click the Apply Changes button to save your changes.



Adjusting the Number of Threads for a Process

Request threads handle users' requests for application components. When iAS receives a request, the application server assigns the request to a free thread. The thread manages the system needs of the request. For example, if the request needs to use a system resource that is currently busy, the thread waits until that resource is free. When the resource is free, the thread allows the request to use that resource.

You can specify the minimum and maximum number of threads that are reserved for requests from applications. The thread pool is dynamically adjusted between those two values. The minimum thread value you specify holds at least that many threads in reserve for application requests. That number is increased up to the maximum thread value you specify on an as-needed basis.

Increasing the number of threads available to a process to allow that process to respond to more application requests simultaneously. Threads can be added to a process at the process level, or globally at the iAS level.

By default, each process uses the threads assigned to iAS. For example, if iAS uses a minimum of 8 threads and a maximum of 64 threads, each individual process uses a minimum of 8 threads and a maximum of 64 threads.

To adjust the number of request threads for all (KJS/KCS/KXS and IIOP) processes, perform the following steps:

  1. On the iAS Administration Tool toolbar, click the General button and then the Request Manager tab.

  2. In the left pane of the General window, select the server whose number of threads you want to adjust.

  3. In the Default Minimum Threads text box, enter the minimum number of threads available for each process on the selected iAS machine.



  4. In the Default Maximum Threads text box, enter the maximum number of threads available for each process on the selected iAS machine.

  5. Click Apply Changes to save your changes.

You can also customize the usage of threads for a process. Once you do this, however, the number you set at the process level overrides the number you set globally at the iAS level.

To adjust the number of threads available for a process, perform the following steps:

  1. On the iAS Administration Tool toolbar, click the General button to open the General window.

  2. In the left pane of the General window, select the process whose number of threads you want to adjust.

  3. In the Request Manager box, enter the minimum number of threads available for that process.



  4. Enter the maximum number of threads available for that process.

    These settings override the default settings set at the server level.

  5. Click Apply Changes to save your changes.



Specifying the Number of Requests for the Queue

The web connector plug-in routes users requests to applications residing on iPlanet Application Server to the Executive process (KXS). These requests are logged to the request queue in the Executive process. You can control the maximum number of threads the web connector plug-in will use. This prevents the request queue from receiving more requests than it can process. To control the flow of requests, you can set the maximum number of requests that are logged to the request queue. The maximum number is called the "high watermark." When the request queue reaches this number no new requests will be accept and the web-server will return an error page for additional iAS requests. You can also set the number of requests in the queue in which logging will resume. This number is called the "low watermark."

To control the flow of requests on the server level, perform the following steps:

  1. On the iAS Administration Tool toolbar, click the General button to open the General window.

  2. In the left pane of the General window, select the server in which you can to control request flow.

  3. Click the Enable Request Flow Control checkbox to enable flow control.



  4. In the Request Queue Low Water Mark text box enter the number of requests in the queue which will trigger request logging.

    This number is only applicable after the maximum number of requests in the queue has been reached. See the next step.

  5. In the Request Queue High Water Mark text box enter the maximum number of requests for the queue.

    When this number is reached no more user's requests will be accepted until the request queue reduces to the number specified as the low watermark.

  6. Click Apply Changes to save your changes.

You can also customize the request flow for a process. Once you do this, however, the number you had set globally at the iAS level is overridden by the flow control numbers you set at the process level.

To adjust the request flow for a process, perform the following steps:

  1. On the iAS Administration Tool toolbar, click the General button to open the General window.

  2. In the left pane of the General window, select the process whose request flow you want to specify.

  3. Click the Enable Request Flow Control checkbox to enable flow control.



  4. In the Request Queue Low Water Mark text box enter the number of requests in the queue in which logging will resume.

  5. In the Request Queue High Water Mark text box enter the maximum number of requests for the queue.

    These setting override the default settings at the server level.

  6. Click Apply Changes to save your changes.



Setting Options of the Administrative Server

The Administrative Server is the administrative process within iAS through which administrative tasks are processed.

There are several options that you can set for the administrative server that will increase fault tolerance and server resources. This can increase the performance of applications running on a server and attempt to reduce the likelihood of application downtime. The following are the options you can set:

  • Maximum Engine Restarts

  • JavaServer Pages (JSP) Caching

  • Maximum Server and Engine Shutdown Time

  • Internationalization Support


Adjusting the Restart Option of the Administrative Server

Adjust the restart option of the Administrative Server to increase or decrease the number of times the Administrative Server attempts to restart an Executive Server (KXS), Java Server (KJS), C++ Server (KCS) or Corba Executive Server (CXS) that has failed. This option increases fault tolerance and application availability by attempting to ensure that all processes are running.

To adjust the restart option of the Administrative Server, perform the following tasks:

  1. On the iAS Administration Tool toolbar, click the General button to open the General window.

  2. In the left pane of the General window, select the iAS machine whose Administrative Server restart option you want to adjust.

  3. On the Server tab, enter the new restart value in the Maximum Number of Restarts text field.



  4. Click Apply Changes to save your changes.


Setting JSP Caching

You can set a JSP caching value of the Administrative Server to specify the number of JSP pages that are cached by each KJS engine on an iAS instance. Caching is set on a per-page basis. Caching JSPs optimizes application response time.

To set the JSP caching value of the Administrative Server, perform the following tasks:

  1. On the iAS Administration Tool toolbar, click the General button to open the General window.

  2. In the left pane of the General window, select the iAS machine for which you want to set the JSP caching value.

  3. On the Server tab, enter the JSP Cache Size in the text field. The cache size is set on a per-page basis.



  4. Click Apply Changes to save your changes.


Enabling Internationalization

You can enable the capability of iAS to support applications of multiple locales.

To enable internationalization, perform the following steps:

  1. On the iAS Administration Tool toolbar, click the General button to open the General window.

  2. In the left pane of the General window, select the iAS machine for which you want to enable internationalization.

  3. On the Server tab, check the I18N Support box.



  4. Click Apply Changes to save your changes.

  5. You must stop and restart the server for you changes to take affect:

       <iAS installation directory>/ias/bin/KIVAes.sh stop

       <iAS installation directory>/ias/bin/KIVAes.sh start


Setting Shutdown Time

You can set a shutdown value of the Administrative Server for both iAS and engine processes. For example, if you set a 60 seconds engine shutdown time, any application tasks currently being processed by the engines are allowed to complete within 60 seconds and no new requests are accepted. The ability to specify a shutdown value avoids a "hard" shutdown that will return errors to the client.

To set the server and engine shutdown time of the Administrative Server, perform the following tasks:

  1. On the iAS Administration Tool toolbar, click the General button to open the General window.

  2. In the left pane of the General window, select the iAS machine whose shutdown time you want to specify.

  3. On the Server tab, enter a Maximum Server Shutdown Time.

    The Maximum Server Shutdown Time is the maximum time to shut down iAS. After this time, any engines that are still running are killed. The server typically shuts down quickly unless it is heavily loaded.

  4. Enter a Maximum Engine Shutdown Time.

    The Maximum Engine Shutdown Time is the maximum time iAS will wait for any individual engine to shut down. After this time, the engine will be killed, and then the next engine will be shutdown.



  5. Click Apply Changes to save your changes.



Implementing a Multi-Process, Single-Threaded Environment

You can add a Java Server (KJS) or C++ Server (KCS) process to implement a multi-process, single-threaded environment. Running multiple KJS processes, all in single-threaded request mode, effectively creates a "multi-threaded" environment, which allows simultaneous processing of users' requests.

Implementing a multi-process, single-threaded environment allows each process to accept only one request at a time. This is useful when you are integrating third-party utilities. Running third-party utilities in the iAS multi-threaded request environment can cause errors beyond the control of the application server, including thread safety issues. To work around this type of problem and still allow the iPlanet Application Server (iAS) to scale, you can implement a multi-process, single-threaded environment.

For example, if a third-party utility runs within the KJS process, but this utility is not thread safe, you can adjust the request threads of the KJS to 1 and eliminate the utilitiy's safety issues. However, this creates a request backlog as requests wait for the KJS to process a single request at a time. To alleviate that problem, you can run multiple KJS processes, all running in single-threaded request mode, and effectively create a "multi-threaded" environment allowing simultaneous processing of users' requests.

You do need to maintain multiple request threads for the Executive Server (KXS) process, as it distributes all requests that come into iAS.

To implement a multi-process, single-threaded environment, perform the following tasks:

  1. Add KJS or KCS processes.

    See .

  2. Adjust the request threads allocated for those processes to 1.

    See .



Configuring Directory Server Failover

The Directory Server connected to your iPlanet Application Server (iAS) machine contains global information shared by all application servers in a Directory Server cluster. A Directory Server cluster is simply one or more iAS machines that share a single Directory Server. To protect this globally shared information, you must configure a second Directory Server to act as a backup if the primary server fails.

Before adding a backup Directory Server to your Directory Server cluster, you must replicate the iAS subtree of the primary Directory Server using supplier initiated replication (SIR). SIR is a replication configuration where servers containing master copies of directory trees and subtrees replicate directory data to servers containing replicated directory trees and subtrees.

The two copies of the iAS subtree must always be in sync with each other.

The iAS subtree is

cn=Global, cn=iasconfig, cn=iAScluster, o=iPlanetRoot

where iasconfig is specified during installation.

For details and replication procedures, see "Managing Replication," a chapter in Netscape Directory Server Administrator's Guide. This document is installed with your installation of Directory Server in the following location:

iAS install directory/manual/en/slapd/ag/replicat.htm

Now add a backup Directory Server using the iAS Administration Tool by performing the following steps:

  1. On the iAS Administration Tool toolbar, click the General button to open the General window.

  2. In the General window, click the LDAP tab to display the following screen:



    Each Directory Server associated with your iAS machine appears in the window.

  3. To add a secondary Directory Server, click the Add button.

    The following dialog box appears:



  4. Enter the new server's information.

  5. Click OK.

To remove a Directory Server, click Remove.

You must always have at least one Directory Server configured to work with iAS.


Previous     Contents     Index     DocHome     Next     
Copyright © 2000 Sun Microsystems, Inc. Some preexisting portions Copyright © 2000 Netscape Communications Corp. All rights reserved.

Last Updated April 25, 2000