×
Community Blog What Are the Differences Between OSS, NAS, and EBS?

What Are the Differences Between OSS, NAS, and EBS?

This article introduces common storage types and their differences to help readers select the appropriate storage type for different requirements and scenarios.

By Rongrong Chen (Mingxu)

Since hot topics (such as AIGC and large models) have attracted much attention recently, how do you choose storage mediums in different industry scenarios? What factors should be considered when you select models?

This article introduces common storage types and their differences to help readers select the appropriate storage type for different requirements and scenarios.

An Introduction to Storage Types

The physical layer of storage is a disk, memory that uses magnetic recording technology to store data. The disk is the main storage medium of the computer. It can store a large amount of binary data and can keep it from being lost even after a power failure. Early computers used floppy disks. Today, hard disks are commonly used.

An Introduction to Disks

A storage disk has three common metrics: throughput, IOPS, and latency. The relationship between the three metrics is represented by the following formula: Throughput per second = I/O size * IOPS * Degree of parallelism (IOPS-latency).

  1. Throughput is the amount of data transmitted to a network, device, port, virtual circuit, or other facility within per unit of time (measured in bits, bytes, packets, etc.).
  2. Input/Output Operations Per Second (IOPS) is a measurement method for the performance testing of computer storage devices (such as hard disk drive – HDD, solid-state drive – SSD, hybrid hard drive – HHD, and storage area network – SAN), which can be regarded as the number of reads and writes per second.
  3. Latency is the time interval between the time a data read request is initiated and the time data is read.

Underlying Principles of Alibaba Cloud Storage Products

Alibaba Cloud storage uses the Pangu system (a virtualization technology for physical storage resource pooling on the disk resources at the physical layer to build a distributed resource scheduling system), which can provide users and customers with a pay-as-you-go and on-demand experience similar to water, electricity, and coal resources.

Differences in Storage Types

Differences in Storage Methods

Files, blocks, and objects are three storage formats that hold, organize, and present data in different ways.

  1. Apsara File Storage (NAS) organizes and presents data in a hierarchical structure of files and folders.
  2. Elastic Block Storage (EBS) splits data into randomly divided volumes of the same size.
  3. Object Storage Service (OSS) manages data and links it to associated metadata.

Differences in Interface Protocols

The three storage products have different interface protocols:

  1. The NAS file system protocols are NFS and SMB and support POSIX access.
  2. The EBS protocol is developed by Alibaba Cloud, and the encapsulation interface is iSCSI.
  3. The OSS protocol is HTTP/HTTPS protocol (Restful API), which locates files by URL domain name and supports the AWS S3 interface.

Differences in Application Scenarios

The three products are suitable for different application scenarios due to the different storage data and storage structures.

Apsara File Storage NAS

The storage architecture of a NAS file system is a directory tree structure. It can support thousands of virtual machines to access simultaneously and concurrently through the POSIX interface. It also supports random and direct read and write and online modification.

Elastic Block Storage (EBS)

  1. EBS has high performance and low latency. It is suitable for I/O-intensive, high-performance, and low-latency application workloads (such as OLTP and NoSQL databases) and supports random read and write.
  2. EBS is a raw disk. After it is mounted to an ECS instance, it cannot be directly accessed by operating system applications. It must be formatted into a file system (such as ext3, ext4, and NTFS) before it can be accessed.
  3. EBS cannot implement elastic capacity expansion. The maximum capacity of a single disk is 32 TB, and the support for shared access is limited. Therefore, you must use cluster management software (such as Oracle RAC and WSFC Windows failover clusters) to achieve shared access. Therefore, each EBS device provides high-performance and low-latency storage service for only one ECS instance.

Object Storage Service (OSS)

OSS file architecture is a Simple Storage Service (S3) that organizes files in a flat format. OSS does not support random read and write of files. OSS is suitable for uploading, downloading, and distributing large amounts of data over the Internet.

The objects are stored in the bucket. Objects are like files, buckets are like folders or directories, and objects and buckets are searched with uniform resource identifiers (URI). Although the console interface seems to have a tree structure, the displayed folder /.resource is only a prefix.

