CN115309597A - Server cluster testing method and device, storage medium and electronic equipment - Google Patents

Server cluster testing method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN115309597A
CN115309597A CN202210977424.8A CN202210977424A CN115309597A CN 115309597 A CN115309597 A CN 115309597A CN 202210977424 A CN202210977424 A CN 202210977424A CN 115309597 A CN115309597 A CN 115309597A
Authority
CN
China
Prior art keywords
servers
test
server cluster
real
service
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
CN202210977424.8A
Other languages
Chinese (zh)
Other versions
CN115309597B (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.)
Beijing Xinghan Future Network Technology Co ltd
Original Assignee
Beijing Xinghan Future 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 Beijing Xinghan Future Network Technology Co ltd filed Critical Beijing Xinghan Future Network Technology Co ltd
Priority to CN202210977424.8A priority Critical patent/CN115309597B/en
Publication of CN115309597A publication Critical patent/CN115309597A/en
Application granted granted Critical
Publication of CN115309597B publication Critical patent/CN115309597B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3433Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment for load management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

Some embodiments of the present application provide a method, an apparatus, a storage medium, and an electronic device for server cluster testing, where the method includes: determining a part of servers used for serving real-time online services in a server cluster; collecting the test indexes of the partial servers; and when the test index reaches a test termination condition, acquiring the service bearing capacity of the server cluster according to the flow of the real-time online service and the number of the partial servers. Some embodiments of the application can use the traffic of the online real-time service to test the server cluster, and obtain a test result with higher accuracy.

Description

