Tuesday Mar 01, 2011

Load-balancing feature in GlassFish 3.1

GlassFish 3.1 comes will all rich clustering feature, newly added in this release. GlassFish 3.1 also has load-balancing feature to complement its clustering feature.  Following sections provide details on load-balancer supported in GlassFish 3.1.


GlassFish Server Open Source Edition 3.1

Apache + mod_jk is supported for this flavour of GlassFish Server. User need to download Apache source or binary from Apache site, and build/install it with mod_jk module. GlassFish Server is build over tomcat web container supports AJP protocol, thus it can work with mod_jk module of Apache. It does require some configuration. Please refer to blog or official documentation for complete details : 

Blog : Amy Roh's Blog

Official documentation : Docs bundle

  • Refer to chapter Configuring HTTP Load Balancing in guide ha-administration-guide.pdf

Oracle GlassFish Server 3.1

GlassFish Loadbalancer plugin is available for this flavour of GlassFish Server. This load-balancer plugin in similar to one available in GlassFish 2.1. Please refer to one pager for new features added in this release.

GlassFish Loadbalancer Configurator, installer and configurator for load-balancer plugin, is officially supported in this release. We did beta for this last year, and it is now inducted in the product itself. This tool will enable users to install and configure the loadbalancer plugin on the web server. It has easy to use graphical interface which accepts user inputs, and then installs and configures load-balancer plugin based on that.

This is a IzPack based installer and requires JAVA to execute. It is bundled as a zip file which contains installer jar file. User can start the installer by running java -jar glassfish-lbconfigurator-3_1.jar. User need to provide inputs as per his/her requirement. Each screen has Help button to guide user. Please refer to Help page to understand what inputs need to be provided on that particular screen. The installation of loadbalancer plugin is two step process :

  1. In first step, load-balancer plugin is exploded and installed
  2. In second step, web server is configured to use load-balancer plugin.

Installer provides Post Installation steps, if any. On last screen of installer, user can save a automation script which can be used for silent install at a later point of time.

It also contains an uninstall script, which user can use to unconfigure and uninstall the loadbalancer plugin from the web server.

Please refer to official documentation for supported web servers and platforms.

Download Location : GlassFish Loadbalancer Configurator

Official documentation : Configuring Web Servers for HTTP Load Balancing


Tuesday Jan 12, 2010

GlassFish LoadBalancer Configurator

Please refer to blog Load-balancing feature in GlassFish 3.1 for latest details.

Till now, for GlassFish users, installing and configuring load-balancer plugin was a manual process. Apart from being cumbersome, manual editing is in general error prone. To ease out this process, we are releasing beta version of GlassFish LoadBalancer Configurator. This tool will enable users to install and configure the loadbalancer plugin on the web server. It has easy to use graphical interface which accepts user inputs, and then installs and configures loadbalancer plugin based on that.

This is a IzPack based installer and require JAVA to execute. It is bundled as a zip file which contains installer jar file, user's guide and legal documents. User can start the installer by running java -jar glassfish-lbconfigurator.jar. User need to provide inputs as per his/her requirement. Each screen has Help button to guide user. The installation of loadbalancer plugin is two step process :

  1. In first step, loadbalancer plugin is exploded and installed
  2. In second step, web server is configured to use loadbalancer plugin

Installer provides Post Installation steps, if any. On last screen of installer, user can save a automation script which can be used for silent install at a later point of time.

It also contains an uninstallation script, which user can use to unconfigure and uninstall the loadbalancer plugin from the web server.


Download location : GlassFish Loadbalancer Configurator

Bundle contains

  • glassfish-lbconfigurator.jar : Jar file which user need to execute to install and configure loadbalancer plugin
  • User_Guide.pdf : User's guide providing information on how to use GlassFish LoadBalancer Configurator
  • legal documents

Supported Platforms:

  • Solaris 9/10 SPARC/X86
  • RHEL 3/4/5
  • Windows 2003 Enterprise Edition

Supported Web Servers :

  • Sun Java System Web Server 7.X/6.X
  • Apache 2.2.X\*/2.0.X
  • IIS 5.0/6.0

\*Apache 2.2.x is not supported on Windows

 Queries and Issues :


Tuesday Jul 21, 2009

One-stop for GlassFish Load-Balancer Plugin

In this blog we will try and provide references to all information available for GlassFish load-balancer plugin. We will put in continuous efforts to keep this blog up to date.


Contents


InstallerNEW!

User can use GlassFish LoadBalancer Configurator to install and configure load-balancer plugin. It has easy to use graphical interface which accepts user inputs, and then installs and configures loadbalancer plugin based on that. You can refer to my blog for further information.


Latest Version

The latest version of load-balancer plugin is aslb-9.1.1-b13. User can download it from following download locations :


Official documentation

Latest documentation for load-balancer plugin is available under Sun GlassFish Enterprise Server 2.1's High Availability Administration Guide. The relevant information is in two chapters :

There is also an official white paper available on GlassFish load-balancer plugin.


Blogs

There are multiple blogs written on how to configure load-balancer plugin with various web-servers. Below are links for them :


Bugs fixed in a load-balancer plugin


