File storage

On the other hand, file storage or NAS is far more straightforward. You don't have to worry about partitioning, or about selecting and formatting a filesystem that suits your multi-host environment.

NAS is usually NFS or SMB/CIFS protocols, which are mainly used for storing data in shared folders as unstructured data. These protocols are not very good at scaling or meeting the high media demands that we face in the cloud, such as social media serving and creating/uploading thousands of images or videos each day. This is where object storage saves the day, but we will be covering object storage later in this chapter.

File storage, as the name suggests, works at the file level of storage when you perform a request to NAS; you are requesting a file or a piece of a file from the filesystem, not a series of logical addresses. With NAS, this process is abstracted from the host (where the storage is mounted), and your storage array or SDS is in charge of accessing the disks on the backend and retrieving the file that you are requesting. File storage also comes with native features, such as file-locking, user and group integration (when we are talking about OSS, we are talking about NFS mainly here), security, and encryption.

Even though NAS abstracts and makes things simple for the client, it also has its downsides, as NAS relies heavily, if not entirely, on the network. It also has an additional filesystem layer with much higher latency than block storage. Many factors can cause latency or increase round-trip time (RTT). You need to consider things such as how many hops your NAS is away from your clients, TCP window scaling, or having no jumbo frames enabled on devices accessing your file shares. Also, all these factors not only affect latency but are key players when it comes to the throughput of your NAS solution, which is where file storage excels the most.

The following diagram demonstrates how versatile file storage sharing is: