OmniTraining

Real Information for Real IT

OnSite Training

Training Courses

Consulting Services

Specialties

Monthly Newsletter

Subscribe
Unsubscribe

Consulting Services

Areas of Expertise

Xbox/Wii Giveaway

Free Xbox or Wii
Advertising:
Sun Web Server Review: Outpacing Apache?

Sun Web Server: Replacing Apache?

Every once in a while you’ll see a “powered by” logo at the bottom of a large e-commerce Web site that happens to say “Sun Java Web Server.” Do these large organizations know something that the rest of the Apache using world does not? Quite possibly; let’s take a look at the Sun Web Server and see what it can do.



First and foremost, don’t let the name fool you. Many publications from Sun refer to the Sun Java –something, but they are not Java applications. The Sun Web Server is written in C and C++, and is very performance-oriented. It supports Java applications, in a very neat way, but that’s the extent of its Javaness.

The Web Server itself supports a number of standard features, including:

  • HTTP/1.0, HTTP/1.1, and WebDAV
  • JSP/Servlet
  • CGI/FastCGI
  • HTML/SHTML
  • LDAP/PAM/.htaccess Access Control
  • SSL/ECC
  • PHP (with a downloadable module installed: easy to do)


That feature list, especially PHP, surprised us. It shouldn’t have, but despite our extensive Sun experience, we still half expect Sun to be a bit behind on supporting certain technologies in their existing product lines. The Sun Web server began its life as the Netscape Enterprise Server, and then morphed into the Sun ONE Web Server before settling on its current form.

Before we get into too much detail, we’d also like to point out that it runs on a wide variety of platforms: Solaris 8/9/10, Windows 2000/XP/2003, Linux (RHEL and SUSE), and HP-UX 11i. Oh, and it’s free. Web Server can be downloaded from Sun’s Web site by anyone. Like all Sun Enterprise software, the only reason you’d pay money is to get a support contract.

Installation

The installation of Web Server or Proxy Server is amazingly simple. The Proxy Server product can be used as a stand-alone reverse or forward proxy. The Web Server product itself has integrated reverse proxy functionality, though, which makes load-balanced cluster deployments easy and efficient.

To install Web Server, one simply downloads and runs an installer. Like all Sun software installations, the installer will set everything up for you in a sane fashion. Web Server is actually two parts—just like all Sun Enterprise products—the server itself and a configuration server. The installer asks you to provide installation directories and an administrator password. It really couldn’t be simpler.

Once the install is complete, we simply start the admin server and Web server, and then connect to the admin interface. There is also a command-line version, which is simpler for many people. All Web Server configurations are stored in plain text files, ready for hand-editing should you so desire. Warning: they are XML files, so it’s probably best to just use the CLI or Web tools.

Configuration and More Features

After connecting to the admin server Web interface, you’re presented with a few different options. The front page lists some common tasks, for ease of access, in addition to a “configurations” tab. A Configuration in Web Server is an entire server configuration. It can have many virtual servers and many HTTP listeners: a declaration of which IP addresses and ports to use. Once the terminology is straight, it’s extremely trivial to configure a test Web site.



We create a new configuration, and then enter that configuration’s options. Then create a new virtual server and HTTP listener, and we’re almost done. At the top of the page we’ll see “undeployed configuration,” which means that change have occurred, but the configuration hasn’t actually been deployed. Click “deploy” and you have a Web site.

If we want an SSL-enabled Web site, Sun Web Server has made it extremely simple for self-signed certificates. You can literally generate a certificate and enable SSL with a few clicks. Creating a SSL request for submission to your Certificate Authority is also very easy. However, if you’d like to use a valid certificate that you already own, you’re in trouble. The Web Server expects that it will be installing SSL certificates that were requested via Web Server’s mechanisms. If this isn’t the case, there’s a lengthy and painful process to import your existing certificate and key into the database Web Server uses.