Server cluster testing method and device, storage medium and electronic equipment
Technical Field
The present application relates to the field of test technologies, and in particular, to a method and an apparatus for testing a server cluster, a storage medium, and an electronic device.
Background
In order to ensure the normal operation of the server cluster, the capability of the software service system needs to be tested.
At present, when a server cluster is generally subjected to pressure test, concurrent access amount is simulated to carry out the pressure test on the server cluster, the server cluster is not modified, manual pressure test is carried out only by controlling access amount of an entrance in the method, implementation and deployment are simple, the period is short, and the cost is low. However, the method cannot simulate the real online traffic, so that only the approximate performance condition of the system can be obtained, and the bearing capacity and performance of the server cluster cannot be accurately evaluated. In addition, in the prior art, the online real flow can be utilized in a recording playback or flow guide copying mode, the flow amplification is carried out simultaneously, system core components such as a database, a cache and a message queue of an online system need to be modified in order to prevent pollution to online data, the system implementation modification is complex, and the period is long and the cost is high.
Therefore, how to provide a technical solution of a method for testing a server cluster with high efficiency becomes a technical problem which needs to be solved urgently.
Disclosure of Invention
An object of some embodiments of the present application is to provide a method, an apparatus, a storage medium, and an electronic device for server cluster testing, in which a server cluster can be pressure tested by using traffic data of an online real-time service through a technical scheme of the embodiments of the present application, so that accuracy and testing efficiency of testing are improved, and complicated modification work is not required, and a testing period is short and a cost is low.
In a first aspect, some embodiments of the present application provide a method for server cluster testing, including: determining a part of servers in a server cluster for serving real-time online services; collecting the test indexes of the partial servers; and when the test index reaches a test termination condition, acquiring the service bearing capacity of the server cluster according to the flow of the real-time online service and the number of the partial servers.
Some embodiments of the application compare the collected test indexes of part of servers with the termination test condition, obtain the service bearing capacity of the server cluster when the termination test condition is reached, realize that the flow data of the real-time online service is utilized to carry out pressure test on the server cluster, improve the accuracy and the test efficiency of the test, and do not need to carry out complicated transformation work, and the test period is short and the cost is low.
In some embodiments, the determining a portion of servers in a server cluster for serving real-time online services comprises: and circularly executing the following operation, gradually reducing the number of the servers used for serving the real-time online service in the server cluster, collecting the test index of the servers used for serving the real-time online service, and determining the servers finally used for serving the real-time online service as the partial servers when the test index is determined to reach the termination test condition.
Some embodiments of the present application may accurately obtain the number of servers that can currently provide real-time online services by reducing the number of servers that provide real-time online services in a server cluster step by step and determining a part of servers when conditions are met.
In some embodiments, the collecting test metrics for a server serving the real-time online service includes: and collecting the test indexes of the servers of the real-time online service within a preset time interval.
Some embodiments of the application can ensure collection in a stable state of a server cluster by collecting test indexes within a preset time interval, and can ensure the accuracy of the collected test indexes.
In some embodiments, when the test indicator reaches the termination test condition, obtaining the service carrying capacity of the server cluster according to the traffic of the real-time online service and the number of the partial servers includes: and when determining that the external condition meets the test environment and determining that the test index reaches the test termination condition, acquiring the service bearing capacity of the server cluster according to the flow of the real-time online service and the number of the partial servers.
Some embodiments of the application can ensure the orderly execution of the test by performing the test under the premise that the external conditions satisfy the test environment.
In some embodiments, the method further comprises: and when the external condition is determined not to meet the test environment, terminating the test process.
According to some embodiments of the application, the test is stopped when the external environment does not meet the test environment, so that the normal use of the server cluster is ensured, and the influence on the user is reduced.
In some embodiments, said determining that said external condition does not satisfy said test environment comprises: and when receiving a test termination operation of a user, or when receiving a server capacity expansion operation of the user, or when receiving an information release operation of the user, or when receiving a rollback operation of the user, confirming that the external condition does not meet the test environment.
According to some embodiments of the application, the external conditions are confirmed to be not satisfied with the test environment under the conditions, so that the pressure test can be effectively stopped, and the normal work of the server cluster is effectively ensured.
In some embodiments, before the determining the portion of servers in the server cluster for serving the live online service, the method further comprises: obtaining the termination test condition and test parameters in the server cluster, wherein the test parameters include: presetting the number of servers and a threshold value of the number of the servers; wherein the number of the partial servers is greater than the server number threshold.
Some embodiments of the application can enable the test to be efficiently performed by configuring corresponding test termination conditions and test parameters, and ensure the accuracy of the test result.
In some embodiments, said incrementally reducing the number of servers in said server cluster used to service said real-time online service comprises: and gradually reducing the number of the preset servers in the server cluster for serving the real-time online service.
Some embodiments of the application can realize accurate testing of the bearable pressure of the server cluster by gradually reducing the number of the servers preset with the server.
In some embodiments, the servers of the preset number of servers serve locally stored service traffic without participating in serving traffic of the real-time online service.
According to some embodiments of the application, the servers with the preset number of servers can execute local services, so that on one hand, normal work of a server cluster can be ensured, and on the other hand, testing of the rest servers is not influenced.
In some embodiments, the obtaining, according to the traffic of the real-time online service and the number of the partial servers, the service bearing capacity of the server cluster includes: solving the ratio of the flow of the real-time online service to the number of the partial servers to obtain the bearing capacity of a single server; and solving the product of the bearing capacity of the single server and the number of the servers in the server cluster to obtain the bearing capacity of the service.
According to some embodiments of the application, the service bearing capacity of the server cluster is obtained through the bearing capacity of a single server, and the method is convenient, fast, accurate, free of technical threshold and low in cost.
In a second aspect, some embodiments of the present application provide an apparatus for server cluster testing, including: a determining module configured to determine a portion of servers in a server cluster for serving real-time online services; the acquisition module is configured to acquire the test indexes of the part of servers; and the obtaining module is configured to obtain the service carrying capacity of the server cluster according to the flow of the real-time online service and the number of the partial servers when the test index reaches a termination test condition.
In a third aspect, some embodiments of the present application provide a computer-readable storage medium on which a computer program is stored, which when executed by a processor, may implement the method according to any of the embodiments of the first aspect.
In a fourth aspect, some embodiments of the present application provide an electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor, when executing the program, may implement the method according to any of the embodiments of the first aspect.
In a fifth aspect, some embodiments of the present application provide a computer program product comprising a computer program, wherein the computer program, when executed by a processor, is adapted to implement the method according to any of the embodiments of the first aspect.
Drawings
In order to more clearly illustrate the technical solutions of some embodiments of the present application, the drawings that are required to be used in some embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that for a person skilled in the art, other relevant drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a system diagram of server cluster testing provided by some embodiments of the present application;
FIG. 2 is a flow diagram of a method for server cluster testing provided by some embodiments of the present application;
FIG. 3 is a second flowchart of a method for server cluster testing according to some embodiments of the present application;
FIG. 4 is a block diagram illustrating an apparatus for server cluster testing, according to some embodiments of the present disclosure;
fig. 5 is a schematic diagram of an electronic device according to some embodiments of the present application.
Detailed Description
The technical solutions in some embodiments of the present application will be described below with reference to the accompanying drawings in some embodiments of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not construed as indicating or implying relative importance.
In the related art, the purpose of performing pressure measurement on a software system or a server cluster is generally: weak links in a system or a cluster are found, and performance optimization is carried out in advance; evaluating the capacity of the system or the server cluster so as to carry out accurate capacity planning; the system or the cluster is prevented from being broken down by burst peak flow of the large activity, and a countermeasure is taken in advance. The current general pressure measurement scheme is to simulate real flow or record or copy the real flow, and modify the system or cluster to realize pressure measurement. However, the simulation of the real flow rate cannot truly reflect the real flow rate, so that the accuracy of the pressure measurement result is low. The method for recording or copying the real flow needs to modify a system or a cluster, and has higher complexity, higher cost and long period.
In view of this, some embodiments of the present application provide a method for testing a server cluster, where the method acquires a test index of a part of servers, and acquires a service bearing capacity of the server cluster when the test index reaches a termination test condition. Some embodiments of this application can utilize the traffic data of online real-time service to press the survey to the server cluster, have promoted the degree of accuracy and the efficiency of software testing, need not carry out complicated transformation work moreover, and test cycle is short and the cost is lower.
As shown in fig. 1, some embodiments of the present application provide a system for server cluster test, where the system includes a terminal 110 and a server cluster 120, where the server cluster includes a first server 121, a second server 122, a third server 123, and a fourth server 124. The data communication between the terminal 110 and the server cluster 120 may be through wire or wireless. The terminal 110 may collect the test index in the server cluster 120, compare the test index with the termination test condition, and obtain the service carrying capacity of the server cluster when the test index reaches the termination test condition.
In some embodiments of the present application, the terminal 100 may be a mobile terminal or a non-portable computer terminal. In other embodiments of the present application, the server cluster 120 may include a greater number of servers besides the 4 servers listed above, for example, 50, 100, or 1000 servers in the server cluster 120, and the present application is not limited thereto.
A method implementation process of server cluster test performed by the terminal 110 according to some embodiments of the present application is exemplarily described below with reference to fig. 2.
Referring to fig. 2, fig. 2 is a flowchart of a method for testing a server cluster according to some embodiments of the present application, where the method for testing a server cluster may include: s210, determining a part of servers used for serving real-time online services in the server cluster. And S220, collecting the test indexes of the partial servers. And S230, when the test index reaches a test termination condition, acquiring the service bearing capacity of the server cluster according to the flow of the real-time online service and the number of the partial servers.
For example, in some embodiments of the present application, the server cluster is pressure-measured by using real-time online traffic (i.e., real traffic generated by real-time online service), and the real traffic is not used as a control variable of the pressure measurement but as an environmental constraint condition, so that the authenticity of the pressure-measured environment can be ensured. The number of instances (as one example of the number of servers) of the online real-time service provided by the deployment system (as one specific example of the server cluster) to the outside is taken as a control variable instead of an environmental constraint condition, and the pressure condition borne by each instance (as one example of the server) of the online service is changed by adjusting the number of instances of the online real-time service provided to the outside, so that the complex system reconstruction work is avoided. For example, the terminal 110 may collect test indexes of a part of servers after confirming the part of servers that can provide real-time online services, and may obtain the service bearing capacity of the server cluster when the test indexes reach the termination test condition.
In some embodiments of the present application, before S210, the method for server cluster testing further includes: obtaining the termination test condition and test parameters in the server cluster, wherein the test parameters include: and presetting the number of servers and a threshold value of the number of the servers.
For example, in some embodiments of the present application, the termination test conditions may include: the slow speed ratio, the error rate, the average consumed time, the CPU utilization rate, the memory utilization rate, and the like, as long as the threshold value of the service index or the physical index that can reflect the service capability of the server cluster can be used as the termination test condition. The present application is not limited thereto. The test parameters may include: the first test parameter is as follows: the maximum number of instances removed from the service registry at a time, i.e., the preset number of servers removed at a time. And testing parameters II: and after removing the preset number of servers each time, the server cluster is in a time interval from the moment of removing the servers to the moment of normally providing the online service. That is to say, after removing the corresponding server each time, the server cluster is considered to be recovered to be stable after the time interval is exceeded, and the collected test index is more accurate at the moment. And (3) testing parameters: a minimum number of servers, i.e., a threshold number of servers, is set that ensures that the server cluster can normally provide online services.
It should be noted that, the time interval from the time of removing the server to the time of normally providing the online service for the server cluster may be considered as: assuming that the real traffic of the online service provided by 100 servers is Q, there are 90 servers in the server cluster after 10 servers are removed from 100. In one mode, 10 removed servers have already completed the service to be executed locally, and at this time, the real traffic is Q, and at this time, Q needs to be distributed to 90 servers in a balanced manner, that is, when Q is distributed, the server can normally provide the online service. In another mode, the traffic of the service that needs to be executed locally is a when 10 removed servers are executing, at this time, the real traffic of the online service of Q-a needs to be distributed to 90 servers in a balanced manner, that is, when the distribution is completed, the server can provide the online service normally.
In some embodiments of the present application, the slow ratio is a ratio of the number of slow requests to the total number of requests, wherein the number of slow requests characterizes the number of times a request received by the server takes more time than a request time threshold. The error rate is the ratio of the number of error requests to the total number of requests, wherein the number of error requests represents the number of requests of each server for the exception of the status code returned by the request. The average consumed time is a ratio of the consumed time of all requests to the total number of requests, wherein the average consumed time represents the time for each server to process one request. The CPU utilization rate is the ratio of the time of the CPU for executing the non-idle process to the total execution time of the CPU. Memory occupancy characterizes the memory overhead in executing any process or providing any online service.
In some embodiments of the present application, S210 may include: and circularly executing the following operation, gradually reducing the number of the servers used for serving the real-time online service in the server cluster, collecting the test index of the servers used for serving the real-time online service, and determining the servers finally used for serving the real-time online service as the partial servers when the test index is determined to reach the termination test condition. Wherein the number of the partial servers is greater than the server number threshold.
For example, in some embodiments of the present application, the final partial server is identified by gradually reducing the number of servers served on the application real-time line, and then combining the test metrics, but the number of partial servers is greater than the threshold number of servers.
In some embodiments of the present application, S210 may include: and gradually reducing the number of the preset servers in the server cluster for serving the real-time online service.
For example, in some embodiments of the present application, the preset number of servers may be set according to actual requirements, and in order to obtain a service carrying capacity with higher accuracy, in the process of gradually reducing the number of servers each time, the value of the preset number of servers may not be unique, and may be set according to actual requirements.
In order to ensure the normal operation of the servers, in some embodiments of the present application, the servers of the preset number of servers serve locally stored service traffic, and do not participate in serving traffic of the real-time online service.
For example, in some embodiments of the present application, the removed servers with the preset number of servers only do not need to provide real-time online services to the outside, but the services inside the servers still operate, and the servers may also be called by the server cluster as needed, so as to ensure the safe and effective operation of the server cluster. That is, the removed server is not reduced, and the server is not provided to a cloud manufacturer or a private IDC (database Data Corporation) room for other services.
To ensure accuracy of the test index acquisition, S220 may include in some embodiments of the present application: and collecting the test indexes of the servers of the real-time online service within a preset time interval.
For example, in some embodiments of the present application, after a part of servers are stable, corresponding test indexes are collected, so as to ensure accuracy of test index data, and thus accuracy of test results can be ensured.
To ensure proper performance of the server cluster test, in some embodiments of the present application, S230 may include: and when determining that the external condition meets the test environment and determining that the test index reaches the test termination condition, acquiring the service bearing capacity of the server cluster according to the flow of the real-time online service and the number of the partial servers.
According to the method and the device, real-time real flow of the online service is realized when the server cluster is subjected to pressure measurement, namely the server provides the service to the outside during the test, so that in order to avoid influencing the use experience of a user in the pressure measurement process, automatic pressure measurement needs to be performed under the condition that the external condition is confirmed to meet the test environment in some embodiments of the method and the device.
In some embodiments of the present application, the method for server cluster testing further includes: and when the external condition is determined not to meet the test environment, terminating the test process. When receiving a test termination operation of a user, or when receiving a server scaling operation of the user, or when receiving an information release operation of the user, or when receiving a rollback operation of the user, confirming that the external condition does not satisfy the test environment.
For example, in some embodiments of the present application, if during the process of pressure measurement, operations such as scale-out, release, and rollback are manually sent, the pressure measurement is automatically terminated. It may also be appreciated that when a server cluster or system is in a state of manual scale-up, release, rollback, etc., the server cluster and system may not be pressure tested.
In some embodiments of the present application, S230 may include: solving the ratio of the flow of the real-time online service to the number of the partial servers to obtain the bearing capacity of a single server; and solving the product of the bearing capacity of the single server and the number of the servers in the server cluster to obtain the service bearing capacity.
For example, in some embodiments of the present application, the carrying capacity of a single server may be obtained as W/N by using the traffic W of the real-time online service and the number N of the partial servers, and further, the carrying capacity of the service of the server cluster may be obtained. For example, there are M servers in a server cluster, and at this time, the service carrying capacity R = M (W/N) of the server cluster.
The following describes a specific process of server cluster testing provided by some embodiments of the present application with reference to fig. 3.
Referring to fig. 3, fig. 3 is a flowchart of a method for testing a server cluster according to some embodiments of the present application, and a specific implementation process of the server cluster test is exemplarily described below, it should be noted that the following embodiments are performed under a condition that an external condition satisfies a test environment, and are performed during an online low-peak traffic period. Wherein, the on-line flow low peak time interval is a target time interval obtained through a large amount of data statistics.
S310, obtaining the termination test conditions in the server cluster.
For example, as a specific example of the present application, there are 100 machines in the server cluster, which may also be referred to as 100 instances, and then 100 instances are all used to provide real-time online services. The method comprises the steps of setting an SLA (Service Level Agreement) rule for a server cluster which needs to carry out system pressure measurement, namely setting a pressure measurement termination condition, wherein the selected observation indexes can be a slow speed ratio, an error rate, average consumed time, a CPU utilization rate and a memory utilization rate. And setting threshold values of a slow speed ratio, an error rate, average consumed time, a CPU utilization rate and a memory utilization rate, and taking the threshold values of a plurality of observation indexes as termination pressure measurement conditions. To ensure the accuracy of the test results, multiple observation targets are generally selected at the same time.
S320, obtaining the test parameters in the server cluster.
For example, as a specific example of the present application, test parameters are set, and the test parameters include: a pressure measurement step size 10 (as a specific example of a preset number of servers), a time interval of 5 seconds, and a minimum number of instances 30 (i.e., a server number threshold). Wherein, the pressure measurement step length is as follows: the maximum number of instances removed from the service registry at a time. The time interval is the length of time from the removal instance to the server cluster state tending to stabilize. From a security perspective, the server cluster sets the minimum number of instances that can normally provide a service. It should be noted that 100 instances are stored in the service registry.
S330, reducing the number of servers in the server cluster for serving the real-time online service.
For example, as a specific example of the present application, 10 machines for serving real-time online services are reduced from a server cluster, i.e. the number of instances is reduced by the same step size as the pressure measurement. It should be noted that the reduced instances or machines are not being used to provide real-time online services. And the number of the servers for serving the real-time online services is greater than or equal to the minimum number of the instances.
S340, collecting the test index of the server for serving the real-time online service.
For example, as a specific example of the present application, after a waiting time interval of 5 seconds, that is, after a server serving the real-time online service is stable, an initial slow speed ratio, an initial error rate, an initial average consumed time, an initial CPU utilization rate, and an initial memory utilization rate for serving the real-time online service are collected.
And S350, judging whether the test indexes meet the test termination condition, if not, executing S330, and if so, acquiring a part of servers and executing S360.
For example, as a specific example of the present application, the initial slow speed ratio, the initial error rate, the initial average consumed time, the initial CPU utilization rate, and the initial memory utilization rate are respectively compared with threshold values of the set slow speed ratio, error rate, average consumed time, CPU utilization rate, and memory utilization rate, and if there is one test indicator that meets the threshold value, the pressure test is terminated, that is, the server cluster is considered to have reached the performance limit. If not, continuing to execute S330 for pressure measurement.
And S360, acquiring the service bearing capacity of the server cluster according to the flow of the real-time online service and the number of partial servers.
For example, as a specific example of the present application, a ratio of traffic of a service on a real-time line to the number of partial servers is used as a single instance bearer capability (that is, a single server bearer capability), and the single instance bearer capability is multiplied by 100 to obtain a service bearer capability of a server cluster.
Therefore, in some embodiments of the application, the server cluster is pressure-measured by using the real-time real traffic of the real-time online service, and neither manual simulation nor recording, playback or copying and amplifying the real traffic are required, that is, any change is not required to be made to the real-time real traffic, so that a more accurate pressure measurement result can be obtained, and meanwhile, the pressure measurement is not required to cause pollution to the real online traffic data. Some embodiments of the present application change the online real-time traffic pressure borne by a single instance by controlling the number of instances of the service cluster providing services to the outside, and gradually approach the upper limit of the system carrying capacity by reducing the number of instances, thereby avoiding the complicated system component modification cost. Because some embodiments of the present application do not require manufacturing flow nor modification of system components, rapid pressure measurements are possible, low implementation costs and short cycle times.
Referring to fig. 4, fig. 4 is a block diagram illustrating an apparatus for server cluster testing according to some embodiments of the present disclosure. It should be understood that the apparatus for server cluster testing corresponds to the above method embodiments, and can perform the steps related to the above method embodiments, and the specific functions of the apparatus for server cluster testing may be referred to the above description, and a detailed description is appropriately omitted here to avoid redundancy.
The apparatus for server cluster testing of fig. 4 includes at least one software function module that can be stored in a memory in the form of software or firmware or solidified in the apparatus for server cluster testing, the apparatus for server cluster testing including: a determining module 410 configured to determine a portion of servers in a server cluster for serving real-time online services; an acquisition module 420 configured to acquire the test indicators of the part of servers; an obtaining module 430, configured to obtain, when the test indicator reaches a termination test condition, a service carrying capacity of the server cluster according to a traffic of the real-time online service and the number of the partial servers.
In some embodiments of the present application, the determining module 410 is configured to cyclically perform operations of gradually reducing the number of servers in the server cluster for serving the real-time online service, and collecting a test indicator of the server for serving the real-time online service until the test indicator is determined to reach the termination test condition, and determining the server finally serving the real-time online service as the partial server.
In some embodiments of the present application, the collecting module 420 is configured to collect the test index of the server served on the real-time online service within a preset time interval.
In some embodiments of the present application, the obtaining module 430 is configured to obtain the service carrying capacity of the server cluster according to the traffic of the real-time online service and the number of the partial servers when it is determined that the external condition satisfies the test environment and it is determined that the test index reaches the termination test condition.
In some embodiments of the present application, the apparatus for server cluster testing further includes: a termination module (not shown) configured to terminate the test procedure upon determining that the external condition does not satisfy the test environment.
In some embodiments of the present application, the termination module is configured to confirm that the external condition does not satisfy the test environment when receiving a termination test operation of a user, or when receiving a server scaling operation of the user, or when receiving an information publishing operation of the user, or when receiving a rollback operation of the user.
In some embodiments of the present application, before the determining module 410, the apparatus for server cluster testing further includes a setting module (not shown in the figure) configured to obtain the termination test condition and the test parameters in the server cluster, where the test parameters include: presetting the number of servers and a threshold value of the number of the servers; wherein the number of the partial servers is greater than the server number threshold.
In some embodiments of the present application, the determining module 410 is configured to gradually reduce the preset number of servers in the server cluster for serving the live online service.
In some embodiments of the present application, the server with the preset number of servers serves a service traffic stored locally, and does not participate in serving the traffic of the real-time online service.
In some embodiments of the present application, the obtaining module 430 is configured to solve a ratio of traffic of the real-time online service to the number of the partial servers, so as to obtain a carrying capacity of a single server; and solving the product of the bearing capacity of the single server and the number of the servers in the server cluster to obtain the service bearing capacity.
Some embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processor can implement the operations of the method corresponding to any of the above-mentioned methods provided by the above-mentioned embodiments.
Some embodiments of the present application further provide a computer program product, which includes a computer program, wherein the computer program, when executed by a processor, can implement the operations of the method corresponding to any of the above-mentioned methods provided by the above-mentioned embodiments.
As shown in fig. 5, some embodiments of the present application provide an electronic device 500, the electronic device 500 comprising: a memory 510, a processor 520 and a computer program stored on the memory 510 and executable on the processor 520, wherein the method of any of the embodiments described above can be implemented when the processor 520 reads the program from the memory 510 via the bus 530 and executes the program.
Processor 520 may process digital signals and may include various computing structures. Such as a complex instruction set computer architecture, a structurally reduced instruction set computer architecture, or an architecture that implements a combination of instruction sets. In some examples, processor 520 may be a microprocessor.
Memory 510 may be used to store instructions that are executed by processor 520 or data related to the execution of the instructions. The instructions and/or data may include code for performing some or all of the functions of one or more of the modules described in embodiments of the application. The processor 520 of the disclosed embodiment may be used to execute the instructions in the memory 510 to implement the methods shown above. Memory 510 includes dynamic random access memory, static random access memory, flash memory, optical memory, or other memory known to those skilled in the art.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.