Storage Service Latency Throughput Protocol Access mode (the interface for the virtual machine to access stored data) Scenarios
Apsara File Storage NAS Milliseconds Hundreds of Gigabits per Second NFS and SMB Thousands of ECS instances perform concurrent random read and write operations on an Apsara File Storage NAS file system through POSIX. Scenarios of highly concurrent access, online modification, and direct read and write
Object Storage Service (OSS) Tens of Milliseconds Hundreds of Gigabits per Second HTTP and HTTPS (Restful API) Millions of clients concurrently access an OSS bucket and perform append operations using the web. Upload, download, and distribute large amounts of data over the Internet
Elastic Block Storage (EBS) A Few Microseconds Tens of Gigabits per Second Self-Research Agreement A single ECS instance performs random read and write operations on a block storage device through POSIX Suitable for high-performance, low-latency application workloads (such as I/O-intensive databases and single ECS instances)

Detailed Differences between Protocols and Interfaces

What Is an Interface? What Is an Agreement?

  • Protocol

A protocol defines the format and order of messages exchanged between two or more communicating entities and the actions taken to send and/or receive a message or other event.

  • Interface

Interfaces are often linked to modules in the case of programming. The module is a physical grouping of program entity definitions and is a program unit that can be written and compiled separately. A module includes two parts: interface and implementation. The interface of a module specifies some program entities defined in the module that can be used by other modules. The implementation of a module refers to the specific implementation of the program entities defined in the module. The interface acts as a constraint between the module designer and the user: the user uses the functions provided by the module according to the module interface, and the designer implements modules according to the specified module interface.

  • Connection

Protocols and interfaces often appear together or are used in a mixed way. They are essentially abstract sets of rules that have different meanings in different situations. For example, in the context of computer networks, protocols are often referred to as network protocols or communication protocols, and each layer in the network model has a different protocol. In programming scenarios, we often refer to a specific interface, which can be narrowly understood as interaction points (similar to the service window to the government affairs hall), functions, and methods. However, in specific scenarios, for example, the API is referred to as an interface by default (it is an inclusion relationship, not an equivalence relationship).

Broadly speaking, interfaces and protocols can be used together, and they are highly abstract concepts. In a narrow sense, protocols and interfaces are specific (for example, java has a definable interface, which is often used to compare with abstract classes). At this time, the two are different.

  • In One Word

Protocols are common rules and paradigms for multiple communicating entities. Interfaces are concrete implementations of the rules specified in protocols.

Connection: The protocol is the established rule of the interface, and the interface is the concrete implementation of the protocol.

Difference: It is unnecessary to distinguish too much between the protocol and the interface. They are more closely linked.

Protocol Introduction

NFS Protocol

1.  Definition: Network File System (NFS) is a UNIX presentation layer protocol for file sharing developed by SUN Microsystems. It enables users to access files elsewhere on the network as if they were using their own computers.

2.  Differentiated Features of NFS

a) NFS only provides basic file processing functions but does not provide any four-layer TCP/IP and OSI seven-layer data transmission service functions. RPC protocol is needed to realize TCP/IP data transmission service functions.

b) By default, NFS is not encrypted and is completely transparent to the client. You can only use the IP address or hostname to determine whether to allow the client to mount a specified shared directory, plaintext transmission. You can use Kerberos to authenticate and encrypt NFS.

3.  NFS and other file sharing protocols have something in common: use the C/S architecture.

4.  NFS implementation principle: the owner, group, and permissions of shared resources

a) The NFS server and client identify the owner information of the shared resource by UID and GID. When the client mounts an NFS share directory, the UID and GID of the resources in the shared directory will be consistent with those on the server. The client will map the UID and GID to the corresponding user name and group name on the client. The permissions and ACL information (if supported) of shared resources on the NFS server and client will be consistent.

SMB Protocol

  1. Definition: The Server Message Block (SMB) network system protocol that allows applications and end users from remote file servers to access file resources. Common Internet File System (CIFS) is a derivative protocol of SMB.
  2. Differences between SMB and NFS: Their operating systems are different. NFS is compatible with Linux operating systems, and SMB is compatible with Windows and Linux. However, the storage performance of SMB is affected when it is compatible with Linux.
  3. SMB Protocol Application Process: Negotiate > Session Setup > Tree Connect > File System Operations > Tree Disconnect > Logoff

