CN109407980A - Data-storage system based on Redis cluster - Google Patents

Data-storage system based on Redis cluster Download PDF

Info

Publication number
CN109407980A
CN109407980A CN201811155062.4A CN201811155062A CN109407980A CN 109407980 A CN109407980 A CN 109407980A CN 201811155062 A CN201811155062 A CN 201811155062A CN 109407980 A CN109407980 A CN 109407980A
Authority
CN
China
Prior art keywords
redis
node
user
server
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811155062.4A
Other languages
Chinese (zh)
Inventor
黄胜蓝
汪智勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Summit Network Technology Co Ltd
Original Assignee
Wuhan Summit Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Summit Network Technology Co Ltd filed Critical Wuhan Summit Network Technology Co Ltd
Priority to CN201811155062.4A priority Critical patent/CN109407980A/en
Publication of CN109407980A publication Critical patent/CN109407980A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses the data-storage systems based on Redis cluster.The data-storage system based on Redis cluster includes: client, proxy server and Redis node;Client is sent to proxy server for obtaining user's request, and by user's request;User's request for determining corresponding next hop address based on default routing rule, and is sent to the Redis node corresponding with next hop address in default Redis cluster by proxy server;Redis node determines corresponding data to be stored for requesting according to user, and data to be stored is stored into presetting database.Significantly, proxy server is additionally introduced, it flexibly forwards control efficiently can carry out data interaction with each Redis node in Redis cluster via proxy server, improves operational efficiency, solving Redis cluster there is technical issues that efficiently carry out data.

Description

