Archive for the ‘Cluster, Load balancing’ category

Optimize and Tweak High-Traffic Servers

June 30th, 2010

Summary

If you are reaching the limits of your server running Apache serving a lot of dynamic content, you can either spend thousands on new equipment or reduce bloat to increase your server capacity by anywhere from 2 to 10 times. This article concentrates on important and poorly-documented ways of increasing capacity without additional hardware.

Problems
There are a few common things that can cause server load problems, and a thousand uncommon. Let’s focus on the common:

1. Drive Swapping – Too many processes (or runaway processes) using too much RAM
2. CPU – poorly optimized DB queries, poorly optimized code, runaway processes
3. Network – Hardware limits, moron attacks

Solutions:
Briefly, and for completeness, here are the most obvious solutions:
1. Use “TOP” and “PS axu” to check for processes that are using too much CPU or RAM.
2. Use “netstat -anp | sort -u” to check for network problems.

Solutions: Apache’s RAM Usage
First and most obvious, Apache processes use a ton a RAM. This minor issue becomes a major issue when you realize that after each process has done its job, the bloated process sits and spoon-feed data to the client, instead of moving on to bigger and better things. This is further compounded by a bit of essential info that should really be more common knowledge:

If you serve 100% static files with Apache, each httpd process will use around 2-3 megs of RAM.
If you serve 99% static files & 1% dynamic files with Apache, each httpd process will use from 3-20 megs of RAM (depending on your MOST complex dynamic page).

This occurs because a process grows to accommodate whatever it is serving, and NEVER decreases again unless that process happens to die. Quickly, unless you have very few dynamic pages and major traffic fluctuation, most of your httpd processes will take up an amount of RAM equal to the largest dynamic script on your system. A smart web server would deal with this automatically. As it is, you have a few options to manually improve RAM usage.

Reduce wasted processes by tweaking KeepAlive
This is a tradeoff. KeepAliveTimeout is the amount of time a process sits around doing nothing but taking up space. Those seconds add up in a HUGE way. But using KeepAlive can increase speed for both you and the client – disable KeepAlive and the serving of static files like images can be a lot slower. I think it’s best to have KeepAlive on, and KeepAliveTimeout very low (like 1-2 seconds).

Limit total processes with MaxClients
If you use Apache to serve dynamic content, your simultaneous connections are severely limited. Exceed a certain number, and your system begins cannibalistic swapping, getting slower and slower until it dies. A web server should automatically take steps to prevent this, but instead they seem to assume you have unlimited resources. Use trial & error to figure out how many Apache processes your server can handle, and set this value in MaxClients. Note: the Apache docs on this are misleading – if this limit is reached, clients are not “locked out”, they are simply queued, and their access slows. Based on the value of MaxClients, you can estimate the values you need for StartServers, MinSpareServers, & MaxSpareServers.

Force processes to reset with MaxRequestsPerChild
Forcing your processes to die after a while makes them start over with low RAM usage, and this can reduce total memory usage in many situations. The less dynamic content you have, the more useful this will be. This is a game of catch-up, with your dynamic files constantly increasing total RAM usage, and restarting processes constantly reducing it. Experiment with MaxRequestsPerChild – even values as low as 20 may work well. But don’t set it too low, because creating new processes does have overhead. You can figure out the best settings under load by examining “ps axu –sort:rss”. A word of warning, using this is a bit like using heroin. The results can be impressive, but are NOT consistent – if the only way you can keep your server running is by tweaking this, you will eventually run into trouble. That being said, by tweaking MaxRequestsPerChild you may be able to increase MaxClients as much as 50%.

Apache Further Tweaking
For mixed purpose sites (say image galleries, download sites, etc.), you can often improve performance by running two different apache daemons on the same server. For example, we recently compiled apache to just serve up images (gifs,jpegs,png etc). This way for a site that has thousands of stock photos. We put both the main apache and the image apache on the same server and noticed a drop in load and ram usage. Consider a page had about 20-50 image calls — the were all off-loaded to the stripped down apache, which could run 3x more servers with the same ram usage than the regular apache on the server.

Finally, think outside the box: replace or supplement Apache