iSCSI Protocol

  1. Definition: Internet Small Computer System Interface (iSCSI), also known as IP-SAN, is a storage technology based on the Internet and SCSI-3 protocols proposed by the IETF. It became a formal standard on February 11, 2003.
  2. Implementation Principle: iSCSI uses port 860 and port 3260 of TCP/IP as communication channels. Use iSCSI protocol to exchange SCSI commands between the two computers, so computers can emulate SAN as a local storage device through a high-speed LAN hub.
  3. Application Scenario and Function: It can communicate with any SCSI device and always use it to connect server computers (for example, database servers) and storage arrays on disk volumes.

iSCSI SAN is typically used for two purposes:

  • Storage integration companies want to move different storage resources from servers scattered across a network to a unified location (often a data center). This can make storage allocation more efficient. Servers in the SAN environment can get newly allocated disk volumes without changing hardware or cable connections.
  • Disaster recovery companies want to mirror storage resources from one data center to another remote data center which can be used as a hot backup in the event of a long power outage. In particular, iSCSI SANs allow us to migrate an entire disk array over WAN with minimal configuration changes, essentially making the storage routable, just like normal network communication.

POSIX Protocol

  1. Definition: Portable Operating System Interface (POSIX) is the general term for a series of interrelated standards that IEEE defines APIs for running software on various UNIX operating systems.
  2. The principle application is programmed through an application programming interface (API) rather than directly through system calls (it does not need to be programmed with system calls provided by the kernel).

a) An API defines a set of programming interfaces used by applications. They can be implemented by calling one or multiple systems, and there is no problem without using any system calls.

b) APIs can provide applications with the same interface on various operating systems. However, the implementation of the API on these systems may be different. For example, when an application calls the printf() function, the printf function will call printf in the C library and then call write in the C library, and the C library will call the function of the kernel system. Windows may call function A, and Linux may call function B. Different kernels provide different system calls (a function) to complete the same function.

RESTful API

  1. Definition: RESTful is a design style and development method of network applications. It transmits protocols based on HTTP and can be defined in XML or JSON format, regardless of programming language and platform. RESTFUL applies to scenarios where a mobile Internet vendor serves as a service interface. It can enable a third-party OTT to call mobile network resources. The action types include adding, changing, and deleting the called resources.
  2. RESTful APIs are RESTful-style APIs.
  3. Application Scenario: A set of protocols to regulate the interaction between various forms of frontend and the same backend.
  4. Implementation Principle: RESTful API unifies the interface of data operation, and its data operation CRUD (create, read, update, delete) corresponds to different HTTP methods: GET is used to get resources, POST is used to create or update resources, PUT is used to update resources, and DELETE is used to delete resources. During calling, use the URL to locate resources and use HTTP verbs (GET, POST, PUT, and DELETE) to describe operations.

Protocol Comparison

Different Storage Principles

  1. iSCSI: The port 860 and port 3260 of TCP/IP are used as communication channels. Use iSCSI protocol to exchange SCSI commands between the two servers, so servers can emulate SAN as a local storage device through a high-speed LAN hub.
  2. CIFS (SMB): This is a public or open SMB protocol version used by Microsoft. SMB protocol is used on a local area network for server file access and printing.
  3. NFS: By using NFS, users and programs can access files on remote systems the same way they access local files.

Different Storage Features

  1. iSCSI: It enables two hosts to negotiate with each other over an IP network and then exchange SCSI commands. This way, iSCSI uses WAN to emulate a commonly used high-performance local storage bus, creating a storage area network (SAN).
  2. CIFS: CIFS runs at the upper layer, not the lower layer (like TCP/IP). CIFS can be seen as an implementation of application protocols (such as file transfer protocol and hypertext transfer protocol).
  3. NFS: It may be convenient to configure a central NFS server to house all users' home directories. These directories can be exported to the network, so users can always get the same home directory no matter which workstation they log on.

References

Disclaimer: The views expressed herein are for reference only and don't necessarily represent the official views of Alibaba Cloud.

0 1 0
Share on

Alibaba Cloud Community

876 posts | 198 followers

You may also like

Comments

Alibaba Cloud Community

876 posts | 198 followers

Related Products