Claims (13)

1. A method for server cluster testing, comprising:
determining a part of servers in a server cluster for serving real-time online services;
collecting the test indexes of the partial servers;
and when the test index reaches a test termination condition, acquiring the service bearing capacity of the server cluster according to the flow of the real-time online service and the number of the partial servers.
2. The method of claim 1, wherein the determining a portion of servers in a server cluster to use to service real-time online services comprises:
and circularly executing the following operation, gradually reducing the number of the servers in the server cluster for serving the real-time online service, and collecting the test index of the servers for serving the real-time online service until the test index is determined to reach the termination test condition, and determining the servers finally used for serving the real-time online service as the partial servers.
3. The method of claim 2, wherein the collecting test metrics for a server serving the live online service comprises:
and collecting the test indexes of the servers of the real-time online service within a preset time interval.
4. The method according to any one of claims 1 to 3, wherein the obtaining the service carrying capacity of the server cluster according to the traffic of the real-time online service and the number of the partial servers when the test index reaches a termination test condition includes:
and when determining that the external condition meets the test environment and determining that the test index reaches the test termination condition, acquiring the service bearing capacity of the server cluster according to the flow of the real-time online service and the number of the partial servers.
5. The method of claim 4, wherein the method further comprises:
and when the external condition is determined not to meet the test environment, terminating the test process.
6. The method of claim 5, wherein the determining that the external condition does not satisfy the test environment comprises:
and when receiving the termination test operation of the user, or when receiving the server expansion capacity operation of the user, or when receiving the information release operation of the user, or when receiving the rollback operation of the user, confirming that the external condition does not meet the test environment.
7. The method of claim 2 or 3, wherein prior to determining the portion of servers in the server cluster to use to service the live online service, the method further comprises:
obtaining the termination test condition and test parameters in the server cluster, wherein the test parameters include: presetting the number of servers and a threshold value of the number of the servers;
wherein the number of the partial servers is greater than the server number threshold.
8. The method of claim 7, wherein said incrementally reducing the number of servers in the server cluster used to service the live online service comprises:
and gradually reducing the number of the preset servers in the server cluster for serving the real-time online service.
9. The method of claim 8, wherein the server of the preset number of servers services locally stored service traffic without participating in serving traffic of the real-time online service.
10. The method according to any one of claims 1 to 3, wherein the obtaining the service carrying capacity of the server cluster according to the traffic of the real-time online service and the number of the partial servers comprises:
solving the ratio of the flow of the real-time online service to the number of the partial servers to obtain the bearing capacity of a single server;
and solving the product of the bearing capacity of the single server and the number of the servers in the server cluster to obtain the bearing capacity of the service.
11. An apparatus for server cluster testing, comprising:
a determining module configured to determine a portion of servers in a server cluster for serving real-time online services;
the acquisition module is configured to acquire the test indexes of the part of servers;
and the obtaining module is configured to obtain the service carrying capacity of the server cluster according to the flow of the real-time online service and the number of the partial servers when the test index reaches a termination test condition.
12. A computer-readable storage medium, having stored thereon a computer program, wherein the computer program, when executed by a processor, performs the method of any one of claims 1-10.
13. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and run on the processor, wherein the computer program, when executed by the processor, performs the method of any one of claims 1-10.
CN202210977424.8A 2022-08-15 2022-08-15 Server cluster testing method and device, storage medium and electronic equipment Active CN115309597B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210977424.8A CN115309597B (en) 2022-08-15 2022-08-15 Server cluster testing method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210977424.8A CN115309597B (en) 2022-08-15 2022-08-15 Server cluster testing method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN115309597A true CN115309597A (en) 2022-11-08
CN115309597B CN115309597B (en) 2023-03-17

