Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

What do you think about lighttpd for AJP load Balancing?

I use Apache and mod_jk for this, it works fine. What would be the benefit of switching apache to lighttpd?

What software use to load balance J2EE applications? Hardware load balancer?

Thank you!

share|improve this question

4 Answers 4

up vote 4 down vote accepted

I use Apache and mod_jk for this, it works fine. What would be the benefit of switching apache to lighttpd?

If it ain't broke, don't fix it. The benefits of switching to Lighttpd are mostly performance; Lighttpd requires less CPU/RAM to do the same work as Apache. It can also be easier to set up, but since you already have Apache running, that is a non-issue for you.

I disagree with Andy on the security issue; Apache 2 has had more reported security issues than Lighttpd, but most of them would be in modules you wouldn't compile in for load balancing, and Apache is good at quickly releasing fixes for their security issues. Lighttpd is getting much less security scrutiny than Apache, so it may have more un-publicized issues that we don't know of. It is an apples to oranges comparison...

Today Lighttpd is loosing momentum IMHO. Since its author landed a job at MySQL, and started working on MySQL proxy, the frequency of releases of Lighttpd has gone down. My gut feeling is that most new installations of event-driven open source HTTP servers are using nginx now. See the english language wiki for an overview of nginx.

For gratis open-source load balancing, I believe the largest installed base is for HAProxy and nginx now. It is hard to come up with numbers, as public surveys such as Netcraft cannot detect backend load balancers, but this is my gut feeling based on the blog posts that I see.

Note that both nginx and HAProxy cannot do Apache JServ Protocol proxying. nginx can do HTTP and FastCGI and maybe a few more, and HAProxy is HTTP only. Thus you would have to switch to HTTP output from the application server.

My recommendation would be to stay put on Apache, unless you have a specific functionality need that Apache does not solve for you.

share|improve this answer

I think for load-balancing you should use specialized tools like HAProxy / nginx that have small footprint and very good performance.

share|improve this answer

@jesper.mortensen: haproxy does either HTTP or pure TCP. So if Apache JServ Protocol is TCP based, you can load-balance it and provide high availability. Several other non HTTP protocols are commonly found with haproxy, SQL, LDAP, RDP, SSH, HTTPS, SMTP, POP/IMAP, etc... Some application protocols such as Forms are also used at some places, so I don't see a particular reason for JServ not to be possible.

share|improve this answer
    
I suppose the OP doesn't want to load balance the AJP service, he load balances on the front-end, which then talks to the back-end with AJP instead of HTTP. He just has to switch Tomcat to HTTP instead of AJP (or simply connect to the right port, I guess) –  niXar Oct 7 '09 at 9:27

lighttpd has a much smaller footprint and is able to serve many more requests than apache while having far fewer historical vulnerabilities (recent apache 2.2 vulnerabilities)

it's author Jan Kneschke also write mysql proxy and is a super talented developer and well motivated documenter/maintainer of code - although it's a very small project, it's awe-inspiringly good :)

share|improve this answer
    
I do disagree with the vulnerabilities. Apache is just a large package and only few have actually affected mod_proxy/ajp and rewrite in the last time. Apache is still the one with the most complet AJP coverage. nginex is unfortunatelly http/1.0 only (and a imature AJP protocol). lighthttps has an interesting proxy concept with multiple protocol support, but it misses session stickyness and has the same "buffers request" behaviour than nginex which makes both hard to use in comet and/or large-request-response scenarios. –  eckes Dec 19 '11 at 23:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.