CN110519349A - A kind of load-balancing method and device based on the virtual ip of DNS fixed allocation - Google Patents

A kind of load-balancing method and device based on the virtual ip of DNS fixed allocation Download PDF

Info

Publication number
CN110519349A
CN110519349A CN201910754025.3A CN201910754025A CN110519349A CN 110519349 A CN110519349 A CN 110519349A CN 201910754025 A CN201910754025 A CN 201910754025A CN 110519349 A CN110519349 A CN 110519349A
Authority
CN
China
Prior art keywords
virtual
node
default
default node
dns
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.)
Granted
Application number
CN201910754025.3A
Other languages
Chinese (zh)
Other versions
CN110519349B (en
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.)
Jinan Inspur Data Technology Co Ltd
Original Assignee
Jinan Inspur Data 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 Jinan Inspur Data Technology Co Ltd filed Critical Jinan Inspur Data Technology Co Ltd
Priority to CN201910754025.3A priority Critical patent/CN110519349B/en
Publication of CN110519349A publication Critical patent/CN110519349A/en
Application granted granted Critical
Publication of CN110519349B publication Critical patent/CN110519349B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1023Server selection for load balancing based on a hash applied to IP addresses or costs

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a kind of load-balancing method based on the virtual ip of DNS fixed allocation, device, back-end server and computer readable storage mediums, this method comprises: default node acquires corresponding current virtual ip;The virtual ip respectively stored is updated according to current virtual ip, respectively corresponding destination client provides service;Wherein, the destination client is the client for the virtual ip that the access default node respectively stores;It can be seen that, the present invention acquires corresponding current virtual ip by default node, and update the virtual ip respectively stored, the update that do not break down with the back-end server after fault restoration to the virtual ip of respective storage may be implemented, to reduce the failure of back-end server in distributed file system and restore the influence to offer service, the efficiency for improving back-end server processing client request, further enhances network data processing ability, improves the flexibility and availability of network.

Description

