Monday, February 28, 2005

Zones in anger

One of the great features in Solaris 10 is Zones: isolated instances of the Operating system hosted - somewhat like a virtual machine or FreeBSD jails - by a master instance of the Operating System.

We've been using zones for a variety of tasks for the best part of a year now. We had our main webserver running in a zone on my workstation for a few days last summer when the original server got hit by a disk failure. Whipping up a quick zone with the same IP address and name as the ailing hardware was much easier and quicker than finding a spare box and setting it up to suit.

Another major use for zones is for development - particularly for websites. You want to run apache/tomcat/mysql, and these want to use standard ports, so you can only run one instance on a host. But you can run this sort of setup in a zone, and the zones are isolated. It's so much easier (and cheaper) to set up a zone than to build up a separate machine (even though whipping up a machine is pretty trivial using jumpstart). And it's easier than futzing the port numbers to get multiple instances coexisting on one system. My own workstation currently has several zones set up for exactly this purpose.

We have a number of servers that are pretty well open to end users. So we're putting these in zones for isolation - if they're compromised then the underlying systems are less exposed and have an extra layer of protection.

The final use of zones that we're deploying - at present - is as a simple form of redundancy. What we have is a service running in a zone on one machine. Then we have an identically configured zone, with the same name and IP address, on a second machine, but not booted. We can switch the service between machines in seconds - that's all it takes to shut the one zone down and boot the other one.

These scenarios have all been tested for the best part of a year; we're now starting to move to live deployment on the full release of Solaris 10.

No comments: