The View from the Moon

20060421 Friday April 21, 2006

Installing "Sun Java System Web Proxy Server"
At Sun we have a corporate firewall which does not do transparent web proxying to the outside world. All traffic is directed through traditional proxy servers.

For many years, I've run my own proxy server, deployed on recent versions of Solaris, and always on x86 or x64 based hardware. Most recently this has been on a 2-cpu Opteron Server. When it works well, a couple of dozen people use it, although I've always wanted to have more users.

The early years: Squid

Since the early days (ok, 1999), I ran the Squid proxy cache. Frankly, I'm fed up with Squid: it is hard to make the right choices at compile time, hard to make the right choices at run-time, has many bugs, and just doesn't feel like a very modern piece of software.

From Squid to Apache

Last week I attempted to replace Squid with Apache 2.2.0's mod_proxy and mod_cache subsystems. However, we started seeing a lot of Apache core dumps (> 150 per day), and have hit problems in which Apache serves up .css (style sheet) content as text/plain instead of text/css. Unfortunately, firefox doesn't like that, and so sites like sun.com fail to render properly. I posted to apache's users alias but received no help. I spent some time trying to track down the core dump problem, but I just don't have time to debug this to root cause.

What now?

So what other proxy servers are there? I surveyed what was available on freshmeat but had no luck finding anything that seemed to fill my list of requirements:

  • Provides Caching
  • Web correctness (see apache above, which fails on this point)
  • Scales to many users
  • Robust
  • Easy (at least sort of) to configure and administer
  • Free
  • Open Source
  • Helpful Community

From Apache to Sun's Proxy

Finally I decided to try my own company's product: Sun Java System Web Proxy Server 4.0. I had avoided this in the past, because it did not run on x86. Thankfully, that has now been corrected. Also it is definitely the proxy with the biggest (and silliest) name. But is it useful? Unlike the other proxies, it is not Open Source, which as far as I'm concerned is a negative. But from my limited testing thus far it scores well on my other requirements: it was simple to set up, and appears to be pretty robust. Hopefully it will someday be released into open source, since as you'll see, it's pretty nice, and I think a lot of folks would find this a nice project to hack on.

Installation

Sun Java System Web Proxy Server 4.0 is free to use, as long as you don't want support. You can download it from Sun's website. It is available for Solaris (x86, x64 and SPARC), Linux, and Windows. The download interface is a bit clunky-- but hey, it's free. The download is about 130MB, which seemed like a lot to me, but it carries with it various patches you need. Once you have it downloaded, you can use a graphical installer provided you have an X server. In this example, I'll be installing onto a machine called "webhop", and I unpacked the provided .zip file into /sunproxy
myhost $ xhost + webhop

webhop # export DISPLAY=myhost:0
webhop # cd /sunproxy/java_es_05Q4_webproxy
webhop # cd Solaris_x86
webhop # ./installer
This popped up the installer GUI on my machine "myhost". Unlike many programs, the installer is polite if can't remotely display the GUI:
webhop # ./installer
Unable to access a usable display on the remote system.
Continue in command-line mode?(y/n)
I briefly examined the command line installer and wasn't too impressed, but the graphical one is nice. Here's a sequence of images from my installation:
screenshot screenshot screenshot screenshot screenshot screenshot screenshot screenshot screenshot screenshot screenshot

There were a couple of nice features here which I appreciated: I could enter some basic configuration settings at installation time, and I felt that I wasn't asked many esoteric questions.
One hiccup I did hit was that the proxy didn't install itself as an SMF service. Hopefully in the next version that will be fixed. Also, in the final panel, the wizard offered to load me up some additional documentation (a nice touch), but that didn't seem to work for me.

Administration