A kind of load-balancing method and device based on the virtual ip of DNS fixed allocation
Technical field
It is the present invention relates to distributed file system technology field, in particular to a kind of based on the virtual ip's of DNS fixed allocation Load-balancing method, device, back-end server and computer readable storage medium.
Background technique
With the development of modern society's science and technology, distributed file system using more and more extensive.
In the prior art, the load balancing in distributed file system connects comprising polling method, weighted polling method, minimum Several methods, randomized, source address Hash method etc. are connect, mainly according to the request of client, using poll, Smallest connection number, random Or source address Hash method, back-end server is distributed, to achieve the purpose that load balancing;Load balancing can be to client point With a back-end server for providing service, when the back-end server breaks down, client can get other rear ends clothes The service of business device, causes rear end pressure to redistribute, and after the back-end server fault recovery, client, which cannot continue to obtain, is somebody's turn to do The service of back-end server will cause the waste of server-side resource, reduce the efficiency of back-end server processing client request.
Therefore, how to reduce the failure of back-end server in distributed file system and restore the influence to offer service, The efficiency for improving back-end server processing client request, further strengthens network data processing ability, improves the flexible of network Property and availability are urgent problems now.
Summary of the invention
The object of the present invention is to provide a kind of load-balancing method based on the virtual ip of DNS fixed allocation, device and rear ends Server further strengthens network data processing ability, improves net to improve the efficiency of back-end server processing client request The flexibility and availability of network.
In order to solve the above technical problems, the present invention provides a kind of load-balancing method based on the virtual ip of DNS fixed allocation, Include:
Default node acquires corresponding current virtual ip;Wherein, the default node is in distributed file system The default corresponding multiple back-end servers of domain name;
The virtual ip respectively stored is updated according to current virtual ip, respectively corresponding destination client provides clothes Business;Wherein, the destination client is the client for the virtual ip that the access default node respectively stores.
Optionally, the default node acquires corresponding current virtual ip, comprising:
After first node breaks down, second node acquires corresponding current virtual ip;Wherein, the second node is corresponding Current virtual ip include the virtual ip of drifting about, the drift default node of virtual ip described first stores before breaking down Virtual ip, the default node include the first node and the second node.
Optionally, the default node acquires corresponding current virtual ip, comprising:
After the fault restoration of the first node, the first node and second node acquisition are corresponding current Virtual ip;Wherein, the corresponding current virtual ip of the described first default node includes the virtual ip of drift, the described second default section The corresponding current virtual ip of point does not include the virtual ip of drift.
Optionally, the default node acquires corresponding current virtual ip, comprising:
Each default node judges whether the corresponding current virtual ip of successful acquisition itself;
If so, the virtual ip for updating according to current virtual ip and respectively storing is executed, it is updated described to utilize Virtual ip, to access the step of client of the virtual ip provides service;
If it is not, then output abnormality log, and empty the virtual ip of itself storage.
Optionally, described that the virtual ip respectively stored is updated according to current virtual ip, respectively access the institute respectively stored The client for stating virtual ip provides service, comprising:
Each default node receives the domain name access request that corresponding destination client is sent;
Judge whether the domain name in domain name access request is the default domain name;
If so, selecting corresponding virtual ip from the virtual ip of storage, and return to corresponding destination client.
Optionally, the default node acquires corresponding current virtual ip, comprising:
The default node is spaced the corresponding current virtual ip of acquisition at preset timed intervals.
The present invention also provides a kind of load balancing apparatus based on the virtual ip of DNS fixed allocation, comprising:
Acquisition module, for acquiring the corresponding current virtual ip of default node;Wherein, the default node is distribution The corresponding multiple back-end servers of domain name are preset in formula file system;
Memory module, for updating the virtual ip that the default node respectively stores according to current virtual ip, using more The virtual ip after new provides service to access the client of the virtual ip.
Optionally, the acquisition module is specifically used for the corresponding current virtual ip of interval acquisition at preset timed intervals.
The present invention also provides a kind of back-end servers, comprising:
Memory, for storing computer program;
Processor realizes such as the above-mentioned load based on the virtual ip of DNS fixed allocation when for executing the computer program The step of equalization methods.
In addition, being deposited on the computer readable storage medium the present invention also provides a kind of computer readable storage medium Computer program is contained, is realized when the computer program is executed by processor such as the above-mentioned virtual ip based on DNS fixed allocation The step of load-balancing method.
A kind of load-balancing method based on the virtual ip of DNS fixed allocation provided by the present invention is adopted by default node Collect corresponding current virtual ip, and update the virtual ip respectively stored, may be implemented not break down with after fault restoration Update of the back-end server to the virtual ip of respective storage, to reduce back-end server in distributed file system Failure and recovery improve the efficiency of back-end server processing client request, further enhance to the influence of service is provided Network data processing ability improves the flexibility and availability of network.Consolidated in addition, the present invention also provides one kind based on DNS Surely the load balancing apparatus, back-end server and computer readable storage medium of virtual ip are distributed, is equally had above-mentioned beneficial to effect Fruit.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is a kind of stream of the load-balancing method based on the virtual ip of DNS fixed allocation provided by the embodiment of the present invention Cheng Tu;
Fig. 2 is the schematic diagram that the nodal information of zz56 node provided by the embodiment of the present invention is shown;
Fig. 3 is the schematic diagram that the nodal information of zz58 node provided by the embodiment of the present invention is shown;
Fig. 4 is the schematic diagram of the configuration file of zz58 node provided by the embodiment of the present invention;
Fig. 5 is a kind of structure of the load balancing apparatus based on the virtual ip of DNS fixed allocation provided in an embodiment of the present invention Block diagram.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art Every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
Referring to FIG. 1, Fig. 1 is that a kind of load based on the virtual ip of DNS fixed allocation provided by the embodiment of the present invention is equal The flow chart of weighing apparatus method.This method may include:
Step 101: default node acquires corresponding current virtual ip;Wherein, presetting node is distributed field system The corresponding multiple back-end servers of domain name are preset in system.
It should be noted that each of this step presets node can correspond to preset domain name in distributed file system A back-end server, i.e., each default node all can be the client of access preset domain name service is provided.It is each default The corresponding current virtual ip of node can need current time collected default domain name corresponding virtual for each default terminal ip。
Specifically, the concrete mode for acquiring corresponding current virtual ip for each presetting node in this step, it can With by designer's self-setting, such as each default node can execute default acquisition, the collection of default node composition is checked Virtual ip status information in group, to obtain itself current time corresponding virtual ip (current virtual ip);As shown in Fig. 2, When default acquisition is ctdb ip order, the default node of the entitled zz56 of host can be shown after executing ctdb ip order Content in Fig. 2, " Public IPson node " subsequent digital " 0 " of character string represent the default corresponding virtual ip of node It is for 100.7.44.193, the i.e. collected corresponding current virtual ip of the default node of the entitled zz56 of host 100.7.44.193.Each default node can carry out information exchange with a control server in distributed file system, Directly receive the respective corresponding current virtual ip of control server transmission.As long as each default node can collect respectively right The current virtual ip answered, the present embodiment do not do any restrictions to this.
It is understood that the purpose of this step can be to acquire corresponding current virtual ip by default node, Default node is set to update the virtual ip respectively stored, thus the virtual ip status information in the cluster of default node composition It changes, i.e., after virtual ip drift occurs in the cluster, so that default node is updated the virtual ip respectively stored, be respective Corresponding destination client provides service, avoids virtual ip drift to the efficiency of processing client request.
That is, this step may include after first node breaks down, second node acquires corresponding current virtual ip;Wherein, the corresponding current virtual ip of second node includes the virtual ip that drifts about, and the virtual ip that drifts about is that the first default node is occurring The virtual ip stored before failure, default node include first node and second node, i.e. first node can be in default node The node to break down, the default node that second node can float to after breaking down for the virtual ip of first node storage In node.As shown in Figures 2 and 3, when the default node (first node) of the entitled zz56 of host breaks down, the default node Corresponding virtual ip (100.7.44.193) is drifted about, and the default node (second node) of the entitled zz58 of host passes through ctdb Ip order, the virtual ip (ip100.7.44.193) for viewing the script on zz56 node are floated on zz58 node, therefore Zz56 node does not acquire virtual ip, and zz58 node collects two virtual ip (100.7.44.193 and 100.7.44.194), That is " Public IPson node " character string is subsequent digital " 2 " in Fig. 3, represent the corresponding current virtual ip of second node as And 100.7.44.194 100.7.44.193.
Corresponding, after this step can also be including the fault restoration of first node, first node and second node acquisition are each Self-corresponding current virtual ip;Wherein, the corresponding current virtual ip of the first default node includes the virtual ip that drifts about, the second default section The corresponding current virtual ip of point does not include the virtual ip that drifts about.That is, after the fault restoration of first node, first node can be with Itself the virtual ip of drifting about back after fault restoration is collected, i.e., the drift that second node is floated in failure generating process is virtual Ip, such as the 100.7.44.193 in Fig. 3;After the fault restoration of first node, second node can be collected to be sent out in first node It is empty that there is no the drifts for the first node that drifts about back in the virtual ip of itself before raw failure, i.e., collected corresponding current virtual ip Quasi- ip.
Specifically, the detailed process for acquiring corresponding current virtual ip for presetting node in this step, Ke Yiyou Designer's self-setting, such as default node can be spaced the corresponding current virtual ip of acquisition at preset timed intervals, i.e., each Default node can be with the corresponding current virtual ip of taken at regular intervals, such as when prefixed time interval is 2s, each default node Ctdb ip order can be executed with every 2s, obtain collected virtual ip (current virtual ip) of corresponding current time.It can also Only to be carried out after virtual ip drifts about, such as all default node or corresponding default node acquisitions of the virtual ip to drift about Corresponding current virtual ip, such as control server can only control second node and adopt after first node breaks down Collect itself corresponding current virtual ip.As long as guaranteeing after virtual ip drift occurs, corresponding default node can acquire respectively right The current virtual ip answered, the present embodiment do not do any restrictions to this.
Further, node is each preset in this step during acquiring corresponding current virtual ip, can be sentenced Break and itself whether acquire success, that is, judges whether the corresponding current virtual ip of successful acquisition itself;It, can be into if acquiring successfully Enter step 102;, can be with output abnormality log if acquisition is unsuccessful, and empty the virtual ip of itself storage, i.e., by itself Log in output abnormality information, check software developer or client, facilitate subsequent adjustment and maintenance;By emptying The virtual ip of itself storage avoids acquiring the virtual ip that unsuccessful default node can be stored because before, presets node to other Service is provided for client to interfere.
Wherein, the default domain name in the present embodiment can be pre-set name server (Domain Name Server, DNS) the corresponding domain name of the virtual ip strategy of fixed allocation.As the virtual ip strategy of DNS fixed allocation is named as " ctdb_ Ip " strategy, when default domain name is www.test1.com, as shown in figure 4, < domainname name=" www.test1.com " The entitled www.test1.com of > representative domain;<policy value="ctdb_ip"/>indicate that strategy is ctdb_ip strategy; Addresspool address represents address pool, which there are three virtual ip point is 100.7.44.192, 100.7.44.193 and 100.7.44.194, i.e., corresponding each backend nodes (default node) acquisition of domain name is preset in this step Corresponding current virtual ip be one or more of three virtual ip in the address pool.
Step 102: the virtual ip respectively stored, respectively corresponding destination client are updated according to current virtual ip Service is provided;Wherein, destination client is the client for the virtual ip that access preset node respectively stores.
It is understood that the purpose of this step can pass through for each default node utilizes the current virtual respectively acquired Ip updates the virtual ip respectively stored, and alloing each default node is respectively the client for accessing respectively updated virtual ip (destination client) provides service.That is, when the virtual ip of client access is the virtual ip of any default node storage, The default node can provide service for the client.
Specifically, for the specific side for presetting the virtual ip that node is respectively stored according to current virtual ip update in this step Formula, can be by designer's self-setting, and the virtual ip that itself is stored directly can be replaced with itself by such as each default node Collected current virtual ip, for example, each default node according to itself collected current virtual ip (such as virtual ip and virtual Ip number) the virtual ip that stores in a data structure of self EMS memory is updated, so that each default node can be access The client (destination client) of virtual ip in own data structure body provides service;Each default node can also first judge Whether respective collected current virtual ip and the virtual ip respectively stored are identical, update the virtual of itself storage when not identical again Ip need not update when identical.The present embodiment does not do any restrictions to this.
It is corresponding, the concrete mode of virtual ip is stored for each default node, it can be by designer's self-setting, such as It can be saved in a data structure in memory with itself collected virtual ip (current virtual ip).As long as guaranteeing Each default node can provide service to access the client of the virtual ip of itself storage, and the present embodiment does not do any limit to this System.
It should be noted that in the specific service provided for each default node for corresponding destination client Hold, can be by designer's self-setting, it is corresponding target section that such as each default node, which can be used as name server, Point provides the service of domain name mapping, i.e. this step may include that each default node receives the domain that corresponding destination client is sent Name access request;Judge whether the domain name in domain name access request is default domain name;If so, being selected from the virtual ip of storage Corresponding virtual ip, and return to corresponding destination client.As shown in Figure 3 and Figure 4, zz58 node (the entitled zz58's of host Default node) the virtual ip of storage is when being the two virtual ip of 100.7.44.193 and 100.7.44.194, if client will wrap Domain name access request containing www.test.com (domain name) is sent to the corresponding default node of 100.7.44.193, and zz58 node can To judge whether www.test1.com is default domain name, i.e. whether strategy belonging to www.test1.com is ctdb_ip strategy;If It is that corresponding virtual ip is selected in the virtual ip for then return storage, as any in 100.7.44.193 and 100.7.44.194 One virtual ip;If it is not, then according to domain name access request in domain name belonging to other strategy processing modes, return it is corresponding Virtual ip.
Corresponding, as shown in figure 4, configuration file can be arranged in each default node, each default node reads configuration In memory, the corresponding virtual ip of taken at regular intervals and ip number save in memory information preservation in file;Client Domain name access request is configured, i.e. client is added as now executed vim/etc/resolv.conf order in the prior art Nameserver ip, ip is the virtual ip for the default node that client wants access to herein;When default node receives client Domain name access request, default node search domain name and its relative strategy in the domain name access request of client in memory, if For ctdb_ip strategy, then a virtual ip is found from virtual ip stored in memory and returns to client;If other plans Slightly, then virtual ip is returned to according to the processing mode of other strategies.
Specifically, each preset node in the present embodiment when not breaking down, each default node is acquired and is stored The number of virtual ip can be 1, i.e., in the number address pool corresponding with default domain name of the default corresponding back-end server of domain name Virtual ip number it is equal, as shown in Figure 2 and Figure 4, presetting node is zz56 node, zz57 node and when zz58 node, if It does not break down in zz56 node, zz57 node and zz58 node and does not restore, then zz56 node is acquired and stored virtual Ip can be 100.7.44.193, and zz57 node acquires and the virtual ip stored can be 100.7.44.192, and zz58 node is adopted Integrate and the virtual ip stored can be 100.7.44.194, it, will if client configuration at this time/etc/resolv.conf order Nameserver ip is set as 100.7.44.193, and the domain name access comprising www.test1.com is requested to send 100.7.44.193 when corresponding default node, then zz56 node can return to virtual ip (100.7.44.193) to the client End;As shown in Figure 3 and Figure 4, after zz56 nodes break down, the virtual ip (100.7.44.193) of zz56 node floats to zz58 Node, zz57 node acquires and the virtual ip stored can be 100.7.44.192, the virtual ip that zz58 node is acquired and stored It can be 100.7.44.193 and 100.7.44.194, if client asks the domain name access comprising www.test1.com at this time Ask when sending the corresponding default node of 100.7.44.193, zz58 node can from two virtual ip (100.7.44.193 with 100.7.44.194) in selection one virtual ip return to the client;After zz56 node restores normal, virtual ip (100.7.44.193) drift returns to zz56 node, and zz56 node acquires and the virtual ip stored can be 100.7.44.193, Zz57 node acquires and the virtual ip stored can be 100.7.44.192, and zz58 node acquires and the virtual ip stored can be 100.7.44.194, if client requests the domain name access comprising www.test1.com to send 100.7.44.193 pairs at this time When the default node answered, zz56 node can return to virtual ip (100.7.44.193) and arrive the client, the i.e. client no longer Access zz58 node.
In the present embodiment, the embodiment of the present invention acquires corresponding current virtual ip by default node, and updates each From the virtual ip of storage, the virtual ip that may be implemented not break down with the back-end server after fault restoration to respective storage Update, to reduce the failure of back-end server in distributed file system and restore to improve to the influence of service is provided The efficiency of back-end server processing client request, further enhances network data processing ability, improves the spirit of network Activity and availability.
The load balancing apparatus provided in an embodiment of the present invention based on the virtual ip of DNS fixed allocation is introduced below, Load balancing apparatus described below based on the virtual ip of DNS fixed allocation with it is above-described based on DNS fixed allocation it is virtual The load-balancing method of ip can be cross-referenced.
Referring to Fig. 5, a kind of knot of the load balancing apparatus based on the virtual ip of DNS fixed allocation provided in an embodiment of the present invention Structure block diagram;The device can specifically include:
Acquisition module 10, for acquiring the corresponding current virtual ip of default node;Wherein, presetting node is distribution The corresponding multiple back-end servers of domain name are preset in file system;
Memory module 20, for updating the virtual ip that default node respectively stores according to current virtual ip, to utilize update Virtual ip afterwards provides service to access the client of virtual ip.
Optionally, acquisition module 10 is specifically used for the corresponding current virtual ip of interval acquisition at preset timed intervals.
In the present embodiment, the embodiment of the present invention acquires corresponding current virtual ip by each presetting node, and more The virtual ip newly respectively stored, the void that may be implemented not break down with the back-end server after fault restoration to respective storage The update of quasi- ip, thus reduce the failure of back-end server in distributed file system and restore the influence to offer service, The efficiency for improving back-end server processing client request, further enhances network data processing ability, improves network Flexibility and availability.
The embodiment of the invention also provides a kind of back-end servers, comprising:
Memory, for storing computer program;
Processor realizes such as the above-mentioned load balancing based on the virtual ip of DNS fixed allocation when for executing computer program The step of method.
Wherein, the memory in the present embodiment includes at least a type of readable storage medium storing program for executing, the readable storage medium Matter includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory etc.), magnetic storage, disk, CD Deng.Memory can be the internal storage unit of back-end server, such as the hard disk of back-end server in some embodiments.It deposits Reservoir is also possible to the External memory equipment of back-end server in further embodiments, such as is equipped on back-end server slotting Connect formula hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digita, SD) card, flash card (Flash Card) etc..Further, memory can also both including back-end server internal storage unit and also including outside Store equipment.Memory can be not only used for the application software and Various types of data that storage is installed on back-end server, such as: it executes The code etc. of the program of load-balancing method based on the virtual ip of DNS fixed allocation can be also used for temporarily storing defeated Out or the data that will export.
Processor in the present embodiment can be a central processing unit (CentralProcessing in some embodiments Unit, CPU), controller, microcontroller, microprocessor or other data processing chips, the journey for being stored in run memory Sequence code or processing data, such as execute the code etc. of the program of the load-balancing method based on the virtual ip of DNS fixed allocation.
The embodiment of the invention also provides a kind of distributed file system, the server including preset quantity;
Wherein, each server back-end server as provided by above-described embodiment.
In addition, the embodiment of the invention also provides a kind of computer readable storage medium, the computer readable storage medium On be stored with computer program, when computer program is executed by processor realize such as above-described embodiment provided by based on DNS consolidate Surely the step of distributing the load-balancing method of virtual ip.
Wherein, which may include: USB flash disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. is various to deposit Store up the medium of program code.
Each embodiment is described in a progressive manner in specification, the highlights of each of the examples are with other realities The difference of example is applied, the same or similar parts in each embodiment may refer to each other.For device disclosed in embodiment, after For holding server, distributed file system and computer readable storage medium, since it is opposite with method disclosed in embodiment It answers, so being described relatively simple, reference may be made to the description of the method.
Above to a kind of load-balancing method based on the virtual ip of DNS fixed allocation provided by the present invention, device, rear end Server and computer readable storage medium are described in detail.Specific case used herein to the principle of the present invention and Embodiment is expounded, and the above description of the embodiment is only used to help understand the method for the present invention and its core ideas. It should be pointed out that for those skilled in the art, it without departing from the principle of the present invention, can also be right Some improvement and modification can also be carried out by the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.

