Posts

Showing posts from May, 2014

AWS deployment options - Part 3 - mod_proxy with autoscaling

Image
Due to the limitation with mod_jk for autoscaling configurations, we took a look at mod_proxy Instead of using AJP (mod_jk) protocol we can use the HTTP protocol and with this approach we do not use Apache for the actual load balancing or session stickiness. Instead all requests from the Apache server are forwarded to the application tier ELB (say it runs at HTTP port 8080) and the ELB does load balancing as well as maintains session stickiness. The Apache httpd.conf configuration for the same is mentioned below. LoadModule proxy_module        modules/mod_proxy.so LoadModule proxy_http_module   modules/mod_proxy_http.so ProxyPass /img ! ProxyPass /images ! ProxyPass /css ! ProxyPass /media ! ProxyPass / http://internal-RCCL-AppTier-ELB-722360436.us-east-1.elb.amazonaws.com:8080/ ProxyPassReverse / http://internal-RCCL-AppTier-ELB-722360436.us-east-1.elb.amazonaws.com:8080/ § Pros: ...

AWS deployment options - Part 2 - mod_jk with autoscaling

Image
Part 1 gave the overall deployment picture .   If the application requires session stickiness at the Tomcat tier, i.e. if some user details are stored in the HTTP Session and you don't enable session replication across Tomcats. The solution is that the Elastic Load Balancer (ELB) maintains the sticky session using it’s own cookie called AWSELB. For ELB sticky session configuration see http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.managing.elb.html In case there is an external ELB (Apache tier) with cookies stickiness set, it will over-ride the internal ELB (Tomcat tier). The stickiness cookie is always named AWSELB, hence the external ELB will overwrite the cookie from the internal ELB. One option here is to set the Tomcat tier ELB with "Application Generated Cookie Stickiness" with value JSESSIONID so it will follow the Application cookie and maintain sticky sessions.   In case sticky session is not enabled on the application ti...

Amazon AWS deployment options for Apache web server to Tomcat connectivity

Image
The cloud proposition is attractive because of the ability to scale up or down to meet workload demand almost instantaneously and to utilize efficiencies in the services delivery model. The rationale of using and paying for only what you need, when you need it is a very compelling business justification.   This post and the next few ones describes the various options and features available when a web application is deployed on the AWS cloud infrastructure using Apache HTTP Web Server and Apache Tomcat application server. This document deals more with options available to maintain sticky sessions and application persistence.   This is based on a recent project where we are deploying with Apache 2.4 and Tomcat 7.0.x   First some basic terms     AWS Glossary   ·                      Amazon EC2 is hosted in multiple l...