It would have been nice if the installation GUI could have reminded me, at the end of installation, of the URL I would need to configure the server. In this case. But I soon worked out that it was port 8888 on my server. Logging in there, I used the "admin" account and the password I had supplied earlier. At this point, a rather slick looking web based interface launched itself. Here are some of the pages I looked at:
screenshot screenshot screenshot screenshot screenshot
With a little unguided fiddling, I was able to get the proxy to listen on the port of my choice, with a cache sized the way I wanted. There are definitely some rough edges but overall I was usually able to find the features I wanted. Here are some things we could do better:
  • One rather obvious improvement would be to the Reporting section, which produces a textual summary of cache usage-- surely some charts would make a big difference here. The good news is that with configurable log files, it should be easy to reuse an existing package such as AWStats to roll my own. The default log file looks pretty much like apache's.
  • I'll also need to work on an SMF service conversion so that if the proxy does crash, it is automatically restarted (it does seem to have a "watchdog" process which fulfills that function but at some point in my testing the watchdog itself crashed).
  • The proxy server outputs a fairly pedestrian message to client browsers when it can't find some host you've typed in. Isn't this an opportunity for branding?
  • I was surprised that my connection to the administration GUI for the server was insecure by default. There is a complex "security" section which allows the installation of certificates, but I couldn't make heads or tails of it. There should be a basic security mode enabled by default.
  • "Expert" mode and "Simple" mode-- My configuration isn't very complex, so an administration mode which guides me through the configuration would really help.
  • Integrated status display: it would be nice to have a single "console" which had basic statistics, server status, errors, etc. all integrated together on a single panel. Something to tell you at a glance how things were going. This should be the default view.
  • The proxy includes a GUI for generating a proxy autoconfiguration file, which web browsers can utilitize-- but unfortunately this didn't seem to work for me.
  • I had trouble convincing the proxy to use the cache directory I wanted-- it took me a lot of digging to understand that the cache was made up of "partitions." In my opinion, modern filesystems like ZFS eliminate the need for this sort of thing (i.e. spreading your cache out across multiple filesystems), so it would be nice to not see this complexity if it is not required.
  • It is often important to restart the server to get configuration changes to be applied. Sometimes the GUI doesn't seem to notice that the restart has succeeded, and so you need to reload it.

Anyway, nits aside, I am surprised by and impressed with this product. So far we've served 55,000 requests, and it has "just worked" to a degree which has surprised me. Nice work, Sun Java System Web Proxy Server (urp) team! Technorati Tag:
(2006-04-21 17:42:28.0) Permalink Comments [8]
Trackback: http://blogs.sun.com/dp/entry/installing_sun_java_system_web

 

Comments:

I really think you should try removing mod_mem_cache(which doesn't work at all, doesn't really share cache between processes, and no one tests), and you should instead try using mod_disk_cache.

Posted by Paul Querna on April 21, 2006 at 07:49 PM PDT #

Paul, thanks. I did try that, and it helped somewhat, but it certainly didn't solve the text/plain vs. text/css problem. If I recall correctly, I was still seeing crashes with mod_disk_cache.

Posted by Dan Price on April 21, 2006 at 10:47 PM PDT #

you should log bugs against the cli if it you feel its bad. The installation of just about all of Suns middleware stack is pathetic. Thats quite sad as some of the products are pretty good.

Posted by 86.43.75.142 on April 22, 2006 at 07:39 AM PDT #

Thanks Dan, this is nice review I had seen about Sun Java System Web Proxy Server. Hopefully, we'll iron out some of the issues you stumbled on. As for the community, please check out our . Thanks again. I'd like to add this to my webtier blog if you don't mind.

Posted by cvr on April 23, 2006 at 09:38 PM PDT #

You say that Sun Java System Web Proxy Server is free to use as long as I don't want support, but on the web page I can only see "Trial download" and "Price and Buy". It doesn't look like it's free. Thanks.

Posted by 82.58.197.217 on April 24, 2006 at 12:45 AM PDT #

Dear anonymous-- this software and all of what Sun is calling the "Solaris Enterprise System" is FREE if you don't want or need support. Sometimes no one believes us when we say this. However, the deal is that for some components, when you DO want support, then we ask you to buy a license. Does that make sense? The top of the proxy server web page says this:
The Java System Web Proxy Server is part of the Solaris Enterprise System. You can download it now and use this sophisticated infrastructure software at no cost. And, once you need assurance and support, Sun offers licensing and support plans for purchase.
If you click the "download it now" link, you are on your way. But you are right, there are some confusing links. I'll send some mail and try to get those cleaned up. Thanks for your feedback!

Posted by Dan Price on April 24, 2006 at 11:03 AM PDT #

Dear Dan, can you please send us more information on following point, so that we can reproduce and fail a bug. ===> I'll also need to work on an SMF service conversion so that if the proxy does crash, it is automatically restarted (it does seem to have a "watchdog" process which fulfills that function but at some point in my testing the watchdog itself crashed).

Posted by D.NReddy on April 26, 2006 at 08:25 AM PDT #

downloaded, installed and configured the software without encountering any errors. good product. the graphical user interface is also cool. keep it up.

Posted by nyamasvisva on May 12, 2006 at 08:09 AM PDT #

Post a Comment:

Comments are closed for this entry.
Dan Price's Weblog
[about me]