Claims (10)

1. a kind of load-balancing method based on the virtual ip of DNS fixed allocation characterized by comprising
Default node acquires corresponding current virtual ip;Wherein, the default node is to preset in distributed file system The corresponding multiple back-end servers of domain name;
The virtual ip respectively stored is updated according to current virtual ip, respectively corresponding destination client provides service;Its In, the destination client is the client for the virtual ip that the access default node respectively stores.
2. the load-balancing method according to claim 1 based on the virtual ip of DNS fixed allocation, which is characterized in that described Default node acquires corresponding current virtual ip, comprising:
After first node breaks down, second node acquires corresponding current virtual ip;Wherein, the second node is corresponding works as Preceding virtual ip includes the virtual ip that drifts about, and the virtual ip of drift stores before breaking down virtual for the described first default node Ip, the default node include the first node and the second node.
3. the load-balancing method according to claim 2 based on the virtual ip of DNS fixed allocation, which is characterized in that described Default node acquires corresponding current virtual ip, comprising:
After the fault restoration of the first node, the first node and the second node acquire corresponding current virtual ip;Wherein, the corresponding current virtual ip of the described first default node includes the virtual ip of drift, the second default node pair The current virtual ip answered does not include the virtual ip of drift.
4. the load-balancing method according to claim 1 based on the virtual ip of DNS fixed allocation, which is characterized in that described Default node acquires corresponding current virtual ip, comprising:
Each default node judges whether the corresponding current virtual ip of successful acquisition itself;
If so, the virtual ip for updating according to current virtual ip and respectively storing is executed, it is updated described virtual to utilize Ip, to access the step of client of the virtual ip provides service;
If it is not, then output abnormality log, and empty the virtual ip of itself storage.
5. the load-balancing method according to claim 1 based on the virtual ip of DNS fixed allocation, which is characterized in that described The virtual ip respectively stored is updated according to current virtual ip, the client for respectively accessing the virtual ip respectively stored provides Service, comprising:
Each default node receives the domain name access request that corresponding destination client is sent;
Judge whether the domain name in domain name access request is the default domain name;
If so, selecting corresponding virtual ip from the virtual ip of storage, and return to corresponding destination client.
6. the load-balancing method according to any one of claims 1 to 5 based on the virtual ip of DNS fixed allocation, feature It is, the default node acquires corresponding current virtual ip, comprising:
The default node is spaced the corresponding current virtual ip of acquisition at preset timed intervals.
7. a kind of load balancing apparatus based on the virtual ip of DNS fixed allocation characterized by comprising
Acquisition module, for acquiring the corresponding current virtual ip of default node;Wherein, the default node is distributed text The corresponding multiple back-end servers of domain name are preset in part system;
Memory module, for updating the virtual ip that the default node respectively stores according to current virtual ip, after using updating The virtual ip, provide service to access the client of the virtual ip.
8. the load balancing apparatus according to claim 7 based on the virtual ip of DNS fixed allocation, which is characterized in that described Acquisition module is specifically used for interval at preset timed intervals and acquires corresponding current virtual ip.
9. a kind of back-end server characterized by comprising
Memory, for storing computer program;
Processor is realized when for executing the computer program and is fixed as claimed in any one of claims 1 to 6 based on DNS The step of distributing the load-balancing method of virtual ip.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium Program is realized as claimed in any one of claims 1 to 6 when the computer program is executed by processor based on fixed point of DNS The step of load-balancing method with virtual ip.
CN201910754025.3A 2019-08-15 2019-08-15 Load balancing method and device for fixedly distributing virtual ip based on DNS (Domain name System) Active CN110519349B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910754025.3A CN110519349B (en) 2019-08-15 2019-08-15 Load balancing method and device for fixedly distributing virtual ip based on DNS (Domain name System)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910754025.3A CN110519349B (en) 2019-08-15 2019-08-15 Load balancing method and device for fixedly distributing virtual ip based on DNS (Domain name System)

