Method and system for distributed storage using client-side global persistent cache
AssigneeAlibaba Group Holding Limited
InventorsShu Li, Jianjian Huo
Life of this patent
Estimating the term…
Abstract
One embodiment of the present invention provides a system for facilitating a distributed storage system. The system receives, by a first client-serving machine, a first request to write data. The system writes the data to a first persistent cache associated with the first client-serving machine, wherein a persistent cache includes non-volatile memory. The system records, in an entry in a global data structure, a status for the data prior to completing a write operation for the data in a storage server, wherein the status indicates that the data has been stored in the first persistent cache but has not yet been stored in the storage server.
Claims20
A computer-implemented method for facilitating a distributed storage system, the method comprising:
- receiving, by a first client-serving machine, a first request to write data;
- writing, by the first client-serving machine, the data to a first persistent cache associated with the first client-serving machine, wherein a persistent cache includes non-volatile memory;
- recording, by a metadata-managing server in an entry in a global data structure, metadata associated with the data,
- wherein the metadata indicates a status for the data prior to completing a write operation for the data in a storage server, wherein the status indicates that the data has been stored in the first persistent cache but has not yet been stored in the storage server, wherein the metadata-managing server is distinct from the first client-serving machine and the storage server,
- wherein prior to completing the write operation for the data in the storage server, the method further comprises:
- synchronizing, by the first client-serving machine, a path of the data with the metadata-managing server and a plurality of other metadata-managing servers;
- and
- determining, by the metadata-managing server and the other metadata-managing servers, two or more storage servers of a storage cluster to which the data is to be written, wherein the two or more storage servers include a primary server and at least one other storage server, and
- wherein completing the write operation for the data in the storage server comprises, in response to successfully writing the data to the determined storage servers, updating, by the metadata-managing server, the status in the entry with a value which indicates that the data has been stored in the storage cluster and which indicates that the data may be deleted from the first persistent cache associated with the first client-serving machine;
- and
- obtaining, by the first client-serving machine from the metadata-managing server based on the entry in the global data structure, a current status for the data.
A computer system for facilitating a distributed storage system, the system comprising:
- a processor;
- and
- a memory coupled to the processor and storing instructions, which when executed by the processor cause the processor to perform a method, wherein the computer system comprises a first client-serving machine, the method comprising:
- receiving, by the first client-serving machine, a first request to write data;
- writing, by the first client-serving machine, the data to a first persistent cache associated with the first client-serving machine, wherein a persistent cache includes non-volatile memory;
- recording, by a metadata-managing server in an entry in a global data structure, metadata associated with the data,
- wherein the metadata indicates a status for the data prior to completing a write operation for the data in a storage server, wherein the status indicates that the data has been stored in the first persistent cache but has not yet been stored in the storage server, wherein the metadata-managing server is distinct from the first client-serving machine and the storage server,
- wherein prior to completing the write operation for the data in the storage server, the method further comprises:
- synchronizing, by the first client-serving machine, a path of the data with the metadata-managing server and a plurality of other metadata-managing servers;
- and
- determining, by the metadata-managing server and the other metadata-managing servers, two or more storage servers of a storage cluster to which the data is to be written, wherein the two or more storage servers include a primary server and at least one other storage server, and
- wherein completing the write operation for the data in the storage server comprises, in response to successfully writing the data to the determined storage servers, updating, by the metadata-managing server, the status in the entry with a value which indicates that the data has been stored in the storage cluster and which indicates that the data may be deleted from the first persistent cache associated with the first client-serving machine;
- and
- obtaining, by the first client-serving machine from the metadata-managing server based on the entry in the global data structure, a current status for the data.
A non-transitory computer-readable storage medium storing instructions that when executed by a computer cause the computer to perform a method, the method comprising:
- receiving, by a first client-serving machine, a first request to write data;
- writing, by the first client-serving machine, the data to a first persistent cache associated with the first client-serving machine, wherein a persistent cache includes non-volatile memory;
- recording, by a metadata-managing server in an entry in a global data structure, metadata associated with the data,
- wherein the metadata indicates a status for the data prior to completing a write operation for the data in a storage server, wherein the status indicates that the data has been stored in the first persistent cache but has not yet been stored in the storage server, wherein the metadata-managing server is distinct from the first client-serving machine and the storage server,
- wherein prior to completing the write operation for the data in the storage server, the method further comprises:
- synchronizing, by the first client-serving machine, a path of the data with the metadata-managing server and a plurality of other metadata-managing servers;
- and
- determining, by the metadata-managing server and the other metadata-managing servers, two or more storage servers of a storage cluster to which the data is to be written, wherein the two or more storage servers include a primary server and at least one other storage server, and
- wherein completing the write operation for the data in the storage server comprises, in response to successfully writing the data to the determined storage servers, updating, by the metadata-managing server, the status in the entry with a value which indicates that the data has been stored in the storage cluster and which indicates that the data may be deleted from the first persistent cache associated with the first client-serving machine;
- and
- obtaining, by the first client-serving machine from the metadata-managing server based on the entry in the global data structure, a current status for the data.
Dependencies are inferred from the claim text.