I have two servers with hostnames comp1
and comp2
. I also have a floating alias (master
) that is dynamically mapped to one of the two servers. I am serving the same identical applet from both servers. Clients normally connect to the master
one, but it is perfectly allowable to connect to either comp1
or comp2
directly.
Clients are complaining that they are always having to wait for the applet to load (it is quite large). I thought that once the client downloaded the necessary jars, they would be cached and wouldn't be loaded again. At first I thought the client's plugin was set to not cache, but I think I've found the cause of the problem, although I don't understand it.
master
(which is currently pointing to comp1
) for the first time. Must wait for jars to download. This is expected.master
again. I don't have to wait for the jars to download. This is also expected/desired behavior.comp1
. Must wait for jars to download. I'd rather not have this happen, since it is the same server, but I can understand why, as comp1
appears to the client as a completely different host.master
. Again, I must wait for all the jars to download. This is not what I expected. The jars should have been downloaded already in steps 1/2.Using the Java control panel, I can see the resources that are in the cache. It appears to me that the resources are keyed by URL, so I don't know why I'm getting what I do. It seems as though that the two different hostnames for the same server is messing up the client's cache.
I should mention that the master
hostname isn't just a DNS alias. It is an actual different IP addrress that comp1/comp2
dynamically bind/unbind to while the application is running.
Can you explain what I am seeing here, or suggest some avenues to investigate?
Avenus to investigate:
This may well be a consequence of the jar filename - e.g. if it is always downloaded into %TMP%\app.jar, then app.jar will get stomped on each time you visit a server.
Possible workarounds:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With