Publications (2)

Publication Number Publication Date
CN110519349A true CN110519349A (en) 2019-11-29
CN110519349B CN110519349B (en) 2022-07-15

Family

ID=68625296

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910754025.3A Active CN110519349B (en) 2019-08-15 2019-08-15 Load balancing method and device for fixedly distributing virtual ip based on DNS (Domain name System)

Country Status (1)

Country Link
CN (1) CN110519349B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060120284A1 (en) * 2004-12-02 2006-06-08 Electronics And Telecommunications Research Institute Apparatus and method for controlling abnormal traffic
CN107734026A (en) * 2017-10-11 2018-02-23 郑州云海信息技术有限公司 A kind of design method, device and the equipment of network attached storage cluster
CN108494877A (en) * 2018-04-13 2018-09-04 郑州云海信息技术有限公司 A kind of NAS group systems and NAS cluster operation methods
CN108923992A (en) * 2018-08-23 2018-11-30 郑州云海信息技术有限公司 A kind of NAS cluster high availability method, system and electronic equipment and storage medium
CN109271280A (en) * 2018-08-30 2019-01-25 重庆富民银行股份有限公司 Storage failure is switched fast processing method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060120284A1 (en) * 2004-12-02 2006-06-08 Electronics And Telecommunications Research Institute Apparatus and method for controlling abnormal traffic
CN107734026A (en) * 2017-10-11 2018-02-23 郑州云海信息技术有限公司 A kind of design method, device and the equipment of network attached storage cluster
CN108494877A (en) * 2018-04-13 2018-09-04 郑州云海信息技术有限公司 A kind of NAS group systems and NAS cluster operation methods
CN108923992A (en) * 2018-08-23 2018-11-30 郑州云海信息技术有限公司 A kind of NAS cluster high availability method, system and electronic equipment and storage medium
CN109271280A (en) * 2018-08-30 2019-01-25 重庆富民银行股份有限公司 Storage failure is switched fast processing method