Data-storage system based on Redis cluster
Technical field
The present invention relates to database technical fields, more particularly to the data-storage system based on Redis cluster.
Background technique
Redis is usually used in realizing the storage for data as a kind of high performance key-value pair (Key-Value) database Operation and inquiry operation.
In view of the data carrying capabilities of single Redis example or single Redis node are limited, in order to increase data Memory capacity can dispose multiple Redis nodes simultaneously, to construct Redis cluster.
Building mode as Redis cluster can be, can by multiple Redis node mutual connections to form Redis cluster Referring to Redis cluster shown in Fig. 1, then, client can be interacted directly with the Redis node in Redis cluster, For example, the information that client can be intended to storage is sent directly to a Redis node.
It is apparent that this kind of building mode obtain Redis cluster when carrying out data storage, although store path is more straight It connects, still, since each Redis node in Redis cluster is in parallel role, store path is inflexible, operational efficiency It is more low, it can not efficiently be carried out the technical issues of data storage so as to cause Redis cluster.
Above content is only used to facilitate the understanding of the technical scheme, and is not represented and is recognized that above content is existing skill Art.
Summary of the invention
The main purpose of the present invention is to provide a kind of data-storage systems based on Redis cluster, it is intended to solve Redis Cluster can not efficiently carry out the technical issues of data storage.
To achieve the above object, the present invention provides a kind of data-storage system based on Redis cluster, described to be based on The data-storage system of Redis cluster includes: client, proxy server and Redis node;
The client is sent to the proxy server for obtaining user's request, and by user request;
The proxy server, for receive the user request when, based on default routing rule determine with it is described User requests corresponding next hop address, and user request is sent in default Redis cluster and the next-hop The corresponding Redis node in address;
The Redis node, for receive the user request when, according to the user request determine it is corresponding to Storing data, and the data to be stored is stored into presetting database.
Preferably, the data-storage system based on Redis cluster further include: standby server;
The client, be also used to obtain user request, and by the user request be sent to the proxy server with The standby server;
The standby server for carrying out configuration deployment by default High Availabitity configuration, and monitors the agency service Device acts on behalf of operating status;
The standby server is also used in the operating status of acting on behalf of be abnormality, by the standby server Standby operation state is switched to by being not responding to state to responsive state;
The standby server is also used in the standby operation state be described when responsive state, receiving When stating user's request, next hop address corresponding with user request is determined based on the default routing rule, and will be described User's request is sent to Redis node corresponding with the next hop address in the default Redis cluster.
Preferably, the standby server is also used in the operating status of acting on behalf of be abnormality, generates pause response Instruction, Xiang Suoshu proxy server sends the pause response instruction, so that the proxy server is receiving the pause It is revised as the operating status of acting on behalf of described to be not responding to state when response instruction.
Preferably, the data-storage system based on Redis cluster further include: load-balanced server;
The client is also used to obtain user's request, and user request is sent to the load balancing service Device;
The load-balanced server asks the user for reading the destination network addresses in user's request Destination network addresses in asking replace with default network address, and user request is sent to and the default network address Corresponding proxy server.
Preferably, the data-storage system based on Redis cluster further include: the quantity of the proxy server is greater than Equal to predetermined server amount threshold, the proxy server includes first agent's server and second agent's server;
The load-balanced server, be also used to count within a preset time first agent's server receive it is described First number of requests of user's request and second agent's server receive the second number of requests of user's request;
The load-balanced server, be also used to first number of requests be more than or equal to default number of requests threshold value and When second number of requests is less than the default number of requests threshold value, the destination network addresses in user's request are read, Destination network addresses in user request are replaced with into default network address corresponding with second agent's server, and User request is sent to second agent's server corresponding with the default network address.
Preferably, the proxy server is also used to be requested according to the user true when receiving user request Fixed corresponding target cryptographic Hash, the target cryptographic Hash is matched with each default cryptographic Hash;
The proxy server is also used in successful match, and determination is corresponding with the default cryptographic Hash of successful match Redis node, and the user is requested to send Redis node corresponding with the default cryptographic Hash of successful match.
Preferably, the client, be also used to receive act on behalf of alteration command when, change the transmission of user request The user is requested to be changed to be sent to the Redis node by being sent to the proxy server by operation.
Preferably, the data-storage system based on Redis cluster further include: the quantity of the Redis node is greater than Or it is equal to default number of nodes threshold value, the Redis node includes the first Redis node and the 2nd Redis node;
The first Redis node is looked into for receiving user's request based on default node member's management information It askes corresponding to memory node with user request;
The first Redis node is also used to described when memory node is the 2nd Redis node, will be described User's request is sent to the 2nd Redis node;
The 2nd Redis node is corresponded to for requesting to determine according to the user when receiving user request Data to be stored, and storage operation is carried out to the data to be stored.
Preferably, the first Redis node, is also used to monitor the change operation to default node configuration information;
The first Redis node, is also used to when monitoring the change operation, according to determining pair of the change operation The change node configuration information answered, and modify the default node configuration information from default node member's management information For the change node configuration information.
Preferably, the first Redis node is also used to identify the modification information in the change node configuration information Information type is inquired the corresponding target update period according to the information type, and will be described according to the target update period Modification information is sent to the 2nd Redis node, so that the 2nd Redis node manages letter from the default node member The modification information is revised as to modification information by default in breath.
In the present invention when carrying out data storage, client can request user to be forwarded to proxy server, agency service Device can determine corresponding next hop address according to default routing rule, and user request is sent to corresponding with next hop address Redis node in so that the operation of Redis node achievable data storage.It is apparent that in the present invention client with Proxy server has been additionally introduced in the Direct Connect Architecture of Redis node, has flexibly forwarded control can be efficient via proxy server Each Redis node in ground and Redis cluster carries out data interaction, improves operational efficiency, solving Redis cluster, there are nothings Method efficiently carries out the technical issues of data storage.
Detailed description of the invention
Fig. 1 is the schematic diagram of Redis cluster;
Fig. 2 is that the present invention is based on the structural block diagrams of the data-storage system first embodiment of Redis cluster;
Fig. 3 is that the present invention is based on the structural block diagrams of the data-storage system second embodiment of Redis cluster;
Fig. 4 is that the present invention is based on the structural block diagrams of the data-storage system 3rd embodiment of Redis cluster;
Fig. 5 is that the present invention is based on the structural block diagrams of the data-storage system fourth embodiment of Redis cluster.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
It is that the present invention is based on the structural block diagrams of the data-storage system first embodiment of Redis cluster referring to Fig. 2, Fig. 2.Institute Stating the data-storage system based on Redis cluster includes: client 10, proxy server 20 and Redis node 30.
It should be noted that the mode for considering that Redis node 30 interconnects two-by-two makes store path inflexible and runs Efficiency is more low, and the present embodiment can abandon the mode that Redis node 30 interconnects two-by-two, and introduce proxy server 20, and will Proxy server 20 is attached with each Redis node 30, efficient to be completed by proxy server 20 as intermediate node And flexible O&M operation.
The client 10 is sent to the proxy server 20 for obtaining user's request, and by user request.
It is understood that client 10 can be that electronic equipments, the users such as cell phone, PC can be by clients Data to be stored is obtained on end 10 data to be stored is transferred in Redis node 30 to realize.
The proxy server 20, for when receiving user request, based on the determination of default routing rule and institute State user and request corresponding next hop address, and by user request be sent in default Redis cluster with it is described next Jump the corresponding Redis node 30 in address.
It should be understood that data to be stored is transferred in Redis node 30 in order to realize, also, consider Redis Node 30 will be present multiple simultaneously, and there are a variety of for store path.So the control of store path can be carried out via proxy server 20 System, to realize data to be stored is accurate and suitably save to determining Redis node 30.Wherein, proxy server 20 In can carry Twemproxy component to realize that agent functionality, Twemproxy component are a kind of Redis Proxy middlewares.
In the concrete realization, corresponding Redis node 30 can be chosen by default routing rule, and in default routing rule Have recorded the routing table of the destination network addresses and next hop address in user's request.Wherein, destination network addresses can with it is specific Redis node 30 it is corresponding, can also be the default address for representing Redis cluster.In addition, it is contemplated that the quantity of Redis node 30 It is in continuous variation with operating status, so, default routing rule can also constantly be updated, for example, can be to next It jumps address to modify, user's request is forwarded to normal operation and operation loads in lesser Redis node 30.
The Redis node 30, for requesting determination corresponding according to the user when receiving user request Data to be stored, and the data to be stored is stored into presetting database.
It is understood that can extract in user's request after receiving user's request of the transmission of proxy server 20 Data to be stored, and the data to be stored is saved into the local presetting database of Redis node 30.It is saved as Redis Point 30 can be a Redis example, can also be an individual server.
When carrying out data storage, client 10 can request user to be forwarded to proxy server 20 the present embodiment, act on behalf of Server 20 can determine corresponding next hop address according to default routing rule, and user request is sent to next-hop In the corresponding Redis node 30 in location, so that the operation of the achievable data of Redis node 30 storage.It is apparent that in the present embodiment Proxy server 20 is additionally introduced in the Direct Connect Architecture of client 10 and Redis node 30, via 20 spirit of proxy server Forwarding control living efficiently can carry out data interaction with each Redis node 30 in Redis cluster, improve operational efficiency, Solving Redis cluster there is technical issues that efficiently carry out data.
It is that the present invention is based on the structural block diagram of the data-storage system second embodiment of Redis cluster, bases referring to Fig. 3, Fig. 3 In above-mentioned first embodiment shown in Fig. 2, propose that the present invention is based on the second embodiments of the data-storage system of Redis cluster.
In second embodiment, the data-storage system based on Redis cluster further include: standby server 201.
It is understood that the high availability (High Availability, HA) in order to realize proxy server 20, with The stability for guaranteeing data storage, can additionally introduce standby server 201.
The client 10 is also used to obtain user's request, and user request is sent to the proxy server 20 with the standby server 201.
It should be noted that for the ease of can be rapidly switched to when proxy server 20 is abnormal standby server 201 with The device role of proxy server 20 is served as, user can be requested synchronously to send by client 10 when getting user's request To proxy server 20 and standby server 201.
Certainly, when proxy server 20 is in normal condition, proxy server 20 will handle user request;And it sends User's request to standby server 201 will not be handled by standby server 201, can drop user request.
The standby server 201 for carrying out configuration deployment by default High Availabitity configuration, and monitors agency's clothes Business device 20 acts on behalf of operating status.
In the concrete realization, in order to realize the high availability of proxy server 20, can simultaneously 20 side of proxy server with 201 side of standby server carries out configuration deployment by default High Availabitity configuration.Specifically, default High Availabitity configuration can be principal and subordinate The configuration of formula High Availabitity is connect proxy server 20 as host after host delay machine by the standby server 201 as standby host Pipe.In addition, its operating status can be monitored to 201 periodicity sending heartbeat message of standby server by proxy server 20.
The standby server 201 is also used in the operating status of acting on behalf of be abnormality, by the standby server 201 standby operation state is switched to by being not responding to state to responsive state.
It should be understood that if proxy server 20 is more than certain period not send heartbeat letter to standby server 201 Breath, it is believed that the operating status of acting on behalf of of proxy server 20 is abnormality, at this time can be by proxy server 20 by being not responding to shape State is switched to responsive state, in will abandon the user request when being not responding to state after receiving user's request, in wait ring User request will be handled after receiving user's request by answering when state.
The standby server 201 is also used in the standby operation state be described when responsive state, receive When the user requests, based on default routing rule determination next hop address corresponding with user request, and by institute It states user's request and is sent to Redis node 30 corresponding with the next hop address in the default Redis cluster.
It is understood that standby server 201 is switching to when responsive state, the function of proxy server 20 will be provided with User's request is forwarded to corresponding Redis node 30 by energy property.
Further, the standby server 201 is also used in the operating status of acting on behalf of be abnormality, generate temporary Stop response instruction, Xiang Suoshu proxy server 20 sends the pause response instruction, so that the proxy server 20 is receiving It is responded to the pause and is revised as the operating status of acting on behalf of described to be not responding to state when instructing.
In the concrete realization, operation conflict in order to prevent, when proxy server 20 is abnormal, standby server 201 will actively Pause response instruction is generated, temporarily to interrupt the permission of 20 processing business of proxy server.
Certainly, when detecting that proxy server 20 reverts to normal condition by abnormality, standby server 201 is produced Pause restores instruction, sends the pause to proxy server 20 and restores instruction, so that the proxy server 20 is receiving When the pause restores instruction by it is described act on behalf of operating status be revised as it is described to responsive state.
It is understood that for the operation health status of proxy server 20 and standby server 201, there is normal State with two kinds of abnormality, for the business processing permission of proxy server 20 and standby server 201, there is wait respond State and it is not responding to two kinds of state.
By additionally introducing standby server 201 in the present embodiment, the forwarding capability of proxy server 20 can be ensured Stability.
It is that the present invention is based on the structural block diagram of the data-storage system 3rd embodiment of Redis cluster, bases referring to Fig. 4, Fig. 4 In above-mentioned first embodiment shown in Fig. 2, propose that the present invention is based on the 3rd embodiments of the data-storage system of Redis cluster.
In 3rd embodiment, the data-storage system based on Redis cluster further include: load-balanced server 101.
It should be noted that when the quantity of proxy server 20 is more than or equal to predetermined server amount threshold, for example, in advance If number of servers threshold value be 2, it will be apparent that, proxy server 20 there are it is multiple when, in order to enable the fortune of proxy server 20 With availability with higher and retractility, load-balanced server 101 can be additionally introduced.Wherein, load-balanced server 101 can run Linux virtual server (Linux Virtual Server, LVS) component.
The client 10 is also used to obtain user's request, and user request is sent to the load balancing and is taken Business device 101.
It is understood that it is real to be different from the data-storage system first as shown in Figure 2 the present invention is based on Redis cluster Example is applied, the client 10 in the present embodiment will not directly transmit user and request to proxy server 20, will first be sent to halfway negative Carry equalization server 101.
The load-balanced server 101, for reading the destination network addresses in user's request, by the user Destination network addresses in request replace with default network address, and user request is sent to the default network The corresponding proxy server 20 in location.
It should be understood that since user's request will be sent to load-balanced server 101, so, purpose network Location is the network address of load-balanced server 101, can so reduce client 10 and determine spent by purpose network address Volume of transmitted data.After load-balanced server 101 receives user's request, in order to transmit user's request downwards, user can be asked The information of destination network addresses field in asking is revised as network address corresponding with proxy server 20, is asked user with realizing It asks and passes to proxy server 20.
Further, the data-storage system based on Redis cluster further include: the quantity of the proxy server 20 More than or equal to predetermined server amount threshold, the proxy server 20 includes that first agent's server 202 and second agent take Business device 203;
The load-balanced server 101 is also used to count first agent's server 202 within a preset time and receives The first number of requests and second agent's server 203 requested to the user receive the second of user's request Number of requests;
The load-balanced server 101 is also used to be more than or equal to default number of requests threshold in first number of requests Value and when second number of requests is less than the default number of requests threshold value, with reading the target network in user request Destination network addresses in user request are replaced with default network corresponding with second agent's server 203 by location Address, and user request is sent to second agent's server 203 corresponding with the default network address.
In the concrete realization, load-balanced server 101 can realize the load balancing of proxy server 20 simultaneously, for example, It is 1000 that first agent's server 202, which receives the quantity of user's request, in 20 seconds, and second agent's server 203 receives The quantity of user's request is 50, can set default number of requests threshold value as 300, it is clear that the load that first agent's server 202 faces Pressure is bigger, so, when replacing the information of destination network addresses field, purpose network address first temporarily can be set to load pressure The network address of the smaller second agent's server 203 of power.
Further, the proxy server 20 is also used to be asked when receiving user request according to the user It asks and determines corresponding target cryptographic Hash, the target cryptographic Hash is matched with each default cryptographic Hash;
The proxy server 20, is also used in successful match, and determination is corresponding with the default cryptographic Hash of successful match Redis node 30, and the user is requested to send Redis node 30 corresponding with the default cryptographic Hash of successful match.
It is understood that determining the node selection side of corresponding Redis node 30 except through default routing rule Outside formula, while corresponding Redis node 30 can be also determined by cryptographic Hash.
In the concrete realization, include the identification informations such as the title of client 10 in user's request, identification information can be carried out Hash operation, to obtain corresponding target cryptographic Hash.Meanwhile corresponding default cryptographic Hash is distributed for each Redis node 30, When target cryptographic Hash is equal with default cryptographic Hash, then the corresponding Redis node 30 of the default cryptographic Hash equal with this can be chosen.
It, can when the quantity of proxy server 20 is more by additionally introducing load-balanced server 101 in the present embodiment Load balancing is carried out with the operation to proxy server 20.
It is that the present invention is based on the structural block diagram of the data-storage system fourth embodiment of Redis cluster, bases referring to Fig. 5, Fig. 5 In above-mentioned first embodiment shown in Fig. 2, propose that the present invention is based on the fourth embodiments of the data-storage system of Redis cluster.
In fourth embodiment, the client 10, be also used to receive act on behalf of alteration command when, change the user and ask User request is changed to be sent to the Redis section by the transmission operation asked by being sent to the proxy server 20 Point 30.
It is understood that two kinds can be provided simultaneously in view of type of service is different and the quantity of user's request is different Node selection mode, one is multiple 30 mutual connections of Redis node to form Redis cluster, and client 10 can directly and Redis A Redis node 30 in cluster interacts, as shown in Figure 1, the transmission path of this kind of mode is short more efficient;Two be additional Proxy server 20 is introduced, so that client 10 is first interacted with proxy server 20, then by proxy server 20 and Redis node 30 interact, as shown in Fig. 2, this kind of mode can centralized control transmission path, flexibility ratio is higher.
In the concrete realization, the high flexibility ratio control characteristic of the higher efficiency and Fig. 2 that can use for reference Fig. 1 simultaneously is realized The framework of Redis cluster, such as Fig. 5 not only additionally introduce proxy server 20 in Fig. 5, also allow multiple Redis nodes 30 mutually Connection.So when receive act on behalf of alteration command when, can without proxy server 20, directly by user request be sent to Redis section Point 30.
Further, the data-storage system based on Redis cluster further include: the quantity of the Redis node 30 More than or equal to default number of nodes threshold value, the Redis node 30 includes the first Redis node 301 and the 2nd Redis node 302。
It is understood that default number of nodes threshold value can be 2.
The first Redis node 301 manages letter based on default node member for receiving user's request Breath inquiry is corresponding to memory node with user request.
In the concrete realization, if user's request is sent directly to the first Redis node 301 by client 10, due to every A Redis node 30 is local to save node member's management information, so that each Redis node 30 is asked receiving user User's request is forwarded to by destination node based on node member's management information after asking.Wherein, it is saved in node member's management information The information such as nodename, node network address and the node operating status of each Redis node 30 in Redis cluster.
The first Redis node 301 is also used to described when memory node is the 2nd Redis node 302, User request is sent to the 2nd Redis node 302.
It is understood that when determining that user requests the node of information to be stored to be the 2nd Redis node 302, first Redis node 301 can request user to be forwarded to the 2nd Redis node 302.
The 2nd Redis node 302, for requesting to determine according to the user when receiving user request Corresponding data to be stored, and storage operation is carried out to the data to be stored.
Further, the first Redis node 301, is also used to monitor the change operation to default node configuration information.
The first Redis node 301, is also used to when monitoring the change operation, true according to the change operation Fixed corresponding change node configuration information, and by the default node configuration information from default node member's management information It is revised as the change node configuration information.
In the concrete realization, it is contemplated that Redis node 30 in Redis cluster there may be frequent state change with And the increase and decrease of 30 quantity of Redis node can carry out default node configuration information to guarantee the stable operation of Redis cluster Real-time update.For example, can record the abnormality if the first Redis node 301 is in abnormality and modify and first The corresponding node configuration information of Redis node 301 itself, meanwhile, in node member's management information corresponding with Redis cluster Default node configuration information is replaced with to new change node configuration information.Wherein, node configuration information is single Redis node 30 configuration information, node member's management information include the configuration information of each Redis node 30 in Redis cluster.
Certainly, the first Redis node 301 is also used to the change node according to the default update cycle with confidence Breath is sent to the 2nd Redis node 302, so that the 2nd Redis node 302 manages letter from the default node member The default node configuration information is revised as the change node configuration information in breath.
It is understood that after successfully having modified the local node member's management information of the first Redis node 301, Node member's management information can also periodically be diffused to other Redis nodes 30 in Redis cluster, also guaranteed each Node member's management information at Redis node 30 is consistent.
Further, the first Redis node 301 is also used to identify the change in the change node configuration information The information type of information inquires the corresponding target update period according to the information type, and according to the target update period The modification information is sent to the 2nd Redis node 302, so that the 2nd Redis node 302 is from the default section The modification information is revised as to modification information by default in point member management information.
In the concrete realization, it is contemplated that periodically diffusion node configuration information or node member's management information will occupy Biggish bandwidth, in order to improve the utilization rate of bandwidth and reduce the data volume of transmission, can only transmit the part of change i.e. with exception The relevant information of state does not transmit complete node member's management information.Moreover, it is contemplated that the update to different types of information is wanted Ask different, the update cycle of different durations can be set for different types of information, for example, if it is relevant to node operating status more The new period is 20 seconds, then changing unit relevant to node operating status point can be sent to the 2nd Redis node after 20 seconds 302, to update node member's management information with realizing differentiation.Wherein, presetting to modification information is default node member's management The information relevant to node operating status of the first Redis node 301 recorded originally in information.
The present embodiment can provide two kinds of node selections in view of there is differences in different moments for user's number of requests simultaneously Mode is for business personnel's selection, so that the framework of Redis cluster is provided simultaneously with higher efficiency and the control of high flexibility ratio is special Property.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the system that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or system institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or system.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.If listing equipment for drying Unit claim in, several in these devices, which can be, to be embodied by the same item of hardware.Word first, Second and the use of third etc. do not indicate any sequence, can be title by these word explanations.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, computer, clothes Business device, air conditioner or the network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of data-storage system based on Redis cluster, which is characterized in that the data storage based on Redis cluster System includes: client, proxy server and Redis node;
The client is sent to the proxy server for obtaining user's request, and by user request;
The proxy server, for being determined and the user based on default routing rule when receiving user request Corresponding next hop address is requested, and user request is sent in default Redis cluster and the next hop address Corresponding Redis node;
The Redis node, for requesting determination corresponding wait store according to the user when receiving user request Data, and the data to be stored is stored into presetting database.
2. the data-storage system as described in claim 1 based on Redis cluster, which is characterized in that described to be based on Redis collection The data-storage system of group further include: standby server;
The client, be also used to obtain user request, and by the user request be sent to the proxy server with it is described Standby server;
The standby server for carrying out configuration deployment by default High Availabitity configuration, and monitors the proxy server Act on behalf of operating status;
The standby server is also used in the operating status of acting on behalf of be abnormality, by the spare of the standby server Operating status is switched to by being not responding to state to responsive state;
The standby server is also used in the standby operation state be described when responsive state, is receiving the use When family is requested, based on default routing rule determination next hop address corresponding with user request, and by the user Request is sent to Redis node corresponding with the next hop address in the default Redis cluster.
3. the data-storage system as claimed in claim 2 based on Redis cluster, which is characterized in that the standby server, It is also used to generate pause response for abnormality in the operating status of acting on behalf of and instruct, described in the transmission of Xiang Suoshu proxy server Pause response instruction, so that the proxy server repairs the operating status of acting on behalf of when receiving the pause response instruction State is not responding to described in being changed to.
4. the data-storage system as described in claim 1 based on Redis cluster, which is characterized in that described to be based on Redis collection The data-storage system of group further include: load-balanced server;
The client is also used to obtain user's request, and user request is sent to the load-balanced server;
The load-balanced server will be in user request for reading the destination network addresses in user's request Destination network addresses replace with default network address, and user request is sent to corresponding with the default network address Proxy server.
5. the data-storage system as claimed in claim 4 based on Redis cluster, which is characterized in that described to be based on Redis collection The data-storage system of group further include: the quantity of the proxy server is more than or equal to predetermined server amount threshold, the generation Managing server includes first agent's server and second agent's server;
The load-balanced server is also used to count first agent's server within a preset time and receives the user The first number of requests and second agent's server of request receive the second number of requests of user's request;
The load-balanced server is also used to be more than or equal to default number of requests threshold value and described in first number of requests When second number of requests is less than the default number of requests threshold value, the destination network addresses in user's request are read, by institute The destination network addresses stated in user's request replace with default network address corresponding with second agent's server, and by institute It states user's request and is sent to second agent's server corresponding with the default network address.
6. the data-storage system based on Redis cluster as described in any one of claims 1 to 5, which is characterized in that described Proxy server is also used to be requested to determine corresponding target cryptographic Hash according to the user when receiving user request, The target cryptographic Hash is matched with each default cryptographic Hash;
The proxy server is also used in successful match, determines Redis section corresponding with the default cryptographic Hash of successful match Point, and the user is requested to send Redis node corresponding with the default cryptographic Hash of successful match.
7. the data-storage system based on Redis cluster as described in any one of claims 1 to 5, which is characterized in that described Client, be also used to receive act on behalf of alteration command when, change the transmission operation of user request, the user asked It asks and is changed to be sent to the Redis node by being sent to the proxy server.
8. the data-storage system as claimed in claim 7 based on Redis cluster, which is characterized in that described to be based on Redis collection The data-storage system of group further include: the quantity of the Redis node is greater than or equal to default number of nodes threshold value, described Redis node includes the first Redis node and the 2nd Redis node;
The first Redis node, for receiving user request, based on default node member's management information inquiry with User's request is corresponding to memory node;
The first Redis node is also used to described when memory node is the 2nd Redis node, by the user Request is sent to the 2nd Redis node;
The 2nd Redis node, for receive the user request when, according to the user request determine it is corresponding to Storing data, and storage operation is carried out to the data to be stored.
9. the data-storage system as claimed in claim 8 based on Redis cluster, which is characterized in that the first Redis section Point is also used to monitor the change operation to default node configuration information;
The first Redis node, is also used to when monitoring the change operation, is determined according to the change operation corresponding Node configuration information is changed, and the default node configuration information is revised as institute from default node member's management information State change node configuration information.
10. the data-storage system as claimed in claim 9 based on Redis cluster, which is characterized in that the first Redis Node is also used to identify the information type of the modification information in the change node configuration information, is looked into according to the information type It askes the corresponding target update period, and the modification information is sent to the 2nd Redis according to the target update period Node, so that the 2nd Redis node is revised as default to modification information from default node member's management information The modification information.
CN201811155062.4A 2018-09-29 2018-09-29 Data-storage system based on Redis cluster Pending CN109407980A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811155062.4A CN109407980A (en) 2018-09-29 2018-09-29 Data-storage system based on Redis cluster

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811155062.4A CN109407980A (en) 2018-09-29 2018-09-29 Data-storage system based on Redis cluster

