File writing method and device in a distributed system

A distributed system, technology of writing location, applied in the direction of transmission system, electrical components, instruments, etc., can solve problems such as long delay

Active Publication Date: 2020-07-31
ALIBABA GRP HLDG LTD
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] When the data storage layer completes the write operation, it adopts a chained data flow, and the data to be written has to go through multiple hops to reach all data nodes, such as figure 1 In the system shown, when there are two secondary expansion nodes, the data to be written is first sent from the client to the primary expansion node (the first hop), and then sent from the primary expansion node to the first secondary expansion node (the second hop). hop), and finally sent from the first sub-extension node to the second sub-extension node (the third hop), a total of 3 hops have passed; correspondingly, the execution result of the second sub-extension node also needs to go through the first The secondary expansion node and the main expansion node return to the client; for the client, the total delay is the sum of 3 hop delays; when the amount of data written each time is large, too many hops will lead to long delay

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • File writing method and device in a distributed system
  • File writing method and device in a distributed system
  • File writing method and device in a distributed system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0094] Embodiment 1. A file writing method in a distributed system, such as figure 2 As shown, including steps S110-S120:

[0095] S110. After receiving the write request for the first file, the client sends a data write request for the first file to each storage node corresponding to the first file; the data write request carries : the write request identifier and storage node address corresponding to the first file data write request; the storage node address includes the primary storage node and / or secondary storage node in each storage node corresponding to the first file address; the address of the storage node is used for interaction between the primary storage node and the secondary storage node;

[0096] S120. The client receives an execution result of the data writing request from each storage node corresponding to the first file respectively.

[0097] In this embodiment, the client directly sends a data write request to each storage node including the primary stor...

Embodiment 2

[0108] Embodiment 2. A file writing method in a distributed system, such as image 3 As shown, including steps S210-S220:

[0109] S210. After receiving the client's data writing request for the first file, the main storage node stores the writing request identifier carried in it corresponding to the determined writing location indication information of the first file;

[0110] S220. The primary storage node sends the write request identifier and corresponding write location indication information to the secondary storage node according to the storage node address carried in the data write request, where the storage node address includes the first The address of the secondary storage node corresponding to the file; or, when the secondary storage node queries according to the write request identifier, returns the write location indication information corresponding to the write request identifier.

[0111] In this embodiment, the write position indication information is sent se...

Embodiment 3

[0124] Embodiment 3, a method for writing files in a distributed system, such as Figure 4 As shown, including steps S310-S320:

[0125] S310. After receiving the client's data write request for the first file, the secondary storage node queries the primary storage node according to the storage node address and the write request identifier carried in the data write request to obtain the write location indication information, The storage node address includes the address of the primary storage node corresponding to the first file; or receiving write location indication information from the primary storage node according to the write request identifier carried in the data write request;

[0126] S320. The secondary storage node writes the first file according to the write location indication information, and returns an execution result to the client.

[0127] In this embodiment, the secondary storage node directly receives the data writing request from the client, and directly ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

A file write-in method in a distributed system and an apparatus thereof are disclosed. The file write-in method comprises the following steps that after receiving a write request for a first file, a client sends a data write-in request of the first file to each storage node corresponding to the first file respectively, wherein the data write-in request at least includes a write request identification corresponding to the first file data write-in request and a storage node address; the storage node address includes an address of a main storage node and / or an address of a secondary storage node in each storage node corresponding to the first file; the storage node address is used for interaction between the main storage node and the secondary storage node; and the client receives an execution result of the data write-in request from each storage node corresponding to the first file respectively. In the invention, under the condition that multiple copy byte orders of the data can be guaranteed to be consistent, data sending hop counts are reduced so that write-in time delay is decreased.

Description

technical field [0001] The invention relates to the field of distributed storage, in particular to a method and device for writing files in a distributed system. Background technique [0002] The underlying distributed storage system is the basis of cloud computing technology, such as Google File System (Google FileSystem, GFS), Hadoop Distributed File System (Hadoop Distributed File System, HDFS), etc., based on which many different functions are established. Distributed storage products, a large part of which realize the distributed storage of data by establishing multiple partitions (Partition), and the data of each Partition is served by a separate process to ensure consistency. However, this design makes storage products need to solve the hotspot problem of Partition, because the service capability of a single process is always limited by the physical resources of the machine where it resides, such as the central processing unit (Central Processing Unit, CPU), network b...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): H04L29/08G06F16/182
CPCG06F16/182H04L67/1097
Inventor 刘善阳朱家稷
Owner ALIBABA GRP HLDG LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products