Also Published As

Publication number Publication date
CN110519349B (en) 2022-07-15

Similar Documents

Publication Publication Date Title
CN110290189B (en) Container cluster management method, device and system
CN101699825B (en) Network file system access method, device and system
CN112532675B (en) Method, device and medium for establishing network edge computing system
CN108205541B (en) Method and device for scheduling distributed web crawler tasks
CN109067930A (en) Domain name cut-in method, domain name analytic method, server, terminal and storage medium
CN103581276B (en) Cluster management device, system, service customer end and correlation method
US20020107954A1 (en) Data model for automated server configuration
CN103607424B (en) Server connection method and server system
CN108989430B (en) Load balancing method, device and storage medium
CN107105013B (en) File processing method, server, terminal and system
CN103856569A (en) Method and device for synchronizing domain name system resource information
US9860317B1 (en) Throughput throttling for distributed file storage services with varying connection characteristics
CN107734026A (en) A kind of design method, device and the equipment of network attached storage cluster
CN107172176B (en) APP method for connecting network, equipment and configuration server based on configuration management
CN104539681A (en) Distributed GIS accelerating system and GIS service processing method
CN104378452A (en) Method, device and system for domain name resolution
CN108259603A (en) A kind of load-balancing method and device
CN108055333A (en) A kind of NAS-CIFS cluster load balancing methods based on UFS
CN109104368B (en) Connection request method, device, server and computer readable storage medium
CN108509297A (en) A kind of data back up method and system
CN109151092A (en) A kind of domain name analytic method
CN111092921A (en) Data acquisition method, device and storage medium
CN109639796A (en) A kind of implementation of load balancing, device, equipment and readable storage medium storing program for executing
CN108737591A (en) A kind of method and device of service configuration
US8972604B1 (en) Network address retention and assignment

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
GR01 Patent grant
GR01 Patent grant