Unlock instant, AI-driven research and patent intelligence for your innovation.

Method, device and readable storage medium for memcached cluster data reading and writing

A technology for data reading and writing, data writing, applied in the field of communication, can solve problems such as maintenance difficulties and no communication mechanism between nodes

Inactive Publication Date: 2018-12-28
ZHENGZHOU YUNHAI INFORMATION TECH CO LTD
View PDF3 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] In order to solve the above-mentioned technical problems, the present invention provides a method, device and readable storage medium for reading and writing memcached cluster data, which can overcome the problem that the nodes in the memcached cluster do not have any communication mechanism and maintenance is difficult

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
  • Method, device and readable storage medium for memcached cluster data reading and writing
  • Method, device and readable storage medium for memcached cluster data reading and writing
  • Method, device and readable storage medium for memcached cluster data reading and writing

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0046] This embodiment provides a method for reading and writing data in a memcached cluster, such as figure 1 As shown, the method includes S11-S12:

[0047] S11. When writing data to the cluster, write the data to the cluster based on a preset strategy;

[0048] S12. When reading data from the cluster, read data from the cluster based on a preset strategy.

[0049] In the embodiment of the present invention, by writing data to or reading data from the cluster based on a preset strategy, it is possible to overcome the problem that the nodes in the memcached cluster do not have any communication mechanism, maintenance difficulties, and can effectively reduce the number of customers The complexity of the end logic.

[0050] In an optional embodiment, the preset strategy includes: obtaining the number of the storage node according to the key value of the data and the number of storage nodes in the cluster.

[0051] Optionally, the above method further includes, when it is determined that...

Embodiment 2

[0063] This embodiment specifically describes the method of the foregoing embodiment.

[0064] memcached is a high-performance distributed memory object caching system. There are multiple storage nodes in the memcached system; this application adds multiple proxy nodes mproxy between the front-end and the memcached system; the proxy node mproxy can uniformly manage the back-end memcached nodes, Provide backup function and automatic data synchronization function after the downtime node is restored; the front-end node uses the keepalived+haproxy high-availability architecture.

[0065] In this example, before using the memcached cluster high availability method, the following deployments are required:

[0066] (1) Role division and numbering;

[0067] Divide the roles of the cache nodes in the memcached system into storage nodes and backup nodes; after the roles are divided, number the nodes in the memcached system;

[0068] In this example, such as figure 2 As shown, the memcached syst...

Embodiment 3

[0092] This embodiment provides a device for reading and writing data in a memcached cluster. The description in the above method embodiment is also applicable to this embodiment. image 3 As shown, the device includes a writing module 31 and a reading module 32:

[0093] The writing module 31 is used to write data to the cluster based on a preset strategy when writing data to the cluster;

[0094] The reading module 32 is used for reading data from the cluster based on a preset strategy when reading data from the cluster.

[0095] In an optional embodiment, the preset strategy includes: obtaining the number of the storage node according to the key value of the data and the number of storage nodes in the cluster.

[0096] Optionally, the above device further includes a judgment module 33,

[0097] When the judgment module 33 judges that the storage node corresponding to the number is working normally,

[0098] The writing module 31 writes data to the cluster based on a preset strategy, ...

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

The invention discloses a memcached cluster data reading and writing method, a device and a readable storage medium. The method comprises: when data is written to the cluster, the data is written to the cluster based on a preset strategy; when data is read to the cluster, the data is read from the cluster based on a preset policy. By adopting the embodiment of the invention, the problem that the nodes in the memcached cluster do not have any communication mechanism and the maintenance is difficult can be overcome by writing data or reading data from the cluster based on a preset strategy.

Description

Technical field [0001] The present invention relates to communication technology, in particular to a method, device and readable storage medium for reading and writing data in a memcached cluster. Background technique [0002] With the rapid development of memory hardware, the price of memory is getting lower and lower, and more and more applications will put hot data in the memory to improve the access speed and improve the overall performance of the system. memcached is a key / value distributed memory storage system, which is widely used to store cached data. The main problems in the application of memcached memory storage system are as follows: [0003] First, the nodes in the memcached cluster do not have any communication mechanism. All distributed strategies are maintained by the client. It is not a real distributed system in essence. The client, that is, the application that accesses memcached, needs to be processed. Complex distributed business logic becomes a thick client...

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 Applications(China)
IPC IPC(8): G06F3/06G06F11/14
CPCG06F3/0614G06F3/067G06F11/1464
Inventor 郭春庭
Owner ZHENGZHOU YUNHAI INFORMATION TECH CO LTD