About Adding and Tuning Java Server and C++ Server Processes
You can add a Java Server or C++ Server process to increase fault tolerance. By having an additional process or two, an application is more assured to respond to users' requests. This is particularly useful for applications that have known problems and often cause a process to fail.
Add more Java Server processes for Java applications and add more C++ Server processes for C++ applications. For fault tolerance, you probably do not want to add more than two processes for each type of application, Java and C++. If an application cannot run on a couple of processes, there are most likely errors in the code that are causing the processes to fail.
For information about adding a process, see "Adding a Java Server or C++ Server."
About Adjusting Request Threads for a Process
You can increase 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 Netscape Application Server level.
By default, each process uses the threads assigned to the Netscape Application Server. For example, if the Netscape Application Server 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.
You can customize the usage of threads for each process. Once you do this, however, the number you set for the Netscape Application Server is over-ridden by the number you set at the process level. For information about setting the number of threads, see "Adjusting the Number of Request Threads."
About Implementing a Multi-Process/Single-Threaded Environment
Sometimes, such as when you are integrating third-party utilities, you run into thread safety issues. Running these utilities in the Netscape Application Server multi-threaded request environment can cause errors beyond the control of the Netscape Application Server. To work around this type of problem and still allow the Netscape Application Server to scale, you can implement a multi-process/single-threaded environment, which allows each process only to accept one request at a time.
For example, if a third-party utility runs within the Java Server process but is not thread safe, you can adjust the request threads of the Java Server to 1 and eliminate the thread issues of the utility. Of course, there is now an issue that requests are going to back up in the queue waiting for the Java Server to process a single request at a time. To alleviate that problem, you need to run multiple Java Server 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 process, as it distributes all requests that come into the Netscape Application Server.
Implementing a multi-process/single-threaded environment consists of the following tasks:
Note: For Netscape Application Server 2.0, AppLogic objects that call the newRequest( ) method do not work properly in a Java Server or C++ Server that has its request threads set to 1.
|