Family

ID=83862431

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210977424.8A Active CN115309597B (en) 2022-08-15 2022-08-15 Server cluster testing method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN115309597B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170060730A1 (en) * 2015-08-28 2017-03-02 International Business Machines Corporation Auto-generating representational state transfer (rest) services for quality assurance
CN109815146A (en) * 2019-01-18 2019-05-28 深圳壹账通智能科技有限公司 Flow allocation method, device, computer equipment and storage medium
CN111770002A (en) * 2020-06-12 2020-10-13 南京领行科技股份有限公司 Test data forwarding control method and device, readable storage medium and electronic equipment
US20210211367A1 (en) * 2020-01-06 2021-07-08 Zyxel Communications Corporation Network device, speed test method therefor and speed test system
CN114168439A (en) * 2021-11-03 2022-03-11 北京中交兴路信息科技有限公司 Pressure measurement control method and device for service in cluster, storage medium and terminal
CN114510322A (en) * 2022-02-16 2022-05-17 平安国际智慧城市科技股份有限公司 Pressure measurement control method and device of service cluster, computer equipment and medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170060730A1 (en) * 2015-08-28 2017-03-02 International Business Machines Corporation Auto-generating representational state transfer (rest) services for quality assurance
CN109815146A (en) * 2019-01-18 2019-05-28 深圳壹账通智能科技有限公司 Flow allocation method, device, computer equipment and storage medium
US20210211367A1 (en) * 2020-01-06 2021-07-08 Zyxel Communications Corporation Network device, speed test method therefor and speed test system
CN111770002A (en) * 2020-06-12 2020-10-13 南京领行科技股份有限公司 Test data forwarding control method and device, readable storage medium and electronic equipment
CN114168439A (en) * 2021-11-03 2022-03-11 北京中交兴路信息科技有限公司 Pressure measurement control method and device for service in cluster, storage medium and terminal
CN114510322A (en) * 2022-02-16 2022-05-17 平安国际智慧城市科技股份有限公司 Pressure measurement control method and device of service cluster, computer equipment and medium

