Kshitiz SaxenaKshitiz's Blog |
|
Tuesday Apr 01, 2008
SIP Load-Balancer
Are you looking for load-balancer to handle SIP requests Brief history : Sun Communication Application Server, aka sailfin, is built over glassfish. Glassfish is Java EE 5 based application server. And sailfin provides SIP Servlet Container based on JSR 289 over and above what is offered by Glassfish. To learn more about load-balancer available with sailfin, please refer to my blogs on Converged Load Balancer. Posted at 05:16AM Apr 01, 2008 by kshitiz in Sun | Comments[1]
Tuesday Mar 25, 2008
Converged Load-Balancer (CLB)
Brief Overview of Converged Load-BalancerConverged Load-Balancer, is designed to provide high-availability to applications deployed on Sun Communication Application Server, aka sailfin. It will distribute requests across the instances in cluster to increase throughput of the system. It will also fail-over request from unhealthy/inaccessible instances to healthy and available instances.Features of Converged Load-Balancer
Deployment TopologyConverged load-balancer currently supports only self load-balancing cluster. Below figure illustrates self load-balancing topology.![]() The above deployment contains:
Note : Sailfin does not support two-tier deployment as of now. However there is no such restriction put on admin commands. User can still create two tier deployment using admin commands. Two-tier deployment may not function correctly. Functioning of Converged Load-BalancerBelow illustration depicts the functioning of converged load-balancer
![]()
AlgorithmsConverged load-balancer currently supports two load-balancing algorithm
There are two possible configuration:
Note : For complete details of converged load-balancer, please go through functional specifications of converged load-balancer. How to configure converged load-balancerSome common points to remember before a user start with configuration of converged load-balancer
Using default-clusterA default-cluster already exists in the domain created using cluster profile. The default-cluster is pre-configured as self load-balancing cluster. User has to just create instances and deploy applications and a self load-balancing cluster is ready for use. Please follow steps below :
Creating converged-load-balancer on already existing clusterThe converged-load-balancer element does not exist under cluster config and user is starting afresh with converged load-balancer configuration. Please follow steps below :Option 1 : A single step process
Data Centric Rules(DCR)Data centric rules are used extract the hash-key from the request. The extracted hash-key is used to select an instance to service the request under consistent-hash algorithm.Sample DCR fileBelow is a sample DCR file :<?xml version="1.0" encoding="ISO-8859-1"?> <user-centric-rules> <sip-rules> <if> <session-case> <equal>ORIGINATING</equal> <if> <header name="ConferenceName" return="request.ConferenceName"> <exist/> </header> </if> </session-case> </if> </sip-rules> <http-rules> <request-uri parameter="ConferenceName" return="parameter.ConferenceName"> <exist/> </request-uri> </http-rules> </user-centric-rules> Above sample DCR file define following rules :
Configuring DCRA user can setup DCR in following manner :
Posted at 03:23AM Mar 25, 2008 by kshitiz in Sun | Comments[12]
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 DescriptionLets 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 ConfigureThe 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 GUIUsing CLI
Monitoring stats for connection leak tracingThe 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 :
After configuring the monitoring
level for component, the monitoring
data can be viewed using GUI as well as CLI.
Using GUI
Using CLI
The command to get monitoring stats related to connection leak using
CLI is:
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. Posted at 11:27AM Apr 10, 2007 by kshitiz in Sun | Comments[1] |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||