Publications (1)

Publication Number Publication Date
CN109407980A true CN109407980A (en) 2019-03-01

Family

ID=65465743

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811155062.4A Pending CN109407980A (en) 2018-09-29 2018-09-29 Data-storage system based on Redis cluster

Country Status (1)

Country Link
CN (1) CN109407980A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110113192A (en) * 2019-04-23 2019-08-09 深信服科技股份有限公司 Route selecting method, routing device, system, storage medium and the device of virtual desktop
CN110908838A (en) * 2019-11-19 2020-03-24 杭州安恒信息技术股份有限公司 Data processing method and device, electronic equipment and storage medium
CN111010454A (en) * 2019-12-31 2020-04-14 杭州天宽科技有限公司 Load balancing method realized by dynamic routing architecture
CN111245943A (en) * 2020-01-14 2020-06-05 山东汇贸电子口岸有限公司 Method for obtaining accessible IP address by Redis cluster
CN111464629A (en) * 2020-03-31 2020-07-28 中国建设银行股份有限公司 Hot spot data determination method and device
CN111538605A (en) * 2020-04-24 2020-08-14 北京思特奇信息技术股份有限公司 Distributed data access layer middleware and command execution method and device
CN111988347A (en) * 2019-05-22 2020-11-24 网宿科技股份有限公司 Data processing method of board jumper system and board jumper system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103166870A (en) * 2011-12-13 2013-06-19 百度在线网络技术(北京)有限公司 Load balancing clustered system and method for providing services by using load balancing clustered system
CN104601720A (en) * 2015-01-30 2015-05-06 乐视网信息技术(北京)股份有限公司 Cache access control method and device
CN105933407A (en) * 2016-04-20 2016-09-07 中国银联股份有限公司 Method and system for achieving high availability of Redis cluster
CN106254240A (en) * 2016-09-18 2016-12-21 腾讯科技(深圳)有限公司 A kind of data processing method and routing layer equipment and system
CN106375425A (en) * 2016-08-30 2017-02-01 中国民生银行股份有限公司 Processing method and device for distributed caching
CN108183947A (en) * 2017-12-27 2018-06-19 深圳天源迪科信息技术股份有限公司 Distributed caching method and system
CN108206779A (en) * 2016-12-16 2018-06-26 北京金山云网络技术有限公司 A kind of cluster accesses system, method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103166870A (en) * 2011-12-13 2013-06-19 百度在线网络技术(北京)有限公司 Load balancing clustered system and method for providing services by using load balancing clustered system
CN104601720A (en) * 2015-01-30 2015-05-06 乐视网信息技术(北京)股份有限公司 Cache access control method and device
CN105933407A (en) * 2016-04-20 2016-09-07 中国银联股份有限公司 Method and system for achieving high availability of Redis cluster
CN106375425A (en) * 2016-08-30 2017-02-01 中国民生银行股份有限公司 Processing method and device for distributed caching
CN106254240A (en) * 2016-09-18 2016-12-21 腾讯科技(深圳)有限公司 A kind of data processing method and routing layer equipment and system
CN108206779A (en) * 2016-12-16 2018-06-26 北京金山云网络技术有限公司 A kind of cluster accesses system, method and device
CN108183947A (en) * 2017-12-27 2018-06-19 深圳天源迪科信息技术股份有限公司 Distributed caching method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈昕编: "《网络实用技术基础》", 30 November 2016 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110113192A (en) * 2019-04-23 2019-08-09 深信服科技股份有限公司 Route selecting method, routing device, system, storage medium and the device of virtual desktop
CN111988347A (en) * 2019-05-22 2020-11-24 网宿科技股份有限公司 Data processing method of board jumper system and board jumper system
CN111988347B (en) * 2019-05-22 2023-10-24 网宿科技股份有限公司 Data processing method of board hopping machine system and board hopping machine system
CN110908838A (en) * 2019-11-19 2020-03-24 杭州安恒信息技术股份有限公司 Data processing method and device, electronic equipment and storage medium
CN110908838B (en) * 2019-11-19 2022-09-02 杭州安恒信息技术股份有限公司 Data processing method and device, electronic equipment and storage medium
CN111010454A (en) * 2019-12-31 2020-04-14 杭州天宽科技有限公司 Load balancing method realized by dynamic routing architecture
CN111245943A (en) * 2020-01-14 2020-06-05 山东汇贸电子口岸有限公司 Method for obtaining accessible IP address by Redis cluster
CN111464629A (en) * 2020-03-31 2020-07-28 中国建设银行股份有限公司 Hot spot data determination method and device
CN111464629B (en) * 2020-03-31 2022-08-02 中国建设银行股份有限公司 Hot spot data determination method and device
CN111538605A (en) * 2020-04-24 2020-08-14 北京思特奇信息技术股份有限公司 Distributed data access layer middleware and command execution method and device

