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

> ## Chapter 14
> Configuring HTTP Features

> This chapter describes how to configure preferences for your HTTP-related features of your Sun Java System Application Server. For preferences related to virtual servers and HTTP listeners, see Chapter 15, "Using Virtual Servers."

> This chapter includes the following topics:

> - About the HTTP Features
> - Configuring the File Cache
> - Tuning Your Server for Performance
> - Configuring HTTP Quality of Service
> - Adding and Using Thread Pools
> - Editing Advanced Settings
> - Configuring MIME Types

> ##

> About the HTTP Features

> The Sun Java System Application Server HTTP features include setting performance levels for application server instances, setting performance tuning-related parameters, and using the file cache to improve performance. These settings are stored in two configuration files: init.conf and server.xml. You edit the init.conf settings on the Advanced Settings page. For more information, see Editing Advanced Settings.

> Other properties you edit are stored in the server.xml file, in the http-service element. For more information on both the init.conf file and the server.xml file, see the Sun Java System Application Server Administrator’s Configuration File Reference.

> ##

> Configuring the File Cache

> The Sun Java System Application Server uses a file cache to serve static information faster. The file cache contains information about files and static file content. The file cache also caches information that is used to speed up processing of server-parsed HTML.

> The file cache is turned on by default. The file cache settings are contained in a file called nsfc.conf. This file is present only if file cache parameters have been changed from their defaults. For more information on nsfc.conf, see the Sun Java System Application Server Administrator’s Configuration File Reference.

> To configure the file cache:

> 1. In the left pane, click HTTP Server
> 2. Click the File Caching tab
> 3. Enter the desired value in the fields.
> 4. Click OK.

> For more information on using the file cache to improve performance, see the Sun Java System Application Server Performance Tuning and Sizing Guide

> ##

> Tuning Your Server for Performance

> On the Performance Tuning page you can configure settings that control your Sun Java System Application Server’s performance by controlling how many requests it can handle, how long requests remain open without activity before timing out, and whether you are doing reverse lookups of a client’s IP using DNS. Also, if you are using DNS, you can set such performance-related features as whether you are using asynchronous DNS, and DNS caching settings.

> For more information on tuning, see the Sun Java System Application Server Performance Tuning Guide.

> To set the performance tuning settings:

> 1. In the left pane, click HTTP Server
> 2. Click the Tuning tab
> 3. Enter the desired value in the fields.
> 4. Click OK.

> For additional information on the settings you can tune through the Administration interface, see the online help.

> ##

> Configuring HTTP Quality of Service

> Quality of service refers to the performance limits you set for a server. For example, an ISP might want to charge different amounts of money for virtual servers depending on how much bandwidth allowed them.

> Before you can use quality of service for a specific virtual server, you must enable it for the server instance and set some values.

> To configure the quality of service settings for the server instance:

> 1. In the left pane, click HTTP Server.
> 2. Click the QOS tab.
> 3. To enable quality of service as a whole, click Enable.

> By default quality of service is disabled. Enabling quality of service increases server overhead slightly.

> 4. Choose the Recompute Interval.

> The recompute interval is the number of milliseconds between each computation of the bandwidth. The default is 100 milliseconds.

> 5. Choose the Metric Interval.

> The metric interval is the interval in seconds during which the traffic is measured. The default is 30 seconds. All bandwidth measured during this time is averaged to give the bytes per second.

> If your site has a lot of large file transfers, use a large value (several minutes or more) or this field. A large file transfer might take up all the allowed bandwidth for a short metric interval, and result in connections being denied if you’ve enforced the maximum bandwidth setting. Since the bandwidth is averaged by the metric interval, a longer interval smooths out spikes caused by large files.

> If the bandwidth limit is much lower than available bandwidth (for example, 1 MB-per-second bandwidth limit but with a 1 GB-per-second connection to the backbone), the metric interval should be shortened.

> Please note that if you have large static file transfers and a bandwidth limit that is much lower than available bandwidth, you have to decide which situation to tune for, since the problems require opposite solutions.

> 6. Set the bandwidth limit, in bytes per second, for the server.
> 7. Choose whether or not to enforce the bandwidth limit setting.

> If you choose to enforce the bandwidth limit, once the server reaches its bandwidth limit additional connections are refused.

> If you do not enforce the bandwidth limit, when the limit is exceeded the server logs a message to the error log.

> 8. Choose the maximum number of connections allowed for the server.

> This number is the number of concurrent requests processed.

> 9. Choose whether or not to enforce the connection limit setting.

> If you choose to enforce the connection limit, once the server reaches its limit additional connections are refused.

> If you do not enforce the connection limit, when the limit is exceeded the server logs a message to the error log.

> 10. To specify additional name/value pairs, click the Properties button.
> 11. Click OK.

> To configure quality of service using the command-line interface’s asadmin utility, use the following commands:

> - create-http-qos
> - delete-http-qos