Use a 2nd server
You can use a tiny, lightning fast server to handle static documents & images, and pass any more complicated requests on to Apache on the same machine. This way Apache won’t tie up its multi-megabyte processes serving simple streams of bytes. You can have Apache only get used, for example, when a php script needs to be executed.

Try Turck MMCache
Turck MMCache is a free open source PHP accelerator, optimizer, encoder and dynamic content cache for PHP. It increases performance of PHP scripts by caching them in compiled state, so that the overhead of compiling is almost completely eliminated. Also it uses some optimizations to speed up execution of PHP scripts. Turck MMCache typically reduces server load and increases the speed of your PHP code by 1-10 times. More details please see this article http://onaxer.com/blog/?p=530

Try HAproxy
You can use some open source or hardware loadblancer to devide the load among multiple servers. For open source Haproxy is best options (http://haproxy.1wt.eu/) as I am using Haproxy past couple of yesrs and i have very -2 good experience. There so many types of hardware Loadblancer like Cisco Local Director etc..

Try Varnish
We cab also use caching server like Varnish. Varnish is an HTTP accelerator designed for content-heavy dynamic web sites. In contrast to other HTTP accelerators, many of which began life as client-side proxies or origin servers, Varnish was designed from the ground up as an HTTP accelerator.
http://en.wikipedia.org/wiki/Varnish_%28software%29. Using Varnish we can handle thousands of users without any problems, most of company using caching technologies to enhance their performance.

Try lingerd
Lingerd takes over the job of feeding bytes to the client after Apache has fetched the document, but requires kernel modification. Sounds pretty good, haven’t tried it. lingerd – http://www.iagora.com/about/software/lingerd/

Use a proxy cache
A proxy cache can keep a duplicate copy of everything it gets from Apache, and serve the copy instead of bothering Apache with it. This has the benefit of also being able to cache dynamically generated pages, but it does add a bit of bloat.

Solutions: PHP’s CPU & RAM Usage
Compiling PHP scripts is usually more expensive than running them. So why not use a simple tool that keeps them precompiled? I highly recommend Turck MMCache. Alternatives include PHP Accelerator, APC, & Zend Accelerator. You will see a speed increase of 2x-10x, simple as that. I have no stats on the RAM improvement at this time.

Solutions: Optimize Database Queries
This is covered in detail everywhere, so just keep in mind a few important notes: One bad query statement running often can bring your site to its knees. Two or three bad query statements don’t perform much different than one. In other words, if you optimize one query you may not see any server-wide speed improvement. If you find & optimize ALL your bad queries you may suddenly see a 5x server speed improvement. The log-slow-queries feature of MySQL can be very helpful.

How to log slow queries:
# vi /etc/rc.d/init.d/mysqld

Find this line:
SAFE_MYSQLD_OPTIONS=”–defaults-file=/etc/my.cnf”

change it to:
SAFE_MYSQLD_OPTIONS=”–defaults-file=/etc/my.cnf –log-slow-queries=/var/log/slow-queries.log”

As you can see, we added the option of logging all slow queries to /var/log/slow-queries.log
Close and save mysqld. Shift + Z + Z

touch /var/log/slow-queries.log
chmod 644 /var/log/slow-queries.log

restart mysql
service myslqd restart
mysqld will log all slow queries to this file.

Cheers!!
Manoj Chauhan

Load balancing with Varnish

April 11th, 2010

Introduction:-

Varnish has a built in load balancer. Use this if you have more then one origin server. Using this is quite easy. You start up by declaring more then one backend server. We add a probe object to each backend to let varnish check the health of the objects.
{{{
backend foo {
  .host = “foo.example.com”;
  .probe = {
                .url = “/”;
                .interval = 5s;
                .timeout = 1 s;
                .window = 5;
                .threshold = 3;
  }
}

backend bar {
  .host = “bar.example.com”;
  .probe = {
                .url = “/”;
                .interval = 5s;
                .timeout = 1 s;
                .window = 5;
                .threshold = 3;
  }
}
}}}
Here we have two, ”foo” and ”bar”. The probe specifies that Varnish should fetch the / object every 5s. If it takes more then a second it is considered a failure. If more then 3 out of the 5 last probes are OK the backend is considered healthy. For details on health checking see the [wiki:BackendPolling backend health polling] page.

Now these two backends need to be wrapped in a single logical director, sort of a virtual backend. Lets call it baz.
{{{
director baz round-robin {
        {
                .backend = foo;
        }
        {
                .backend = bar;
        }
}
}}}

Thats it, really. The keyword ”round-robin” indicates that requests will be distributed among the backends in a round-robin fashion. Currently there also exists a ”random” director. You can probably guess how it works. :-)