Also Published As

Publication number Publication date
CN115309597B (en) 2023-03-17

Similar Documents

Publication Publication Date Title
CN106294120B (en) Method, apparatus and computer program product for testing code
CN112311617A (en) Configured data monitoring and alarming method and system
CN111966289A (en) Partition optimization method and system based on Kafka cluster
US20120174231A1 (en) Assessing System Performance Impact of Security Attacks
CN109240802B (en) Request processing method and device
CN115309597B (en) Server cluster testing method and device, storage medium and electronic equipment
CN111428197B (en) Data processing method, device and equipment
RU2532714C2 (en) Method of acquiring data when evaluating network resources and apparatus therefor
CN112202647A (en) Test method, device and test equipment in block chain network
CN108156054B (en) Method and device for testing performance of cloud desktop
CN114039878B (en) Network request processing method and device, electronic equipment and storage medium
CN111506422B (en) Event analysis method and system
CN111061621B (en) Method, device and equipment for verifying program performance and storage medium
CN109726086A (en) The method and apparatus of testing server performance
CN110069340B (en) Thread number evaluation method and device
CN111752786A (en) Data storage method, data summarization method, equipment and medium in pressure test process
CN111309475A (en) Detection task execution method and device
CN113742226B (en) Software performance test method and device, medium and electronic equipment
CN108805778A (en) Electronic device, the method and storage medium for acquiring collage-credit data
CN109614307B (en) Online pressure testing method and device of service system and server
CN115081233B (en) Flow simulation method and electronic equipment
CN116628508B (en) Model training process anomaly detection method, device, equipment and storage medium
CN109189664B (en) Information acquisition method and terminal for application program
CN114040435B (en) Evaluation method, device, storage medium and equipment for network coverage quality
CN113407411B (en) Device and method for monitoring accuracy of online data in live broadcast scene

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