CN106789446A - The cluster distributed test frame and method of a kind of node equity - Google Patents
The cluster distributed test frame and method of a kind of node equity Download PDFInfo
- Publication number
- CN106789446A CN106789446A CN201710087509.8A CN201710087509A CN106789446A CN 106789446 A CN106789446 A CN 106789446A CN 201710087509 A CN201710087509 A CN 201710087509A CN 106789446 A CN106789446 A CN 106789446A
- Authority
- CN
- China
- Prior art keywords
- node
- test
- zmq
- sockets
- test result
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/50—Testing arrangements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
Abstract
The invention discloses a kind of cluster distributed test frame of node equity, including at least one test assignment sender node, several test assignments recipient node, several test results sender node and at least one test result gatherer's node, all nodes pass through network connection;A kind of cluster distributed method of testing of node equity is also disclosed, the cluster distributed test frame of described node equity is applied to.The cluster distributed test frame and method of a kind of present invention node equity, the framework make full use of distributed feature, decentralization, and each node is both the publisher of test assignment in cluster, is also the reception executor of test assignment;It is both the sender of test result, is also the collection storage person of test result;A kind of efficient, reliable node equity distributed test method is provided again.The present invention can be widely applied to test data transmission field as the cluster distributed test frame and method of a kind of node equity.
Description
Technical field
The present invention relates to test data transmission field, the especially a kind of cluster distributed test frame of node equity and side
Method.
Background technology
IOZONE is a benchmark instrument for file system, can test file system in different operating systems
Readwrite performance.
SANERGY is that one kind stores shared, bandwidth testing software.
IOPS (Input/Output Operations Per Second), i.e., it is per second to be written and read(I/O)What is operated is secondary
Number, is used for database occasion, weighs the performance of random access.
ZeroMQ (following ZeroMQ abbreviation ZMQ) is a general message layer, and wherein Zero means zero propagation, also by
It is defined as " most fast message queue in history ".ZeroMQ provides 3 kinds of basic communication modes:Request-Reply、Publish-
Subscribe、Parallel Pipeline.Structure distributed structure/architecture that can be easily and fast using ZeroMQ.
With in cluster, host number is incremented by, and in main frame distributed arrangement orientation it is uncertain, it is original to use
The method of testing of All hosts test assignment exposes the low drawback of cumbersome, efficiency in script synchronization cluster.If host number
Excessively, performed after test assignment that still single can only check the test result of individual host, be unfavorable for cluster overall performance
It is analyzed, assess, optimizes.
The content of the invention
In order to solve the above-mentioned technical problem, it is an object of the invention to provide a kind of cluster distributed test block of node equity
Frame and method, orientation does not know in solving cluster interior joint increasing number and Node distribution formula layout, and causes synchronous collection
All nodes in cluster cannot be simultaneously checked after the completion of the test assignment of all nodes is cumbersome in group, and test assignment is performed
The problem of test result.
The technical solution adopted in the present invention is:A kind of cluster distributed test frame of node equity, the cluster point
Cloth test frame includes at least one test assignment sender node, several test assignments recipient node, several surveys
Test result sender node and at least one test result gatherer's node, all nodes are by network connection, each node base
In ZMQ_DEALER sockets to send test assignment to peer node, each node is based on ZMQ_ROUTER sockets to receive
The test assignment that peer node sends, test result sender node is based on ZMQ_PUB sockets to send test result to survey
Test result gatherer's node, test result gatherer node sets ZMQ_SUB sockets to collect test result sender's node
The test result of transmission.
Another technical scheme of the present invention is:A kind of cluster distributed method of testing of node equity, is applied to
The cluster distributed test frame of described node equity, comprises the following steps:
S1, all of node of startup, each node create a ZMQ_ROUTER socket and simultaneously bind to receive message;
S2, each node often find that a node is to create a ZMQ_ by other nodes in Network finding cluster
DEALER sockets are connected with the ZMQ_ROUTER sockets of the node for finding;
Whether S3, decision node are test assignment sender's node, if so, the node passes through multiple ZMQ_DEALER sockets
Test assignment is sent to multiple peer nodes respectively, test assignment is performed and is stored test result;Otherwise, the node passes through
ZMQ_ROUTER sockets receive test assignment, perform test assignment and store test result;
Whether S4, decision node are test result sender's node, if so, the node creates ZMQ_PUB sockets, and are passed through
ZMQ_PUB sockets are connected to send test result with ZMQ_SUB sockets;Otherwise, the node creates ZMQ_SUB sockets
Word, test result is received by ZMQ_SUB sockets.
Further, step is also included between the step S2 and step S3:
Whether each node separation scheduled time detection peer node leaves, if leaving, closes the peer node correspondence left
ZMQ_DEALER sockets.
Further, after the step S2 interior joints create ZMQ_DEALER sockets, ZMQ_DEALER sockets are set
Attribute be the node identification information;After ZMQ_ROUTER sockets connect upper peer node, by the node
Identification information and address information are sent to peer node.
Further, in the step S4, the node creates ZMQ_SUB sockets, sets subscription and filters and bind
ZMQ_SUB sockets, the test result that ZMQ_PUB sockets send is received by ZMQ_SUB sockets.
Further, test result is encrypted and stored by the node after performing test assignment, and the node is received
It is encrypted after test result and is stored.
Further, described each node includes broadcast UDP bags by the method for other nodes in Network finding cluster
Or Gossip has found agreement.
Further, the testing tool for performing test assignment includes IOZONE or SANERGY.
Further, the test result include reading rate, writing rate, IOPS, access time delay, any group of frame losing number
Close.
Further, the test assignment includes File I/O operations.
The beneficial effects of the invention are as follows:The cluster distributed test frame and method of a kind of node equity of the present invention, the frame
Frame makes full use of distributed feature, decentralization, and each node is both the publisher of test assignment in cluster, is also test
The reception executor of task;It is both the sender of test result, is also the collection storage person of test result;By the framework cluster
In all nodes can synchronously perform identical test assignment;If a node paralysis, can select other nodes in cluster
Issue test assignment collects test result, does not interfere with the test of whole cluster, improves the reliability of test;In this framework
Each several part is all encoded using ZeroMQ Msg to data, with reference to its PUB-SUB pattern, ROUTER/DEALER sockets, is filled
Divide and utilize the efficient transmission performances of ZeroMQ, build a distributed testing framework for efficient, reliable node equity, there is provided
A kind of efficient, reliable node equity distributed test method.
Brief description of the drawings
Specific embodiment of the invention is described further below in conjunction with the accompanying drawings:
Fig. 1 is a kind of data transfer schematic diagram of the cluster distributed test frame of node equity in the present invention;
The step of Fig. 2 is a kind of cluster distributed method of testing of node equity in present invention flow chart;
Fig. 3 is an a kind of specific embodiment flow chart of steps of the cluster distributed method of testing of node equity in the present invention.
Specific embodiment
It should be noted that in the case where not conflicting, the feature in embodiment and embodiment in the application can phase
Mutually combination.
A kind of cluster distributed test frame of node equity, cluster distributed test frame includes that at least one test is appointed
Business sender node, several test assignments recipient node, several test results sender node and at least one test
Collection person's node, by network connection, with reference to Fig. 1, Fig. 1 is a kind of cluster point of node equity in the present invention to all nodes
The data transfer schematic diagram of cloth test frame, all node interconnections are using the ROUTER/DEALER sockets in ZeroMQ technologies
Word, each node is based on ZMQ_DEALER sockets to send test assignment to peer node, and each node is based on ZMQ_
ROUTER sockets to receive the test assignment that peer node sends, collect using the PUB- in ZeroMQ technologies by test result
SUB patterns, test result sender node is based on ZMQ_PUB sockets and is saved to test result gatherer with sending test result
Node 1 and node 2 in point, such as Fig. 1, test result gatherer node set ZMQ_SUB sockets to collect test result hair
The test result that the person's of sending node sends, the node N in such as Fig. 1.In addition, can be by LAN or wide between multiple nodes
Domain network sets up network connection.
A kind of cluster distributed test frame of node equity, the framework makes full use of distributed feature, decentralization,
Each node is both the publisher of test assignment in cluster, is also the reception executor of test assignment;It is both test result
Sender, is also the collection storage person of test result.
A kind of cluster distributed method of testing of node equity, is applied to the cluster distributed test of described node equity
The step of framework is a kind of cluster distributed method of testing of node equity in the present invention referring to figs. 2 and 3, Fig. 2 flow chart,
Fig. 3 is an a kind of specific embodiment flow chart of steps of the cluster distributed method of testing of node equity in the present invention, and Fig. 3 illustrates
Be individual node data transmission scenarios, node equity cluster distributed method of testing comprise the following steps:
S1, all of node of startup, each node create a ZMQ_ROUTER socket and simultaneously bind to receive message;
S2, each node often find that a node is to create a ZMQ_ by other nodes in Network finding cluster
DEALER sockets are connected with the ZMQ_ROUTER sockets of the node for finding, one ZMQ_ of each peer node correspondence
DEALER sockets, to realize being fanned out to data to multiple peer nodes;Further, each node is by Network finding cluster
Other nodes method include broadcast UDP bags or Gossip discovery agreement;Step S2 interior joints create ZMQ_DEALER sockets
After word, the attribute for setting ZMQ_DEALER sockets is unique identification information of node;Connected by ZMQ_ROUTER sockets
After connecting peer node, the identification information and address information of node are sent to peer node, so that peer node being capable of Hui Lian
To the node.In the present embodiment, the node in the present invention is main frame, and the identification information of node is UUID yards of node, also may be used
Be it is other immobilize can unique identification node information;
Used as the further improvement of technical scheme, whether each node separation scheduled time detection peer node leaves, if leaving,
Then close the corresponding ZMQ_DEALER sockets of the peer node for leaving;Specifically, the method that whether detection peer node leaves
Heartbeat detection including Ping-Pong modes;
Whether S3, decision node are test assignment sender's node, if so, node is distinguished by multiple ZMQ_DEALER sockets
Test assignment is sent to multiple peer nodes, according to the characteristic of ZMQ_ROUTER sockets, peer node can obtain transmission, and this disappears
UUID yards of breath node, performs test assignment and encrypts storage test result;Otherwise, node is connect by ZMQ_ROUTER sockets
Acceptance Tests task, performs test assignment and encrypts storage test result;Further, the testing tool for performing test assignment includes
IOZONE or SANERGY;Test result includes reading rate, writing rate, IOPS, access time delay, any combination of frame losing number;
Whether S4, decision node are test result sender's node, if so, node creates ZMQ_PUB sockets, and by ZMQ_
PUB sockets are connected to send test result with ZMQ_SUB sockets, wherein, ZMQ_PUB sockets are used in the way of being fanned out to
Send data;Otherwise, node creates ZMQ_SUB sockets, and test result is received by ZMQ_SUB sockets, encrypts and stores,
And be further analyzed by analysis program.Further, in step S4, node creates ZMQ_SUB sockets, sets and subscribes to filtering
And ZMQ_SUB sockets are bound, the test result that ZMQ_PUB sockets send is received by ZMQ_SUB sockets, each node
Test result is crossed to and reaches, and is independent of each other.Finally, terminate data transfer, close all sockets.
Due to cross-platform, the portability of ZeroMQ technologies, the present invention is not limited to operating system.ZeroMQ can be by
Most of language are called, including C, C++, C#, Clojure, CL, Erlang, F#, Felix, Go, Haskell, Java,
Lua、Node.js、Objective-C、Perl、PHP、Python、Ruby、Scala、Tcl、Ada、Basic、Haxe、ooc。
Identical test assignment can be synchronously performed by all nodes in cluster of the invention;If a section in cluster
Point paralysis, can select other nodes to issue test assignment or collect test result, not interfere with the test of whole cluster, improve
The reliability of test;Each several part is all encoded using ZeroMQ Msg to data in this framework, with reference to its PUB-SUB mould
Formula, ROUTER/DEALER sockets, make full use of the efficient transmission performances of ZeroMQ, build an efficient, reliable node pair
Deng distributed testing framework, there is provided a kind of efficient, reliable node equity distributed test method.
Above is preferable implementation of the invention is illustrated, but the invention is not limited to the implementation
Example, those of ordinary skill in the art can also make a variety of equivalent variations or replace on the premise of without prejudice to spirit of the invention
Change, these equivalent deformations or replacement are all contained in the application claim limited range.
Claims (10)
1. the cluster distributed test frame of a kind of node equity, it is characterised in that the cluster distributed test frame includes
At least one test assignment sender node, several test assignments recipient node, several test results sender's node
With at least one test result gatherer's node, by network connection, each node is based on ZMQ_DEALER sockets for all nodes
To send test assignment to peer node, each node is based on ZMQ_ROUTER sockets to receive the survey of peer node transmission word
Trial is engaged in, and test result sender node is based on ZMQ_PUB sockets to send test result to test result gatherer's node,
Test result gatherer node sets ZMQ_SUB sockets to collect the test result of test result sender node transmission.
2. a kind of cluster distributed method of testing of node equity, is applied to the reciprocity cluster of the node described in claim 1 and divides
Cloth test frame, it is characterised in that comprise the following steps:
S1, all of node of startup, each node create a ZMQ_ROUTER socket and simultaneously bind to receive message;
S2, each node often find that a node is to create a ZMQ_ by other nodes in Network finding cluster
DEALER sockets are connected with the ZMQ_ROUTER sockets of the node for finding;
Whether S3, decision node are test assignment sender's node, if so, the node passes through multiple ZMQ_DEALER sockets
Test assignment is sent to multiple peer nodes respectively, test assignment is performed and is stored test result;Otherwise, the node passes through
ZMQ_ROUTER sockets receive test assignment, perform test assignment and store test result;
Whether S4, decision node are test result sender's node, if so, the node creates ZMQ_PUB sockets, and are passed through
ZMQ_PUB sockets are connected to send test result with ZMQ_SUB sockets;Otherwise, the node creates ZMQ_SUB sockets
Word, test result is received by ZMQ_SUB sockets.
3. cluster distributed method of testing according to claim 2, it is characterised in that between the step S2 and step S3
Also include step:
Whether each node separation scheduled time detection peer node leaves, if leaving, closes the peer node correspondence left
ZMQ_DEALER sockets.
4. the cluster distributed method of testing according to Claims 2 or 3, it is characterised in that the step S2 interior joints wound
After building ZMQ_DEALER sockets, the attribute for setting ZMQ_DEALER sockets is the identification information of the node;By ZMQ_
After the upper peer node of ROUTER sockets connection, the identification information and address information of the node are sent to peer node.
5. cluster distributed method of testing according to claim 4, it is characterised in that in the step S4, the node
ZMQ_SUB sockets are created, subscription is set and is filtered and is bound ZMQ_SUB sockets, ZMQ_ is received by ZMQ_SUB sockets
The test result that PUB sockets send.
6. cluster distributed method of testing according to claim 5, it is characterised in that after the node performs test assignment
Test result is encrypted and stored, is encrypted and is stored after the node reception test result.
7. cluster distributed method of testing according to claim 6, it is characterised in that described each node is sent out by network
The method of other nodes in existing cluster includes that broadcast UDP bags or Gossip have found agreement.
8. cluster distributed method of testing according to claim 7, it is characterised in that the test of the execution test assignment
Instrument includes IOZONE or SANERGY.
9. cluster distributed method of testing according to claim 8, it is characterised in that the test result includes reading speed
Degree, writing rate, IOPS, access time delay, any combination of frame losing number.
10. cluster distributed method of testing according to claim 9, it is characterised in that the test assignment includes file
I/O operation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710087509.8A CN106789446B (en) | 2017-02-17 | 2017-02-17 | Node peer-to-peer cluster distributed test system and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710087509.8A CN106789446B (en) | 2017-02-17 | 2017-02-17 | Node peer-to-peer cluster distributed test system and method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106789446A true CN106789446A (en) | 2017-05-31 |
CN106789446B CN106789446B (en) | 2020-06-02 |
Family
ID=58958571
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710087509.8A Active CN106789446B (en) | 2017-02-17 | 2017-02-17 | Node peer-to-peer cluster distributed test system and method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106789446B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109885495A (en) * | 2019-02-20 | 2019-06-14 | 重庆邮电大学 | The group's test method and system of a kind of pair of decentralization system |
CN109903178A (en) * | 2019-04-04 | 2019-06-18 | 腾讯科技(深圳)有限公司 | It is a kind of to determine the method, apparatus, system of social object jointly and calculate equipment |
CN111382737A (en) * | 2018-12-29 | 2020-07-07 | 深圳光启空间技术有限公司 | Multi-path load balancing asynchronous target detection method, storage medium and processor |
CN111682961A (en) * | 2020-05-18 | 2020-09-18 | 杜晓楠 | Method for eliminating low-bandwidth nodes in I2P network, computer readable storage medium and I2P network |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101447892A (en) * | 2008-11-24 | 2009-06-03 | 中兴通讯股份有限公司 | Distributed test method, system and test server |
CN102141962A (en) * | 2011-04-07 | 2011-08-03 | 北京航空航天大学 | Safety distributed test framework system and test method thereof |
CN102420727A (en) * | 2012-01-05 | 2012-04-18 | 北京邮电大学 | Distributed protocol test system and method |
CN102970176A (en) * | 2012-09-19 | 2013-03-13 | 东莞中山大学研究院 | Peer-to-peer (P2P) streaming media simulation system based on network simulator version 2 (NS2) |
CN103297286A (en) * | 2012-02-23 | 2013-09-11 | 百度在线网络技术(北京)有限公司 | Distributed cluster reliability test system, method and device |
CN104077212A (en) * | 2013-03-26 | 2014-10-01 | 阿里巴巴集团控股有限公司 | Pressure test system and method |
CN104850491A (en) * | 2014-02-19 | 2015-08-19 | 深圳中兴网信科技有限公司 | Software test method, equipment and system |
-
2017
- 2017-02-17 CN CN201710087509.8A patent/CN106789446B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101447892A (en) * | 2008-11-24 | 2009-06-03 | 中兴通讯股份有限公司 | Distributed test method, system and test server |
CN102141962A (en) * | 2011-04-07 | 2011-08-03 | 北京航空航天大学 | Safety distributed test framework system and test method thereof |
CN102420727A (en) * | 2012-01-05 | 2012-04-18 | 北京邮电大学 | Distributed protocol test system and method |
CN103297286A (en) * | 2012-02-23 | 2013-09-11 | 百度在线网络技术(北京)有限公司 | Distributed cluster reliability test system, method and device |
CN102970176A (en) * | 2012-09-19 | 2013-03-13 | 东莞中山大学研究院 | Peer-to-peer (P2P) streaming media simulation system based on network simulator version 2 (NS2) |
CN104077212A (en) * | 2013-03-26 | 2014-10-01 | 阿里巴巴集团控股有限公司 | Pressure test system and method |
CN104850491A (en) * | 2014-02-19 | 2015-08-19 | 深圳中兴网信科技有限公司 | Software test method, equipment and system |
Non-Patent Citations (1)
Title |
---|
杨秋辉等: "分布式自动化软件测试实现技术研究", 《四川大学学报(工程科学版)》 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111382737A (en) * | 2018-12-29 | 2020-07-07 | 深圳光启空间技术有限公司 | Multi-path load balancing asynchronous target detection method, storage medium and processor |
CN109885495A (en) * | 2019-02-20 | 2019-06-14 | 重庆邮电大学 | The group's test method and system of a kind of pair of decentralization system |
CN109903178A (en) * | 2019-04-04 | 2019-06-18 | 腾讯科技(深圳)有限公司 | It is a kind of to determine the method, apparatus, system of social object jointly and calculate equipment |
CN109903178B (en) * | 2019-04-04 | 2021-08-20 | 腾讯科技(深圳)有限公司 | Method, device and system for determining common social contact object and computing equipment |
CN111682961A (en) * | 2020-05-18 | 2020-09-18 | 杜晓楠 | Method for eliminating low-bandwidth nodes in I2P network, computer readable storage medium and I2P network |
CN111682961B (en) * | 2020-05-18 | 2023-03-07 | 杜晓楠 | Method for eliminating low-bandwidth nodes in I2P network, computer readable storage medium and I2P network |
Also Published As
Publication number | Publication date |
---|---|
CN106789446B (en) | 2020-06-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Hegeman et al. | Toward optimal bounds in the congested clique: Graph connectivity and MST | |
CN106789446A (en) | The cluster distributed test frame and method of a kind of node equity | |
CN105959168B (en) | The technology of network copy | |
CN104978258B (en) | Automatic software test method and system | |
CN105765578A (en) | Parallel access to data in a distributed file system | |
CN109088820A (en) | A kind of striding equipment link aggregation method, device, computing device and storage medium | |
US20210152433A1 (en) | Systems and methods for determining entry points for mapping a network | |
CN107133231B (en) | Data acquisition method and device | |
CN111431730B (en) | Service processing method, system, computer equipment and readable medium | |
WO2017162026A1 (en) | Description information generating method and device | |
WO2014042753A1 (en) | Generating and evaluating expert networks | |
CN103229480A (en) | Data processing method, device and client in distributed storage system | |
CN109818824A (en) | A kind of message transmitted test method, equipment and storage equipment, program product | |
CN113765718B (en) | QUIC protocol-oriented test topology construction method and device | |
CN107846449A (en) | Method, apparatus, readable storage medium storing program for executing and the equipment of calling system instrument | |
CN110019093A (en) | Method for writing data, device, equipment and medium | |
CN108182119A (en) | Read and write abruption control method and device, storage medium and electronic device | |
CN109547430A (en) | A kind of exploitation service gateway system and exploitation gateway | |
CN108520481A (en) | House type is quoted and the method, apparatus and computer storage media of house type partition | |
CN110380930B (en) | Test method, test device, server and computer storage medium | |
CN107086960A (en) | A kind of message transmitting method and device | |
US9614891B1 (en) | Assembling communications based on captured packets | |
JP2014026480A (en) | Output comparison method for plural information systems | |
CN109951355A (en) | A method of it is tracked for distributed system whitepack associated path | |
CN115422184A (en) | Data acquisition method, device, equipment and storage medium |
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 | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20190912 Address after: 100089 Floor 1-4, No. 2 Building, No. 9 Courtyard, Dijin Road, Haidian District, Beijing Applicant after: Beijing Toyou Feiji Electronics Co., Ltd. Address before: 518000 Guangdong city of Shenzhen province Nanshan District South Road Fiyta Technology Building Room 1402 Applicant before: Shenzhen City Rui Bo deposit information technology Co. Ltd. |
|
TA01 | Transfer of patent application right | ||
GR01 | Patent grant | ||
GR01 | Patent grant |