> These commands use the following syntax:

> asadmin create-http-qos --user admin_user [--password password] [--host hostname] [--port admin_port] [--secure | -s] [--passwordfile file_name] [--virtualserver virtual_server_id] [--bwlimit bandwidth_limit] [--enforcebwlimit enforce_bandwidth_limit] [--connlimit connection_limit] [--enforceconnlimit enforce_connection_limit] instancename

> asadmin delete-http-qos --user admin_user [--password password] [--host hostname] [--port admin_port] [--secure | -s] [--passwordfile file_name][--virtualserver virtual_server_id] instancename

> If you specify a virtual server, these commands create or delete quality of service information for that virtual server. If you do not specify a virtual server, the command affects the server instance.

> For more information on command syntax, see the command-line interface help. For more information on using asadmin, see Appendix A, "Using the Command Line Interface."

> For more information on the limitations to the quality of service features, see Administering the Transaction Service Using the CLI.

> ##

> Adding and Using Thread Pools

> You can use thread pools to allocate a certain number of threads to a specific service, so that it doesn’t take up more threads than you want it to. Another use for thread pools is for running thread-unsafe plug-ins. By defining a pool with the maximum number of threads set to 1, only one request is allowed into the specified service function.

> When you add a thread pool, the information you specify includes the minimum and maximum number of threads, the stack size, and the queue size.

> To add a thread pool:

> 1. In the left pane, click HTTP Server
> 2. Click Thread Pool.
> 3. Enter the desired value in the fields.
> 4. Click OK.

> The thread pool is displayed at the bottom of the page. To edit or delete a thread pool, click the Edit or Delete button next to it.

> After you’ve set up a thread pool, use it by designating it as the thread pool for a specific service.

> For more information on using thread pools to improve performance, see the Performance Tuning and Sizing Guide.

> ##

> Editing Advanced Settings

> When the Sun Java System Application Server starts up, it looks in a file called init.conf in the instance_dir/config/ directory to establish a set of global variable settings that affect the server’s behavior and configuration. Sun Java System Application Server executes all the directives defined in init.conf.

> These settings are shown on the Advanced Settings page. You can edit certain settings in the init.conf file that affect the following areas:

> - DNS
> - SSL
> - Performance
> - CGI
> - Keep-alive
> - Logging

> For a complete description of the init.conf file, see the Sun Java System Application Server Administrator’s Configuration File Reference.

> To edit the advanced settings:

> 1. In the left pane, click HTTP Server
> 2. Click the Advanced tab
> 3. Click the type of settings you want to change (DNS, SSL, and so forth).
> 4. Make the desired changes to the settings and click OK.

> For more information about each type of settings, see the online help.

> ##

> Configuring MIME Types

> The Mime Types page allows you to edit your server’s MIME files. MIME (Multi-purpose Internet Mail Extension) types control what types of multimedia files your system supports. MIME types also specify what file extensions belong to certain server file types, for example to designate what files are CGI programs.

> You can create as many MIME types files as you need, and associate them with the application server instance or virtual servers. One MIME types file, mime.types, exists by default on the server, and cannot be deleted.

> To create a new MIME Types file:

> 1. In the left pane, under HTTP Server, click MIME Type File.
> 2. On the right pane, click New.
> 3. Enter an identifier for the MIME file, and a file name.
> 4. Click OK.

> To edit the definitions in a MIME file:

> 1. In the left pane, under HTTP Server, click the icon next to MIME Type File to expand the view.
> 2. Click the ID of the MIME file you want to edit.
> 3. On this page, edit the MIME file name associated with the ID.
> 4. To edit the file extensions in the MIME file, click Edit MIME file.
> 5. To edit an existing entry, click Edit next to it.
> 6. On the page that comes up, make your changes and click Change MIME Type.
> 7. To delete a MIME type, click Remove next to it.
> 8. To add a new MIME type, enter a category, content type, and file suffix in the fields, then click New Type.

> To configure MIME types using the command-line interface’s asadmin utility, use the following commands:

> - create-mime
> - delete-mime
> - list-mimes

> These commands use the following syntax:

> asadmin create-mime --user admin_user [--password password] [--host hostname] [--port admin_port] [--secure | -s] [--passwordfile file_name] [--instance instancename] --mimefile filename mime_id

> asadmin delete-mime --user admin_user [--password password] [--host hostname] [--port admin_port] [--secure | -s] [--passwordfile file_name] [--instance instancename] mime_id

> asadmin list-mimes --user admin_user [--password password] [--host hostname] [--port admin_port] [--secure | -s] [--passwordfile file_name] instancename

> For more information on command syntax, see the command-line interface help. For more information on using asadmin, see Appendix A, "Using the Command Line Interface."

> For information on using the MIME types with virtual servers, see the online help and Chapter 15, "Using Virtual Servers."

> Previous Contents Index Next

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