Sunday, October 24, 2010

Setting up the Apache Load Balancer

Install the Apache 2.2

Edit the conf\httpd.conf as mention below.


#Change the Listen port as you need
Listen 8990

#Load the following modules (Uncomment)
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule status_module modules/mod_status.so

#Add following to Set the Env variables (Not required)
SetEnv proxy-sendcl 1
SetEnv proxy-nokeepalive 1 #keep the connections live
SetEnv downgrade-1.0 1 #downgrade the HTTP version to 1.0

#define the proxy pass for load balancer of the cluster
ProxyPass / balancer://mycluster/
ProxyPassReverse / balancer://mycluster/
ProxyPass /ccx balancer://mycluster/
ProxyPassReverse /ccx balancer://mycluster/

#define the cluster members of the balancer

Reference : http://httpd.apache.org/docs/2.1/mod/mod_proxy.html
http://httpd.apache.org/docs/2.1/mod/mod_proxy_balancer.html

Tools and Tips - Google App Engine - Google Code

Tools and Tips - Google App Engine - Google Code

Thursday, July 15, 2010

Enable Remote Jconsole

JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=12345 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false

Enable Debug

set JAVA_OPTS=%JAVA_OPTS% -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005

DshowXML

JAVA_OPTS=%JAVA_OPTS% -DshowXML=true