Coming back to configuration options, let’s say we’d like to create a cluster of Web servers, and have a front-end reverse proxy that load balances between all of them. This too is extremely fun and easy! The specifics are in the documentation, but at a conceptual level, all we’d need to do is install the Web server and admin interface on all of our Web servers. Afterward, we can manage all “instances” through one interface, and when we click “deploy” in the main GUI, it pushes changes to all of the servers.

The manageability aspects of Web Server are all well and good, but if the server itself isn’t capable of serving the content we need, it’s all moot. The features listed above are only the tip of the iceberg. If you aren’t using JSP or PHP pages, the good news is that Web Server also supports CGI, which means that nearly anything can run on it. It can be assumed that Web Server will work for your site.

Security

We can’t talk about features without mentioning some of Web Server’s innovative security features. Sun created DoS attack awareness and Cross-Site Scripting detection. Both features are desperately needed in Web servers, and Sun has come to the rescue. DoS attack awareness means that Web Server can throttle back requests per second to specific URIs if a threshold is reached. That alone can be enough to keep your Web server responsive during an attack. It can also be a bit meaner, and “trickle” data to requesters, so that requests will either timeout or become slowed down enough to limit DoS damage.

Web Server is also one of the first to support ECC, or Elliptic Curve Cryptography. ECC is a next-generation cipher suite that makes SSL connections more secure. Web browser support is coming, and when it does, sites will be more secure and faster (compared to RSA). Web Server is ready.

Performance

What about performance? Don’t’ forget, Web Server is from Sun. It is highly multi-threaded, extremely robust, and 64-bit capable on Solaris AMD64 and SPARC platforms. Adding 64-bit capability is more than just “bigger addresses” remember, AMD64 optimizations can cause huge gains in SSL performance. Web Server also Crypto Acceleration frameworks, which means that cryptographic computations can be offloaded to hardware devices: an instant order of magnitude gain.

Sun Web Server is designed to handle millions of sessions at a time. But you’re probably still thinking that it requires a hefty server or lots of tweaking. Let’s try a little test. Default install of Web Server, serving its default HTML page, compared to a default install of Apache (with MPM-worker threading enabled, to be fair). It isn’t a real workload—there’s no external scripts being called or databases being accessed—it’s a test of both Web servers’ ability to deal with large numbers of connections. Sun’s world record using SpecWeb2005 speaks to its workload capabilities. Using AB, the Apache Benchmark tool, we observed:

Server Software: Apache/2.2.4
Concurrency Level: 200
Time taken for tests: 35.660196 seconds
Complete requests: 10000
Requests per second: 280.42 [#/sec] (mean)
Time per request: 713.204 [ms] (mean)
Time per request: 3.566 [ms] (mean, across all concurrent requests)
Transfer rate: 78.58 [Kbytes/sec] received

Server Software: Sun-Java-System-Web-Server/7.0
Concurrency Level: 200
Time taken for tests: 24.686505 seconds
Complete requests: 10000
Requests per second: 405.08 [#/sec] (mean)
Time per request: 493.730 [ms] (mean)
Time per request: 2.469 [ms] (mean, across all concurrent requests)
Transfer rate: 107.59 [Kbytes/sec] received

If we bump the concurrent requests to 1000, the following results are not surprising; Sun always excels at multi-threaded performance:
Apache:
Requests per second: 175.12 [#/sec] (mean)
Sun Web Server:
Requests per second: 364.82 [#/sec] (mean)

In summary, Sun Web Server is generally two times as fast as Apache. Both tests fetched a 44-byte document and ran on a slow Sun Netra X1 400MHz server. We had a SunFire X4600 available to test with (review coming soon), but it seemed more impressive to test this server on modest hardware.

The Sun Web Server is fast, flexible, scalable, and a downright joy to run. Other Web servers may still have some benefits, mainly because of administrator familiarity, but if performance and ease of management are valued, Web Server is the way to go.

 
 
Joomla 1.5 Templates by Joomlashack