Tuesday Apr 10, 2007

Connection Leak Tracing

Does your application suffer from connection starvation? Worked long and hard on your application  to get rid of such issues but in vain . Ever wondered what is eating up all the connections. Unable to figure out whether it is your application or someone-else's . Now you have an option in glassfish v2 to trace out all such cases of connection leaks . The new connection leak tracing feature not only provides information of connection leaks, it also allows a user to reclaim leaking connections to make it available for other applications.

Now on a more technical front a brief description of the feature is provided, and how to configure, monitor and view the connection leaks.


Brief Description

Lets start with the definition of connection leak. As of now the definition is kept really simple. An application is said to be leaking connection, if it acquires a connection and does not close it within specified time period. If this feature is enabled, the application server detects these potential connection leaks and dumps the leak tracing logs to server logs. Looking at the logs the user can figure out which application is leaking connection and fix the issues with application, if exists.

An additional feature of connection reclaim is also provided with connection leak tracing. This can only be enabled when connection leak tracing is turned on. If enabled, the leaking connection with be reclaimed by application server and made available to other applications accessing the connection pool. This feature should be used responsibly. The feature should not be enabled if user's application caches connection. In such cases, enabling this feature will result in unexpected behavior.

For more detailed description, please refer to the one pager.

This feature is not enabled by default. The user need to configure his/her connection pools in order to enable connection leak tracing. The steps to achieve this is provided in the next section.


How to Configure

The connection leak tracing is an advanced feature. Additional steps are needed to configure the connection leak tracing after creating a connection pool. These settings are picked up by application server dynamically. Hence no server restart is needed.

Using GUI


1. Browse to the pool. This can be jdbc(or connector) connection pool.
Browse to the Pool
2. Click on Advanced Tab of the pool
Advanced Tab
3. Provide appropriate inputs
  • Provide non-zero value for Leak Timeout to enable connection leak tracing
  • Click the check-box of Leak Reclaim if you want connection reclaim to be enabled
Provide Pool Inputs
4. Save the changes


Using CLI


1. Set a non-zero connection leak timeout value for connection pool
  • For jdbc connection pool
    • asadmin>set domain.resources.jdbc-connection-pool.<pool-name>.connection_leak_timeout_in_seconds = 300
  • For connector connection pool
    • asadmin>set domain.resources.connector-connection-pool.<pool-name>.connection_leak_timeout_in_seconds = 300
2. Enable connection leak reclaim if desired
  • For jdbc connection pool
    • asadmin>set domain.resources.jdbc-connection-pool.<pool-name>.connection-leak-reclaim = true
  • For connector connection pool
    • asadmin>set domain.resources.connector-connection-pool.<pool-name>.connection-leak-reclaim = true



Monitoring stats for connection leak tracing

The connection leak tracing data is available to the user when monitoring is enabled for that component. To enable monitoring please refer to monitoring manual. For getting connection leak stats of :
  • JDBC connection pool, set monitoring level for JDBC connection pool component to HIGH.
  • Connector connection pool, set monitoring level for JMS/Connector Service component to HIGH.
After configuring the monitoring level for component, the monitoring data can be viewed using GUI as well as CLI.

Using GUI


1. Browse to Monitor tab. Now click on Resources tab. Select your connection pool from the drop down box.
Browse to monitoring tab
2. Scroll down the page and you will find connection leak stats
Connection leak stats

Using CLI

The command to get monitoring stats related to connection leak using CLI is:
  • For jdbc/connector connection pool
    • asadmin> get -m server.resources.<pool-name>.numpotentialconnleak\*
  • The stats will look like
    • server.resources.<pool-name>.numpotentialconnleak-count = 3
    • server.resources.<pool-name>.numpotentialconnleak-description = Provides a count value reflecting the number of potential connection leaks
    • server.resources.<pool-name>.numpotentialconnleak-lastsampletime = 1175495050536
    • server.resources.<pool-name>.numpotentialconnleak-name = NumPotentialConnLeak
    • server.resources.<pool-name>.numpotentialconnleak-starttime = 1175494865525
    • server.resources.<pool-name>.numpotentialconnleak-unit = Count


Viewing potential connection leak traces

The connection leak traces are dumped  to server log with WARNING as log level. So, the log level of Connector component should be at least WARNING. This is default log level for out of the box installation. To enable logging, please refer to logging manual.

It is cumbersome to search through server logs manually. A utility is already provided in application server GUI to search through logs. The steps are provided below to get connection leak traces using this utility.

1. Open the Log Search page by clicking View Log files button. It will open up a new window.
open log search page
2. Click Advanced Search on this page
Click Advanced Search
3. Provide inputs
  • Select Log Level : WARNING
  • Select Logger : javax.enterprise.resource.resourceadapter
  • Provide connection pool name in Name-Value Pairs : ConnectionPoolName=<pool-name>
  • Click Search
Provide inputs
4. If connection leak records exist, they will be displayed
Log records
5. Click on individual record to view the record in detail
Record Details
6. The complete stack trace is provided in record detail. User can browse through it and find out the application which is causing connection leaks



About

kshitiz

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today