You can send traffic to your brand new director in vcl_recv, like this:
{{{
sub vcl_recv {
   if (req.http.host ~ “^(www.)?mysite.com$“) {
       set req.backend = baz;
   }
}

There are more options documentet on the VCL manual page.

Thanks
Manoj chauhan

Cluster, Load balancing, SAN Technology

January 18th, 2010

What is a cluster
In its simplest form, a cluster is two or more computers that work together to provide a solution. This should not be confused with a more common client-server model of computing where an application may be logically divided such that one or more clients request services of one or more servers. The idea behind clusters is to join the computing powers of the nodes involved to provide
Higher scalability, more combined computing power, or to build in redundancy to provide higher availability. So, rather than a simple client making requests of one or more servers, clusters utilize multiple machines to provide a more powerful computing environment through a single system image. Clusters of computers must be somewhat self-aware, that is, the work being done on a specific node often must be coordinated with the work being done on other nodes. This can result in complex connectivity configurations and sophisticated inter-process communications between the nodes of a cluster. In addition, the sharing of data between the nodes of a cluster through a common file system is almost always a requirement. There are many other complexities that are introduced by clusters, such as the operational considerations of dealing with a potentially large number of computers as a single resource.

Cluster types

As just described, clusters may exist in many different forms. The most common cluster types are:
1. High availability (HA)
2. High performance computing (HPC)
3. Horizontal scaling (HS)

It should be noted that the boundaries between these cluster types are somewhat indistinct and often an actual cluster may have properties or provide the function of more than one of these cluster types.

High availability

High-availability clusters are typically built with the intention of providing a fail-safe environment through redundancy, that is, provide a computing environment where the failure of one or more components (hardware, software, or networking) does not significantly affect the availability of the application or applications being used. In the simplest case, two computers may be configured
identically with access to shared storage. During normal operation, the application environment executes on one system, while the other system simply stands by ready to take over running the application in the case of a failure. When a failure does occur, the second system takes over the appropriate resources (storage, networking address, and so on). This process is typically
called failover. The second system then completely replaces the failed system and the end users have no need to know that their applications are running on a different physical machine.

High performance computing

High performance computing clusters are designed to use parallel computing to apply more processor power to the solution of a problem. There are many examples of scientific computing using multiple low-cost processors in parallel to perform large numbers of operations. This is referred to as parallel computing or parallelism. In How to Build a Beowulf: A Guide to the Implementation and Application of PC Clusters (Scientific and Engineering Computation), by Sterling, et al, parallelism is defined as “the ability of many independent threads of control to make progress simultaneously toward the completion of a task.” High performance clusters are typically made up of a large number of computers. The design of high performance clusters is a challenging process that needs careful examination of items, such as the installation, maintenance, and management of a large number of computers, the requirements for parallel,
concurrent, and high performance access to same file system(s), and the inter-process communication between the nodes to coordinate the work that must be done in parallel. The goal is to provide the image of a single system by managing, operating, and coordinating a large number of discrete computers.

Horizontal scaling

Horizontal scaling clusters are used to provide a single interface to a set of resources that can arbitrarily grow (or shrink) in size over time. The most common example of this is a Web server farm. In this example, a single interface (URL) is provided, but requests coming in through that interface can be allocated across a large set of servers providing higher capacity and the ability to manage the end-user experience through functions such as load balancing. Of course, this kind of cluster also provides significant redundancy. If one server out of a large farm fails, it will likely be transparent to the users. Therefore, this model also has many of the attributes of a high-availability cluster. Likewise, because of the work being shared among many nodes, it also is a form of high-performance computing.

Architecture of Cluster

All clusters should act like “a single unified computing resource” to describe the architecture of an enterprise cluster. One example of a unified computing resource is a single computer,

The load balancer replaces the input devices. The shared storage device replaces a disk drive, and the print server is just one example of an output device. Let’s briefly examine each of these before we describe how to build them.

The Load Balancer

The load balancer sits between the users of the cluster and the “whole computers,” which are the nodes that make up the cluster. The load balancer decides how best to distribute the incoming workload across all of the nodes. In an enterprise cluster, user-based transactions make up the incoming workload. As users make connections to the cluster, such as HTTP web requests or telnet connections, they are assigned to cluster nodes based upon a load-balancing scheme.

The Shared Storage Device

The shared storage device acts as the single repository for the enterprise cluster’s data, just as a disk drive does inside a single computer. Like a single disk drive in a computer, one of the most important features of this storage device is its ability to arbitrate access to the data so that two programs cannot modify the same piece of data at the same time. This feature is especially important in an enterprise cluster because two or more programs may be running on different cluster nodes at the same time. An enterprise cluster must therefore use a filesystem on all cluster nodes that can perform lock arbitration. That is, the filesystem must be able to protect the data stored on the shared storage device in order to prevent two applications from thinking they each have exclusive access to the same data at the same time.

The Print Server
The output device in this example is just one of many possible cluster output devices—a shared print server. A shared print server and other servers that offer services to all cluster nodes are located outside the cluster

No Single Point of Failure

We can further describe the architecture of the enterprise cluster by discussing a basic requirement of any mission-critical system: it must have no single point of failure. An enterprise cluster should always have the following characteristic: Any computer within the cluster, or any
computer the cluster depends upon for normal operation, can be rebooted without rebooting the entire cluster .One way to be able to reboot servers the cluster depends upon without affecting the cluster is to build high-availability server pairs for all of the servers the cluster depends upon for normal operation.

Note Of course, one of the cluster nodes may also go down unexpectedly or may no longer be
able to perform its job. If this happens, the load balancer should be smart enough to remove
the failed cluster node from the cluster and alert the system administrator. The cluster nodes
should be independent of each other, so that aside from needing to do more work, they will
not be affected by the failure of a node.

Cluster Terminology

In a cluster, all computers (called nodes) offer the same services. The cluster load balancer intercepts all incoming requests for services. It then distributes the requests across all of the cluster nodes as evenly as possible. A high-availability cluster is able to failover the cluster load balancing resource from one computer to another.

Modifications to Allow Failover to a Real Server inside the Cluster

We have finished building our pair of highly available load balancers (with no single point of failure). However, before we leave the topic of failing over the Director as a resource under Heartbeat’s control, let’s look at how the Director failover works in conjunction with the LVS Local Node mode. Because a Linux Enterprise Cluster will have a relatively small number of incoming requests for cluster services (perhaps only one or two for each employee), dedicating a server to the job of load balancing the cluster may be a waste of resources. We can fully utilize the CPU capacity on the Director by making the Director a node inside the cluster; however, this may reduce the reliability of the cluster and should be avoided, if possible When we tell one of the nodes inside the cluster to be the Director, we will also need to tell one of the nodes inside the cluster to be a backup Director if the primary Director fails. Heartbeat running on the backup Director will start the ldirectord daemon, move all of the VIP addresses, and re-create the IPVS table in order to properly route client requests for cluster resources if the primary Director fails

the backup Director is also replying to client computer requests for cluster services —before the failover the backup Director was just another real server inside the cluster that was running Heartbeat. (In fact, before the failover occurred the primary Director was also replying to its share of the client computer requests that it was processing locally using the LocalNode feature of LVS.)Although no changes are required on the real servers to inform them of the failover, we will need to tell the backup LVS Director that it should no longer hide the VIP address on its loopback device. Fortunately, Heartbeat does this for us automatically, using the IPaddr2 script to see if there are hidden loopback devices configured on the backup Director with the same IP address as the VIP address being added. If so, Heartbeat will automatically remove the hidden, conflicting IP address on the loopback device and its associated route in the routing table. It will then add the VIP address on one of the real network interface cards so that the LVS-DR real server can become an LVS-DR Director and service incoming requests for Cluster services on this VIP address.

How Clustering Can Help
Although clustering might not be a panacea for today’s ills, it might help the organization that is trying to maximize some of its existing resources. Although not every program can benefit from clustering, organizations that serve applications, such as web servers, databases, and ftp servers, could benefit from the technology as loads on the systems increased. Clusters can easily be designed with scalability in mind; more systems can be added as the requirements increase, which spreads the load across multiple subsystems or machines.
Entities that require a great deal of data crunching can benefit from high-performance computing, which greatly reduces the amount of time needed to crunch numbers. Organizations such as the National Oceanic and Atmospheric Administration are able to use clusters to forecast trends in potentially deadly weather conditions. The staff at Lawrence Livermore Lab use clustered computers to simulate an entire nuclear explosion without harm to anyone (except the backup operators who have to maintain all that data).

Optimal high availability configuration.

Companies serving a great deal of bandwidth can benefit from load-balanced clusters. This type of cluster takes information from a centralized server and spreads it across multiple computers. Although this might seem trivial at first, load balancing can take place in a local server room or across wide-area networks (WANs) spanning the globe. Larger web portals use load balancing to serve data from multiple access points worldwide to serve local customers. Not only does this cut down on bandwidth costs, but visitors are served that much more quickly. These load-balanced servers also will benefit from the High Availability (HA) model. This model can include redundancy at all levels. Servers in a HA cluster benefit from having two power supplies, two network cards, two RAID controllers, and so on. It’s unlikely that all the duplicate devices of a HA cluster will fail at once, barring some major catastrophe. With the addition of an extra component to the primary subsystem or the addition of an extra server, an extra component can be put in place to help in case of failover. This is known as N+1 redundancy and is found in clusters, RAID configurations, power arrays, or wherever another component can take over in case of failure.

Introduction to Server Load Balancing

While Server Load Balancing (SLB) could mean many things, for the purpose of this book it is defined as a process and technology that distributes site traffic among several servers using a network-based device. This device intercepts traffic destined for a site and redirects that traffic to various servers. The load-balancing process is completely transparent to the end user. There are often dozens or even hundreds of servers operating behind a single URL.

DNS-Based Load Balancing

Before SLB was a technology or a viable product, site administrators would (and sometimes still do) employ a load-balancing process known as DNS round robin. DNS round robin uses a function of DNS that allows more than one IP address to associate with a hostname.

Traffic distribution

Traffic distribution is one of the problems with DNS round robin that caching causes. DNS round robin is supposed to distribute traffic evenly among the IP addresses it has listed for a given hostname. If there are three IP addresses listed, then one-third of the traffic should go to each server. If four IP addresses are listed, then one-fourth of the traffic should go to each server. Unfortunately, this is not how round robin works in live environments. The actual traffic distribution can vary significantly. This is because individual users do not make requests to the
authoritative name servers; they make requests to the name servers configured in their operating systems. Those DNS servers then make the requests to the authoritative DNS servers and cache the received information.

Global Server Load Balancing

Global Server Load Balancing (GSLB) has the same basic concept as SLB, but it distributes load to various locations as opposed to one location. SLB works on the Local Area Network (LAN), while GSLB works on the Wide Area Network (WAN).There are several ways to implement GSLB, such as DNS-based and BGP-based (Border Gateway Protocol). There are two main reasons to implement GSLB, and to illustrate them we’ll use an example of GLSB in action. Let’s take the example of a site that has a presence in two different data centers, one in San Jose, California, and one in New York City.

1. GSLB brings content closer to the users. With cross-country latency at around 60 ms (milliseconds) or more, it makes sense to bring the users as close to the servers as possible. For instance, it would make sense to send a user in North Carolina to a server in New York City, rather than to a server in San Jose,California.

2. GSLB provides redundancy in case any site fails. There are many reasons why an entire data-center installation can go offline, such as a fiber cut, a power outage, an equipment failure, or a meteor from outer space (as every summer New York City gets destroyed in some climactic scene in a Hollywood blockbuster). Sites choosing not to put all their eggs in one basket can use GSLB technology to divert traffic to any remaining sites in case of site failures. GSLB as a technology is still a work in progress, and there are limitations to both the DNS and BGP-based methods. With DNS-based GSLB the way it is, there is no guarantee that all of the West Coast users will be directed to the West Coast, or all of the East Coast users will be directed to the Easts Coast, and that everyone will be directed to another site in the event of a site-wide failure. There are also state and persistence issues with the various fail-over methods. Vendors are currently working on solutions. Though not 100 percent effective, GSLB is still an important technology and is employed by many large-scale sites.

Introducing Storage Area Networks

Storage area networks (SAN) are a mass storage solution for providing fast and instantaneous access to the storage in an enterprise network. SAN refers to the network infrastructure that is used to connect the computers and devices on the LAN to a separate network containing storage devices. SAN provides a reliable and highly scalable system for the storage of enormous amounts of data. The key point that distinguishes a storage area network from other storage arrangements is that the storage resides behind the servers and not on the LAN. SANs are used typically in enterprise networks where the storage requirements are in the range of multiple terabytes. The storage area network provides an ideal solution to networks that require a scalable and robust system. The disaster recovery features and zero downtime are key features of most SAN setups. Any organization that requires a huge storage capacity employ a SAN solution. This chapter gives you a brief history of storage area networks and an overview of their major features.

Data Storage Systems in a Network

A company or enterprise that deploys a network and works on any type of data requires a
suitable storage system. Does this mean that you will have to discard your existing storage devices? Well, the answer to that question would depend on the extent to which the current storage devices are compatible with SANs. In the following sections, you will learn about how to evaluate storage devices, new or old.

Factors to Be Considered for a Data Storage System

You should keep several factors in mind while selecting the method of storage required for your company or enterprise. These factors are

• The techniques involved are cost-effective.
• The storage capacity is scalable.
• The access to data is instant and reliable.
• The data is secure and data loss is avoided.
• The maintenance system can be designed to prevent breakages in performance.

Although there is no rigid order in the factors to be considered, the order mentioned above is based on the relative importance of the factors mentioned. The relative importance could vary from enterprise to enterprise. Cost has been placed at the top of the list for the simple reason that in more cases than not it plays a very important role in the final decision. Moreover, this factor would also justify the move to a SAN. You can and should vary the order on the basis of the relative importance of the factors. For example, if cost were not a prohibitive concern, then that would be the last factor to be considered in determining the choice of storage device.

Direct Attached Storage
Direct attached storage (DAS) contains storage devices, such as JBODs or disk arrays, attached directly to the server.

Note
Just a bunch of disks (JBOD) refers to the hard disk drives connected to a computer by using multiple slots. In a JBOD, a number of drives (which are not partitioned) are grouped together to form a single large logical volume. This enables the user to make optimum utilization of the capacity of the disk drives, because it combines the storage capacity of multiple drives. In this storage architecture, it is possible to add storage devices to increase the storage capacity to 25GB. When there is a need to increase the storage capacity, disk arrays are added. This type of storage not only proves to be expensive but also causes problems in terms of network traffic by choking the bandwidth. The clients (user machines) might not be able to access the server quickly for data. The main problem that is evident in this kind of a storage system is that if the server attached to a specific storage device malfunctions, the data stored in that device cannot be accessed, thus indicating a single point of failure.

Network Attached Storage

To overcome the problems of DAS architectures, there was a need for a storage architecture that could perform storage without consuming the bandwidth significantly. The solution was to implement architecture in the network that performs only the file input/output operations. The network attached storage (NAS) strategy includes NAS elements, such as file server and storage device, in the network.

NAS elements do not perform any other task apart from sharing files. NAS is assigned a unique network address. The NAS element offloads the task of storing data from the main server and allows it to be dedicated solely to processing. Offloading eliminates bandwidth bottlenecks in the network. It also ensures that the entire network is not shut down when the storage device must be replaced or upgraded. The clients might need to access the files that are on the main servers. If the NAS elements are included in the network, the main server is relieved from input/output operations. Therefore, the clients can retrieve data from the NAS elements directly. The clients issue file access commands by using file access protocols such as Common Internet File System (CIFS) and Network File System (NFS). The NAS elements in the network can receive and provide files to the clients, on request, with a very high rate of performance. NAS owes its high performance to the dedicated processor it contains. This processor works on specifically designed operating systems along with a special file system.The NAS operating system is optimized to cater to file I/O and file serving activities. Because of the optimization, the performance of the NAS operating system is better than a normal multi-purpose OS. The NAS OS is relatively smaller and less resource-intensive than the normal multi-purpose OS, and the result is evident in the improved data access times for the clients. In NAS, unlike other storage systems, the NAS server manages the file system used. An industry standard file system, such as NFS or CIFS, is used to store data. The setup and design of NAS has a number of benefits. The NAS setup has a simple configuration that makes it easier for the network administrator to install NAS on the network. The probability of downtime in NAS is significantly lower than that of DAS. NAS offers higher rates of data availability to the clients over the network.

Even if the NAS devices malfunction, the remaining operations in the network that involve the main server are unaffected. In case the main server crashes, the clients can continue to request and retrieve data from the NAS devices. The reliability of the main server is higher because NAS offloads the task of input/output and data storage from the main server. NAS offers improvements in terms of backup and security of data. This is because the backup of data takes place from one device on the network and not from all the servers connected to the network. In cases where the storage capacity of NAS elements is low, it is possible to add more tape backups to the NAS setup effectively without hindering the processing operations on the network. The NAS setup also offers the benefit of allowing data to be shared across heterogeneous platforms.

Note
In a client/server networking model, there is one computer that performs the role of a server and the other computers on the network act as clients. This networking model follows a many-to-one relationship where all the clients send requests to a server to carry out services. The server performs the function of supervising and processing the requests made by the client. Client PCs can access shared files if they have the required client software to connect with the relevant server. In addition, this type of an arrangement also builds pressure on the administrator to ensure that the client is updated when the server is updated. This is necessary to ensure that client has the same version of the software as the server, in order to ensure proper communication. The solution is to provide a file server to support the heterogeneous clients.

Why Storage Area Networks?

Overall, NAS paints a rosy picture; it is economical, promises reliability and security, but it has a few drawbacks. Let’s go back to our fictitious company, Westside Inc., which grew over the years and expanded. With the expansion, the volume of data that needs to be stored also rose. The NAS model was useful as long as the volume of data was lesser than terabytes. This increase in the volume of data was a problem because it was not feasible to add innumerable tape backups to increase storage capacity. A system that can back up terabytes of data without causing any bandwidth bottlenecks in the network was required. Storage area networks then gained recognition as a storage system that offered a solution to this requirement. Again, the advantage that the storage area networks offered over the other systems, such as NAS or DAS, is that all the processing happens behind the servers. Of course, if your network were properly designed then you would be able to get the system going as in most companies not currently implementing SANs. However, this poses its own set of problems; in a complex network, the performance is going to be far less than that offered by a SAN setup. In a NAS setup, the transfer of data is going to happen over the existing network. This adds a considerable overhead on your LAN, which is typically suited for short bursts of transmission. On the other hand, in a SAN setup, the entire transfer happens over a dedicated network capable of high-speed, high-bandwidth transfers. The bottom line is that if you can afford it and performance and reliability are your prime concerns in handling multiple terabytes of information, SANs are the solution for you. SAN is a technology that comprises a high-speed network of storage devices, interconnects, and interfaces. SAN is a group of components designed to form a transparent link between the servers and the storage devices. SAN reduces traffic congestion in a network by providing a strategy different from the conventional means of storage. SAN is a storage network that increases scalability and efficiency by setting apart consolidation of storage from the main network. Implementing a storage area network does not require the replacement of the existing network. A SAN can be easily implemented to work on the existing network with a few modifications “Designing Storage Area Networks.” In terms of cabling, a general opinion is that SAN works only with fiber optic cables or Fiber Channel, which is not the case. This kind of opinion exists because most SAN devices come with a lot of information and advertising about compatibility with Fiber Channel and the speeds it can reach are also measured with Fiber Channel connections. It is possible to build SAN by using the cables existing in a local or wide area network. The next section discusses a few of the cable types used in the existing networks, which canalso be used in SANs.