Enterprise storage comes in many different shapes. Two of the most common -- and long-standing -- ways to add storage...
capacity to a network architecture are through a storage area network or network-attached storage. There is much to consider when assessing SAN vs. NAS, so the best option isn't the same for every organization. However, by looking at the benefits and drawbacks of each, you should be able to choose the right data storage system for your organization.
Generally speaking, if your application requires block I/O or if there is a significant performance requirement, use a SAN. If your application uses file-based I/O or if you're file sharing and you want simple administration, NAS would be the best option.
Although that's a good rule of thumb for knowing when to use each system, there are nuances to each approach and to every use case. Below, with the help of some simple visuals, we'll outline the differences between SAN vs. NAS, how each system works and where it works best.
What is SAN?
A SAN is a dedicated high-speed network that interconnects and presents shared pools of storage to servers. A SAN is an independent storage network that enables high performance and access to storage similar to how DAS works. There are three components to a SAN: cabling, host bus adapters (HBAs) and switches.
HBAs used for storage are typically protocols such as Fibre Channel (FC) or Serial-Attached SCSI. Ethernet-based iSCSI is another protocol option that small and midsize organizations more commonly use.
In a SAN, the switch connects servers and shared pools of storage. An FC switch is most often used in a SAN, because it is compatible with the FC protocol and is designed for high performance and low latency. Ethernet switches are also common.
SANs can be managed centrally and send out block storage-based data access requests for a storage device.
A SAN can be used for distributed applications, thanks to speedy local network performance and high availability for applications. Because IT administrators can offload storage functions and separate storage networks, a SAN offers improved performance over storage systems that aren't as structured or scalable.
Using a SAN enables admins to tier storage and consolidate resources, and a SAN is generally considered a secure storage system. All these benefits also contribute to the drawbacks of using a SAN: cost and complexity. The hardware involved with building a SAN comes with a high price tag and its implementation requires specialized services, which will add to the bill. Also, FC is a protocol developed specifically for storage and is more expensive than common network protocol Ethernet, so FC SANs will increase the price even more.
What is NAS?
NAS is also a network-based storage system, but unlike a SAN, NAS uses dedicated file storage. NAS enables users and client devices to get data from a centralized disk drive, while still providing security and access control. NAS devices are typically managed like a browser, and they don't have a keyboard or display.
NAS connects to an Ethernet network through a switch, and protocols include NFS and SMB.
Using a NAS enables users to share data and collaborate easily and effectively. Teams that have users working remotely or in different time zones particularly benefit from NAS, which connects to a wireless router and is accessible to distributed work environments. If a device is connected to the network, a user can easily access the files residing on the storage network.
NAS resides on a LAN. NAS nodes are independent on the LAN, and each has a unique IP address. Because of the collaborative nature of NAS, it's commonly deployed as the foundation for a cloud storage system.
One major factor to consider in the SAN vs. NAS debate is cost. Along with its accessibility and high capacity, NAS is a relatively low-cost data storage system. NAS devices typically come with minimal components to maintain and manage. Of course, cost will vary by size and scope, so keep that in mind when looking into NAS. NAS systems can be designed for home offices and smaller businesses, as well as enterprises.
Differences between SAN and NAS
At a basic level, SAN is more like DAS than NAS, because it uses block storage. NAS works as a remote system, where file requests are redirected over a network to a NAS device.
While NAS is designed to handle unstructured data, SAN is used primarily for structured data that has been organized and formatted inside a database. Unstructured data is increasingly common today, however, thanks to massive amounts of data coming from sources such as videos, audio files, photos and medical images that don't get consolidated and organized the way structured data does. If your organization deals with large amounts of unstructured data, NAS might be a better option.
If performance is your priority, SAN is the better option. While the file system of NAS tends to result in lower throughput and higher latency, SAN is well suited to high-speed traffic. Scalability is another point in SAN's corner; the architecture of a SAN enables scaling up or scaling out capacity and performance. While higher-end enterprise NAS can be highly scalable, entry-level NAS is not.
As mentioned earlier, there are a lot of differences between NAS and SAN when it comes to cost. A SAN is not only more expensive than a NAS from the start because of its high-priced hardware and specialized services, but its complexity makes maintenance and management a great deal more costly as well. NAS deployment consists of plugging into the LAN, while a SAN means adding hardware and often bringing in administrators specialized in managing the network.
Using SAN and NAS together
At this point, you might be looking at the benefits of both SAN and NAS wondering why you can't use them together. Some businesses do just that. Rather than debate SAN vs. NAS, these organizations use a combination of the two network types -- sometimes, in the same multiprotocol storage array. The two systems can complement each other and meet different needs within the organization.
To add NAS to a SAN, a NAS gateway can be used to support both systems. A NAS gateway is a NAS system that externally attaches storage media, usually over an FC interface. This gives the IP network access to the SAN's block-level storage, while processing client requests through NFS and SMB sharing protocols. But many mainstream SAN arrays now support files without requiring a NAS gateway.
Combining the SAN and NAS storage systems through a NAS gateway will add scalability and performance and the best of both SAN and NAS worlds. A NAS gateway keeps costs down when consolidating the storage systems and isn't limited by the storage capacity like a traditional appliance.
Which is better: SAN or NAS?
The SAN vs. NAS decision comes down to the type of data you're storing in your data center. With block I/O, SAN is used; with file I/O, NAS is used. When comparing SAN vs. NAS, keep in mind that NAS turns the file I/O request into block access for the attached storage devices. SANs are the preferred choice for structured data -- data in a relational database. Although NAS can handle structured data, it's usually used for unstructured data -- files, email, social media, images, videos, communications and any type of data outside of relational databases.
Object I/O for storage has become more prevalent because of its overwhelming use in cloud storage. As a result, the clear divide between SAN being used with block storage and NAS with file storage is becoming blurred.
As vendors move from block or file to object I/O for their storage needs, users still want to access data in the way they are used to: block storage for SAN or file storage for NAS. Vendors are offering systems with front ends that present a NAS or SAN experience, while the back end is based on object storage.
File vs. block vs. object
File I/O storage reads and writes data in the same manner as the user does on a drive on a computer, using a hierarchical structure, with files inside folders that can be inside more folders. NAS systems commonly use this approach, and it has important benefits:
- When used with NFS and SMB -- the most common NAS protocols -- a user can copy and paste files or entire folders.
- The IT department can easily manage these systems.
Block I/O storage treats each file or folder as various blocks of smaller bits of data and distributes multiple copies of each block across the drives and devices in a SAN system. The benefits of this approach include the following:
- Greater data reliability. Data can still be accessed if one drive or several drives fail.
- Faster access. Files can be reassembled from the blocks closest to the user and don't need to pass through a hierarchy of folders.
Object I/O storage treats each file as one object, like file I/O, and doesn't have a hierarchy of nested folders like block I/O. With object storage, all files or objects are put into a single, enormous data pool or flat database. Files are found based on the metadata that is already associated with the file or added by the object storage operating system.
Object storage has been the slowest of the three methods and is mainly used for cloud file storage. But recent advances in the way metadata is accessed and increased use of flash drives have narrowed the speed gap among object, file and block storage.
How DAS fits in
DAS is a dedicated server or data storage device not connected to a network. The simplest DAS is a computer's hard drive. To access files on DAS, a user must have access to the physical storage.
DAS can outperform NAS, particularly for compute-intensive programs. However, with DAS, the storage on each device must be managed separately, making system management more complex. DAS systems generally don't offer advanced storage management features, such as replication, snapshots and thin provisioning, that are common in SAN and NAS.
DAS also doesn't enable shared storage among multiple users. And because only one host accesses a DAS device, only a portion of the available storage is used.
The rise of unified storage
The emergence of unified storage has provided the flexibility to run block or file storage on the same array. These multiprotocol systems consolidate SAN block-based data and NAS file-based data on one storage platform. Customers can start with either SAN or NAS and add support and connectivity later. Or, they can buy a storage array that supports both SAN and NAS.
Unified storage can use file protocols, such as SMB and NFS, along with block protocols, such as FC and iSCSI. One advantage of these systems is they require less hardware than traditional storage. And newer unified storage offerings are incorporating cloud storage and storage virtualization.
The NVMe advantage
The greatest amount of action and excitement today comes from extending the NVMe protocol over fabric.
The NVMe protocol is the fastest way to connect a flash storage device to a computer's motherboard, communicating via the PCIe bus. It greatly outperforms an SSD connected via SATA. Imagine if you could extend that speedy NVMe connection across the fabric that knits together a SAN system.
NVMe can't be used to transfer data between a remote end user and the storage array, so a messaging layer must be used. This makes NVMe seem more like an Ethernet-connected NAS system, which uses Ethernet's TCP/IP protocol to handle data movement. But NVMe over fabrics developers are working on using remote direct memory access to ensure the messaging layer has less effect on speed.
Dig Deeper on Primary storage devices
Related Q&A from Randy Kerns
Vendors often publish numbers for 'usable' capacity versus 'effective' capacity. Can you explain this and how can you plan flash capacity needs with ... Continue Reading
Learn why data protection practices common in traditional file storage environments aren't the best option for objects, and how metadata can help. Continue Reading
Learn how different scale-out architectures can be good options for providing high availability and easy growth. Continue Reading