Similar Documents

Publication Publication Date Title
CN109407980A (en) Data-storage system based on Redis cluster
CN108009028B (en) Message processing method, device, equipment and computer readable storage medium
CN105900068B (en) The systems, devices and methods of path management
US8380843B2 (en) System and method for determining affinity groups and co-locating the affinity groups in a distributing network
CN102281190B (en) Networking method for load balancing apparatus, server and client access method
Lazidis et al. Publish–Subscribe approaches for the IoT and the cloud: Functional and performance evaluation of open-source systems
CN101076978B (en) Method for distributing loads among servers
US20160344582A1 (en) Call home cluster
CN101645928A (en) Content resource caching method, device and system
CN104618164A (en) Management method for rapid cloud computing platform application deployment
EP1180886B1 (en) Load balancing method and system
US8606908B2 (en) Wake-up server
CN112953982B (en) Service processing method, service configuration method and related device
CN103716281A (en) Control method, electronic device and server
CN112866394B (en) Load balancing method, device, system, computer equipment and storage medium
JP2018005431A (en) Operation monitoring server and operation monitoring system
CN1330124C (en) Method and apparatus for virtualizing network resources
CN109733444B (en) Database system and train monitoring management equipment
CN101601227A (en) The system and method relevant with network management
JPWO2011024930A1 (en) Content distribution system, content distribution method, and content distribution program
JP2005182702A (en) Access control system in ip network
WO2015069378A1 (en) Hierarchical distribution of control information in a massively scalable network server
Kang et al. A conceptual device-rank based resource sharing and collaboration of smart things
KR101997602B1 (en) Resource Dependency Service Method for M2M Resource Management
CN114024968B (en) Message sending method and device based on intermediate equipment and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190301