Hi everyone,

[running IBM JDK 1.3 for linux, debian, tomcat 3.2.2, mod_jk]

I have a small, or rather large problem. We have a couple of servlets that
generates gif-images. Since that takes about 0.6 sec we cache these on
apache. This is a nifty hack where all access goes to
http://host/static/blaha.gif
This sends precached gifs. If a gif is missing, the 404 Error handler is a
perl-script that connects to http://host/webapp/blaha.gif using w3c
(from lib-www?) and writes down the result both to the static cache and
send it to the browser. (webapp is mapped using mod_jk)

Works good! But we have noticed that something is extremely slow. If we
connect to http://host:8081/webapp/blaha.gif it takes about 0.5
seconds. If we connect to http://host/webapp/blaha.gif (which is mounted
to loadbalancer consisting of two workers(pooled ajp13).. this works great
in all other tests) it takes about 17!! seconds!.

When I try to access other static documents using the loadbalancer it
works great, however this servletmapping seems realy slow.

For now I have solved it by sending all requests from the error 404 script
directly to a tomcat worker (using http) without using
loadbalancer. However, then I'll lose the redundancy I want.

Anyone who has ideas is more than welcome to mail me!

        /david

ps. I have seen a lot of people requesting help on setting up simple
loadbalancers. Mail me in private if you want to know more about my
setup. I use two tomcat workers running on a single host. This gives me no
speed gain but som redundancy as well as easier maintance. One worker can
be taken down while the other continues to serve the site.


Reply via email to