CN111651170B - Instance dynamic adjustment method and device and related equipment - Google Patents

Instance dynamic adjustment method and device and related equipment Download PDF

Info

Publication number
CN111651170B
CN111651170B CN202010476899.XA CN202010476899A CN111651170B CN 111651170 B CN111651170 B CN 111651170B CN 202010476899 A CN202010476899 A CN 202010476899A CN 111651170 B CN111651170 B CN 111651170B
Authority
CN
China
Prior art keywords
target
data
index
performance data
average value
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.)
Active
Application number
CN202010476899.XA
Other languages
Chinese (zh)
Other versions
CN111651170A (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.)
Shenzhen Ping An Medical Health Technology Service Co Ltd
Original Assignee
Shenzhen Ping An Medical Health Technology Service 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 Shenzhen Ping An Medical Health Technology Service Co Ltd filed Critical Shenzhen Ping An Medical Health Technology Service Co Ltd
Priority to CN202010476899.XA priority Critical patent/CN111651170B/en
Publication of CN111651170A publication Critical patent/CN111651170A/en
Application granted granted Critical
Publication of CN111651170B publication Critical patent/CN111651170B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to a block chain technology, and provides an example dynamic adjustment method, which comprises the following steps: the method comprises the steps that a server side obtains performance data and access data of a target instance, wherein the performance data comprises hardware resource data of the target instance, and the access data comprises data of a target world wide web service deployed in the target instance; and the electronic equipment determines to adjust the number of the target instances and/or adjusts the hardware resources of the target instances according to the performance data, the access data determination and a preset adjustment method. Whether the instance running the web service is adjusted or not is determined through the acquired instance performance data and the access data, so that the efficiency of dynamic adjustment of the instance can be improved, and resources are saved.

Description

Instance dynamic adjustment method and device and related equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for instance dynamic adjustment, and a related device.
Background
Browser/Server (B/S) architecture is a distributed architecture, and web services based on the B/S architecture are rapidly developed, and the distributed architecture can support horizontal expansion, so that the web services can support larger throughput and concurrency. Current extensions to web services rely on manually adding instances and then running the web service on the added instances. When the traffic bursts are faced, a large number of staff members are often required to be arranged in advance to prepare for deploying new instances or increasing resources used by current instances, or a large number of instances are deployed before the traffic bursts arrive so as to deal with the traffic bursts. However, the above method is inefficient and wastes human resources or machine resources.
Disclosure of Invention
The embodiment of the application discloses a method, a device and related equipment for dynamically adjusting an instance, which can improve the efficiency and accuracy of dynamically adjusting the instance and save resources.
In a first aspect, the present application provides a method for dynamically adjusting an instance, including:
acquiring performance data and access data of a target instance, wherein the performance data comprises hardware resource data of the target instance, and the access data comprises data of a target world wide web service deployed in the target instance;
determining an average value of each index in the performance data and an average value of each index in the access data, wherein the indexes in the performance data comprise a CPU utilization rate, a memory utilization rate and a storage space utilization rate; indexes in the access data comprise the calling times of each interface of the target web service, the request return time and the times of calling the interface of each source Internet Protocol (IP);
and determining to adjust the number of the target instances and/or adjust the hardware resources of the target instances according to the average value of each index in the performance data, the average value of each index in the access data and the preset adjusting method.
In one possible implementation, before determining the average value of each index in the performance data and the average value of each index in the access data, the method further includes:
screening the performance data according to a first compliance threshold value to obtain target performance data;
screening the access data according to a second compliance threshold value to obtain target access data;
the determining, according to the average value of each index in the performance data, the average value of each index in the access data, and the preset adjustment method, to adjust the number of the target instances and/or adjust the hardware resources of the target instances specifically includes:
and determining to adjust the number of the target instances and/or adjust the hardware resources of the target instances according to the average value of each index in the target performance data, the average value of each index in the target access data and the preset adjusting method.
In a possible implementation manner, the screening the performance data according to the first compliance threshold to obtain target performance data includes:
and screening the data of each index in the performance data according to the data of each index in the performance data and the threshold corresponding to each index in the first compliance threshold to obtain the target performance data.
In a possible implementation manner, the screening the access data according to the second compliance threshold to obtain target access data includes:
and screening the data of each index in the performance data according to the data of each index in the access data and the threshold corresponding to each index in the second compliance threshold to obtain the target access data.
In a possible implementation manner, the determining, according to the average value of each index in the target performance data, the average value of each index in the target access data, and the preset adjusting method, to adjust the number of the target instances and/or adjust the hardware resources of the target instances includes:
and determining to expand the hardware resource corresponding to the target index under the condition that the average value of the data of the target index in the target performance data is greater than a corresponding preset threshold value and the average value corresponding to the data of each index in the target access data is less than or equal to the corresponding preset threshold value, wherein the target index comprises one or more indexes in the target performance data.
In a possible implementation manner, the determining, according to the average value of each index in the target performance data, the average value of each index in the target access data, and the preset adjustment method, to adjust the number of the target instances and/or adjust the hardware resources of the target instances includes:
and determining to increase the target instances when the average value of the data of any one or more indexes in the target performance data is larger than the corresponding preset threshold value and the average value of the data of any one or more indexes in the target access data is larger than the corresponding preset threshold value.
In one possible implementation, the method further includes:
acquiring performance data and access data of the instance at a preset period;
storing the performance data and the access data to a blockchain;
the obtaining performance data and access data of the target instance comprises:
and reading the performance data and the access data of the target instance in a preset time length from the block chain, wherein the preset time length is greater than or equal to the preset period.
In a second aspect, the present application provides an example dynamic adjustment apparatus, including:
an obtaining unit, configured to obtain performance data and access data of a target instance, where the performance data includes hardware resource data of the target instance, and the access data includes data of a target web service deployed in the target instance;
a processing unit to: determining an average value of each index in the performance data and an average value of each index in the access data, wherein the indexes in the performance data comprise a CPU (Central processing Unit) utilization rate, a memory utilization rate and a storage space utilization rate; indexes in the access data comprise the calling times of each interface of the target web service, the request return time and the times of calling the interface of each source Internet Protocol (IP);
and determining to adjust the number of the target instances and/or adjust the hardware resources of the target instances according to the average value of each index in the performance data, the average value of each index in the access data and the preset adjusting method.
In a third aspect, the present application provides an electronic device comprising a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing some or all of the steps of the method of the first aspect as described above.
In a fourth aspect, the present application provides a computer readable storage medium for storing a computer program for execution by a processor to perform some or all of the steps described in the method of the first aspect.
The electronic equipment determines whether the example deployed with the target web service is adjusted or not by acquiring the performance data and the access data of the example deployed with the target web service and combining a preset example adjusting method according to the performance data and the access data, and can inform a server running the example to adjust the example under the condition that the example needs to be adjusted, so that the manual adjustment of the example is avoided, the working efficiency can be improved, and meanwhile, the resource waste caused by the advance deployment of a large number of examples is avoided. Furthermore, the electronic equipment can determine whether to expand hardware resources for the existing instance or to increase the instances for deploying the target web service according to the performance data and the access data, so that the adjustment and control of the instance are more accurate, and the resource waste caused by simply increasing the instances is avoided.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of an example dynamic adjustment provided in an embodiment of the present application;
FIG. 2 is a schematic flow chart of another example dynamic adjustment provided by an embodiment of the present application;
fig. 3 is a schematic structural diagram of an example dynamic adjustment apparatus according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," "third," and "fourth," etc. in the description and claims of this application and in the accompanying drawings are used for distinguishing between different elements and not for describing a particular sequential order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
In the embodiments of the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone, wherein A and B can be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of the singular or plural items. For example, at least one (one) of a, b, or c, may represent: a. b, c, a-b, a-c, b-c or a-b-c, wherein a, b and c can be single or multiple.
Any embodiment or design described herein as "exemplary" or "such as" is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
The execution subject of the example dynamic adjustment method provided by the embodiment of the present application includes, but is not limited to, at least one of electronic devices, such as a server and a terminal, that can be configured to execute the method provided by the embodiment of the present application. In other words, the example dynamic adjustment method may be executed by software or hardware installed in the terminal device or the server device, and the software may be a block chain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A Blockchain (Blockchain), which is essentially a decentralized database, is a string of data blocks associated by using a cryptographic method, and each data block contains information of a batch of data, such as performance data and access data of an instance acquired in a period, for verifying the validity (anti-counterfeiting) of the information and generating a next block. The blockchain may include a blockchain underlying platform, a platform product services layer, and an application services layer.
The block chain underlying platform can comprise processing modules such as user management, basic service, intelligent contract and operation monitoring. The user management module is responsible for identity information management of all blockchain participants, and comprises the steps of maintaining public and private key generation (account management), key management, user real identity and blockchain address corresponding relation maintenance (authority management) and the like, and under the authorized condition, supervising and auditing the transaction condition of some real identities, and providing rule configuration (wind control audit) of risk control; the basic service module is deployed on all block chain node point devices and used for verifying the effectiveness of the service request, recording the effective request after consensus is completed on storage, for a new service request, the basic service firstly performs interface adaptation analysis and authentication processing (interface adaptation), then encrypts service information (consensus management) through a consensus algorithm, transmits the encrypted service information to a shared account (network communication) completely and consistently, and performs recording and storage; the intelligent contract module is responsible for registering and issuing contracts, triggering the contracts and executing the contracts, developers can define contract logics through a certain programming language, issue the contract logics to a block chain (contract registration), call keys or other event triggering and executing according to the logics of contract clauses, complete the contract logics and simultaneously provide the function of canceling contract upgrading logout; the operation monitoring module is mainly responsible for deployment, configuration modification, contract setting, cloud adaptation in the product release process and visual output of real-time states in product operation, such as: alarm, monitoring network conditions, monitoring node equipment health status, and the like.
The following describes embodiments of the present application in detail.
Fig. 1 is a schematic view of fig. 1, where fig. 1 is a schematic flowchart of an example dynamic adjustment provided in an embodiment of the present application, where the method includes:
s102, the server side obtains the performance data and the access data of the instance.
In the embodiment of the present application, the above example refers to a server, a virtual machine, or a container running a world wide web (web) service, the above web service is a stateless web service, and the stateless web service refers to that the processing of a single request by the web service is independent of other requests, that is, all information required by the web service to process a single request is included in the request, or can be obtained from a database, and is not required to be provided by other requests.
In the embodiment of the application, a server side obtains performance data and access data of one or more instances in a preset period, wherein the performance data of the instances indicates the use condition of hardware resources included in the instances, and the performance data of the instances comprises index data such as Central Processing Unit (CPU) use rate, memory use rate and storage space use rate; the access data of the example indicates the accessed condition of the web service running in the example, and the access data of the example comprises index data such as the calling times of each interface of the web service running in the example, the request return time, the quantity of source Internet Protocol (IP) calling the interface, the times of each interface called by each source IP and the like. The number of calls of each interface of the web service refers to the number of calls of each interface of the web service in the preset period. The request return duration refers to the time taken for the instance to receive the user request and return the response data.
It can be understood that, after acquiring the performance data and the access data of an instance each time, the server stores the performance data and the access data of the instance on the blockchain. It can be understood that, when storing the performance data and the access data of one instance onto the block chain, the performance data and the access data of one instance obtained at a time may be stored in one data block, or the performance data and the access data corresponding to one instance obtained at a time may be stored in different data blocks.
Optionally, the server may obtain the performance data by obtaining a monitoring log of an instance, and obtain the access data by inserting a byte code, which is not limited in this embodiment of the present disclosure.
It should be noted that the indexes in the performance data and the access data are only used as examples and are not to be understood as specific limitations, and the performance data and the access data may further include more indexes.
It should be noted that the server may be a single physical device, may also be an example in a server running the example, and may also be an independent module in a server running the target example, which is not specifically limited in the embodiment of the present application.
And S104, the server calculates the average value of the performance data and the index data in the access data in the preset duration of the target instance.
The preset duration is greater than or equal to the preset period, that is, after the server acquires the performance data and the access data each time, the average value of each index in the performance data and the access data is calculated while the performance data and the access data are stored in the blockchain, or the average value of each index in the performance data and the access data of the target instance is calculated after the performance data and the access data corresponding to multiple preset periods of the target instance are acquired from the blockchain. By storing the performance data and the access data of the instance into the block chain, the condition that the performance data and the access data are tampered to cause the calculation result not to be consistent with the actual operation state of the instance can be prevented, and the adjustment result of the instance is more accurate.
In the embodiment of the application, after the server acquires the performance data and the access data of the target instance in a preset period, the server stores the data of each index acquired at each acquisition time point. And then, after the preset time length is obtained from the last time of calculating the average value of each index data, the server side calculates the average value of each index data in the performance data and the access data of the target instance in the preset time length again.
For example, the preset period is 6 minutes, the preset duration is 8 hours, when the server calculates each item of data, each item of index data includes 80 values, and the server calculates an arithmetic average value of the 80 values of each item of index data as a value of each item of index data within 8 hours before the current time.
The average value may be an arithmetic average value or a geometric average value, and the present embodiment is not particularly limited.
And S106, the server side determines to adjust the target example according to the average value of each index data of the target example and a preset adjusting method.
In the embodiment of the present application, adjusting the target instance includes adjusting hardware resources of the target instance and/or adjusting the number of the target instance. And adjusting the hardware resources of the target instance comprises one or more of increasing or decreasing the CPU resources of the target instance, increasing or decreasing the memory resources of the target instance, and increasing or decreasing the storage space of the target instance. Adjusting the number of target instances includes increasing or decreasing servers, virtual machines, or containers that deploy the target web services, and if a new target instance is added and/or hardware resources of the target instance are added, dynamic expansion of the web services to face bursty traffic may be implemented.
The preset adjusting method comprises the preset threshold value, the adjusting condition and the adjusting parameter of each index in the performance data and the access data. If the server determines to add the target instance, the adjustment parameters include a name of the added target instance, an allocated CPU resource of the added target instance, a memory size of the added target instance, a code warehouse of the web service executed on the added target instance, a start script, and the like. If the server determines to adjust the hardware resources of the existing target instance, the adjustment parameters include the size of the CPU that needs to be increased or decreased, the size of the memory that needs to be increased or decreased, or the size of the storage space that needs to be increased or decreased.
Specifically, after calculating the average value of each index data, the server compares the average value of each index data with a preset threshold value of corresponding index data, and determines whether to adjust the target instance according to the comparison result. In a possible embodiment, taking an example as a virtual machine as an example, the adjusting method includes:
(1) When the average value of any index of the CPU utilization rate, the memory utilization rate or the storage space utilization rate of the CPU distributed by the virtual machine is larger than the corresponding preset threshold value, and the calling times, the request returning time length and the times of calling each interface by each source IP in the target web service are all smaller than or equal to the corresponding preset threshold value, the server determines to expand the index of which the average value is larger than the preset threshold value. For example, when the average value of the CPU utilization rates of the virtual machines is greater than the corresponding preset threshold, the server determines to increase the number of CPU cores allocated to the virtual machine.
(2) When the average value of any two or more indexes of the CPU utilization rate, the memory utilization rate or the storage space utilization rate of the CPU distributed by the virtual machine is larger than the corresponding preset threshold value, the server determines to increase the virtual machine instances. Or when the average value of any one or more indexes of the calling times of each interface, the request returning time length and the times of calling each interface by each source IP in the target web service is larger than the corresponding preset threshold value, the server side determines to increase the virtual machine instances.
(3) When the average value of any one or more indexes of the CPU utilization rate, the memory utilization rate or the storage space utilization rate of the CPU distributed by the virtual machine is larger than the corresponding preset threshold value, and the average value of any one or more indexes of the calling times of each interface, the request returning time length and the times of calling each interface by each source IP in the target web service is larger than the corresponding preset threshold value, the server determines to increase the virtual machine instances.
(4) When the average value of each index in the CPU utilization rate, the memory utilization rate or the storage space utilization rate of the CPU distributed by the virtual machine is smaller than the corresponding preset threshold value, and the average value of each index in the calling times of each interface, the request returning time length and the times of calling each interface by each source IP in the target web service is smaller than the corresponding preset threshold value, the server determines to reduce the number of target instances, wherein the number of the target instances reduced each time is one, and at least two target instances are ensured to keep running.
It should be noted that the preset adjustment method is only used as an example, and is not understood as a specific limitation, and the user may add, delete, or modify the adjustment method in the server according to the need.
And S108, the server side calls the capacity expansion interface of the server side to adjust the target instance according to the adjusting method.
After determining that the target instance needs to be adjusted and a specific adjustment method according to the method in S103, the server calls a capacity expansion interface of the server to execute the adjustment method. Specifically, if the adjustment method is to increase the hardware resources of the existing target instance, the server adjusts the hardware resources of the target instance according to the corresponding adjustment parameters; if the adjusting method is adding the instance, the server adds the target instance in the server according to the corresponding adjusting parameter, and deploys the target web service to the newly added target instance.
The server side obtains performance data and access data of the example with the target web service, determines whether the example with the target web service is adjusted or not according to the performance data and the access data and by combining a preset example adjusting method, and can inform a server running the example to adjust the example under the condition that the example needs to be adjusted, so that manual adjustment of the example is avoided, the working efficiency can be improved, and resource waste caused by the fact that a large number of examples are deployed in advance is avoided. Furthermore, the server side can determine whether to expand hardware resources for the existing instance or to increase the instances for deploying the target web service according to the performance data and the access data, so that the adjustment and control of the instances are more accurate, and the resource waste caused by simply increasing the instances is avoided.
In a possible embodiment, as shown in fig. 2, before the step S104, the method may further include:
s103, the server side screens the access data and the performance data according to a preset compliance threshold value to obtain target access data and target performance data.
In the embodiment of the application, the server is further configured with a compliance threshold, where the compliance threshold includes compliance thresholds of various indexes in the access data and the performance data, and the compliance threshold is used to determine abnormal access data and abnormal performance data. The server determines target access data in the access data through a compliance threshold and the acquired access data, determines target performance data in the performance data through the compliance threshold and the acquired performance data, for example, when the compliance threshold specifies that the number of times of calling each interface of a target web service by an IP address in a preset period is greater than a first threshold, determines the number of times of calling the interface by the IP address in the preset period and the request return duration corresponding to the IP address to be invalid values, removes the invalid values before the server calculates the average value, and then calculates the average value. And when the duration of a numerical value in a certain range corresponding to any index in the acquired performance data is smaller than a second threshold value, taking the numerical value in the range as an abnormal value, and deleting the abnormal value from the performance data. For example, the server acquires the performance data by acquiring the monitoring log of the instance, if the CPU occupancy rate corresponding to each minute in the monitoring log includes 250 values, that is, the CPU occupancy rate is acquired and recorded once every 5 milliseconds, and if the CPU occupancy rate of the instance at a certain time is increased from 60% to more than 80%, and the values of the CPU occupancy rate continuously over 80% are less than 4, that is, the time of the CPU occupancy rate over 80% lasts less than 20 milliseconds, the values of the CPU occupancy rate over 80% less than 4 are deleted as abnormal values.
And after the server filters the access data according to the preset compliance indexes to obtain target access data, the step S104 is that the server calculates the average value of the performance data in the preset duration and each index data in the target access data.
Abnormal access data in the access data of the target instance are filtered through the compliance indexes, and instance adjustment caused by malicious attack can be avoided, so that resource waste is prevented.
The following describes related apparatuses and devices for implementing dynamic adjustment of an embodiment provided in the present application with reference to fig. 3 to fig. 4. Referring to fig. 3, fig. 3 is a schematic diagram of an example dynamic adjustment apparatus 300 according to an embodiment of the present application, where the example dynamic adjustment apparatus 300 includes an obtaining unit 310 and a processing unit 320, where,
an obtaining unit 310, configured to obtain performance data of a target instance and access data, where the performance data includes hardware resource data of the target instance, and the access data includes data of a target web service deployed in the target instance. The performance data comprises a processor CPU utilization rate, a memory utilization rate and a storage space utilization rate; the access data comprises the calling times of each interface of the target web service, the request return duration and the times of calling the interface of each source Internet Protocol (IP).
A processing unit 320, configured to determine to adjust the number of the target instances and/or adjust hardware resources of the target instances according to the performance data, the access data determination, and a preset adjustment method.
In a possible implementation manner, when the processing unit 320 determines to adjust the hardware resource of the target instance and/or add a new instance according to the performance data, the access data determination and a preset adjustment method, the processing unit 320 calculates an average value of each index in the performance data and an average value of each index in the access data; and determining to adjust the number of the target instances and/or adjust the hardware resources of the target instances according to the average value of each index in the performance data, the average value of each index in the access data and the preset adjustment method, wherein the preset adjustment method comprises a threshold value corresponding to each index in the performance data and a threshold value corresponding to each index in the access data. The method for adjusting the target instance by the processing unit 320 according to the preset adjustment method may refer to the specific description in S106 in the above method embodiment, and is not described herein again.
In a possible implementation manner, before the processing unit 320 determines to adjust the number of the target instances and/or adjust the hardware resources of the target instances according to the performance data, the access data determination and a preset adjustment method, the processing unit 320 is further configured to filter the access data according to a preset compliance index to obtain target access data; and then determining and adjusting the number of the target instances and/or adjusting the hardware resources of the target instances according to the performance data, the target access data determination and a preset adjusting method. And the compliance indexes comprise compliance threshold values corresponding to each index in the access data. The specific card of the method for the processing unit to filter the access data according to the compliance index refers to the description in S103, and is not described herein again.
Optionally, the above example dynamic adjustment apparatus 300 further includes a sending unit 330, configured to send, when it is determined that the example needs to be adjusted, indication information to the control device to indicate the control device to add the example, for example, if the target example is a virtual machine and the control device is a server running the target example, the indication information indicates the server to add a new target example.
Specifically, the method for implementing data transmission by the dynamic adjustment apparatus 300 in the above embodiment may refer to the operations implemented by the server in S102 to S108 in the above embodiment of the method, and will not be described herein again.
It is understood that, in order to implement the above functions, the above example dynamic adjustment apparatus includes a hardware structure and/or a software module for performing each function. Those of skill in the art would readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed in hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, functional units may be divided according to method examples, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure, where the electronic device 400 may be a stand-alone computing device or a computing module in a server. The electronic device 400 includes a processor 410, a communication interface 420, and a memory 430. The processor 410, the communication interface 420, and the memory 430 are interconnected by a bus 440, wherein,
the processor 410 is configured to implement the operations executed by the processing unit 320, and specific implementation of the processor 410 to execute various operations may refer to specific operations executed by a server as an execution subject in the foregoing method embodiment. For example, the processor 410 is configured to execute the operations of the network card in S102 and S106, which are not described herein again.
The processor 410 may be implemented in various ways, for example, the processor 410 may be a Central Processing Unit (CPU), and the processor 410 may be a combination of a CPU and a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof. The processor 410 may also be implemented as a single logic device with built-in processing logic, such as an FPGA or a Digital Signal Processor (DSP).
Communication interface 420 may be used to communicate with other modules or devices, and may be an ethernet interface, a Local Interconnect Network (LIN), or the like.
In this embodiment, the communication interface 420 performs operations implemented by the obtaining unit 310 and the sending unit 330, which are not described herein again.
The memory 430 may be a non-volatile memory, such as a read-only memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash memory. The memory 430 may also be volatile memory, which may be Random Access Memory (RAM), which acts as external cache memory.
Memory 430 may also be used to store instructions and data that facilitate processor 410 to invoke the instructions stored in memory 430 to implement the operations described above as being performed by processing unit 320. In addition, data transfer device 400 may contain more or fewer components than shown in FIG. 4, or have a different configuration of components.
The bus 440 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus 440 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 4, but that does not indicate only one bus or one type of bus.
Specifically, the specific implementation of the electronic device 400 to perform various operations may refer to the specific operations performed in the foregoing method embodiments, and details are not described herein again.
The embodiments of the present application further provide a non-transitory computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are run on a processor, the method steps executed by the server side of the method may be implemented, and specific implementation of the processor of the computer-readable storage medium in executing the method steps may refer to specific operations of the server side in the above method embodiments, which are not described herein again.
Those of ordinary skill in the art will appreciate that the elements and steps of the various examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the various examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the several embodiments provided in the present application, it should be understood that the above-described embodiments of the apparatus are merely illustrative, for example, the division of the units is only one logical function division, and there may be other division manners in actual implementation, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electric, mechanical or other form of connection.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk or an optical disk, and various media capable of storing program codes.
While the invention has been described with reference to specific embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (8)

1. An example dynamic adjustment method, comprising:
acquiring performance data and access data of a target instance, wherein the performance data comprises hardware resource data of the target instance, and the access data comprises data of a target world wide web service deployed in the target instance;
determining an average value of each index in the performance data and an average value of each index in the access data, wherein the indexes in the performance data comprise a CPU utilization rate, a memory utilization rate and a storage space utilization rate; indexes in the access data comprise the calling times of each interface of the target web service, the request return time and the times of calling the interface of each source Internet Protocol (IP);
determining to adjust the number of the target instances and/or adjust hardware resources of the target instances according to the average value of each index in the performance data, the average value of each index in the access data and a preset adjusting method;
wherein, the determining to adjust the number of the target instances and/or adjust the hardware resources of the target instances according to the average value of each index in the target performance data, the average value of each index in the target access data, and the preset adjustment method includes:
determining to expand the hardware resource corresponding to the target index under the condition that the average value of data of the target index in the target performance data is larger than a corresponding preset threshold value and the average value corresponding to the data of each index in the target access data is smaller than or equal to the corresponding preset threshold value, wherein the target index comprises one or more indexes in the target performance data;
and determining to increase the target instances when the average value of the data of any one or more indexes in the target performance data is larger than the corresponding preset threshold value and the average value of the data of any one or more indexes in the target access data is larger than the corresponding preset threshold value.
2. The method of claim 1, wherein prior to determining the average value for each metric in the performance data and the average value for each metric in the access data, the method further comprises:
screening the performance data according to a first compliance threshold value to obtain target performance data;
screening the access data according to a second compliance threshold value to obtain target access data;
the determining, according to the average value of each index in the performance data, the average value of each index in the access data, and the preset adjustment method, to adjust the number of the target instances and/or adjust the hardware resources of the target instances specifically includes:
and determining to adjust the number of the target instances and/or adjust the hardware resources of the target instances according to the average value of each index in the target performance data, the average value of each index in the target access data and the preset adjusting method.
3. The method of claim 2, wherein the screening the performance data according to a first compliance threshold to obtain target performance data comprises:
and screening the data of each index in the performance data according to the data of each index in the performance data and the threshold corresponding to each index in the first compliance threshold to obtain the target performance data.
4. The method of claim 2 or 3, wherein the filtering the access data according to the second compliance threshold to obtain target access data comprises:
and screening the data of each index in the performance data according to the data of each index in the access data and the threshold corresponding to each index in the second compliance threshold to obtain the target access data.
5. The method of claim 1, further comprising:
acquiring performance data and access data of the instance at a preset period;
storing the performance data and the access data to a blockchain;
the obtaining performance data and access data of the target instance comprises:
and reading the performance data and the access data of the target instance in a preset time length from the block chain, wherein the preset time length is greater than or equal to the preset period.
6. An example dynamic adjustment apparatus, comprising:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring performance data and access data of a target instance, the performance data comprises hardware resource data of the target instance, and the access data comprises data of a target world wide web service deployed in the target instance;
a processing unit to: determining an average value of each index in the performance data and an average value of each index in the access data, wherein the indexes in the performance data comprise a CPU (Central processing Unit) utilization rate, a memory utilization rate and a storage space utilization rate; indexes in the access data comprise the calling times of each interface of the target web service, the request return time and the times of calling the interface of each source Internet Protocol (IP);
determining to adjust the number of the target instances and/or adjust hardware resources of the target instances according to the average value of each index in the performance data, the average value of each index in the access data and a preset adjusting method;
wherein, the processing unit determines to adjust the number of the target instances and/or adjust the hardware resources of the target instances according to the average value of each index in the target performance data, the average value of each index in the target access data, and the preset adjustment method, and is specifically configured to:
determining to expand the hardware resource corresponding to the target index under the condition that the average value of data of the target index in the target performance data is larger than a corresponding preset threshold value and the average value corresponding to the data of each index in the target access data is smaller than or equal to the corresponding preset threshold value, wherein the target index comprises one or more indexes in the target performance data;
and determining to increase the target instances when the average value of any one or more indexes in the target performance data is larger than the corresponding preset threshold value and the average value of any one or more indexes in the target access data is larger than the corresponding preset threshold value.
7. An electronic device comprising a processor, memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs including instructions for performing some or all of the steps of the method of any of claims 1-5.
8. A computer-readable storage medium for storing a computer program for execution by a processor to perform the method of any one of claims 1-5.
CN202010476899.XA 2020-05-29 2020-05-29 Instance dynamic adjustment method and device and related equipment Active CN111651170B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010476899.XA CN111651170B (en) 2020-05-29 2020-05-29 Instance dynamic adjustment method and device and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010476899.XA CN111651170B (en) 2020-05-29 2020-05-29 Instance dynamic adjustment method and device and related equipment

Publications (2)

Publication Number Publication Date
CN111651170A CN111651170A (en) 2020-09-11
CN111651170B true CN111651170B (en) 2022-11-08

Family

ID=72349775

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010476899.XA Active CN111651170B (en) 2020-05-29 2020-05-29 Instance dynamic adjustment method and device and related equipment

Country Status (1)

Country Link
CN (1) CN111651170B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112527384B (en) * 2020-12-15 2023-06-16 青岛海尔科技有限公司 Method and device for configuring resource allocation parameters, storage medium and electronic device
CN112527464A (en) * 2020-12-18 2021-03-19 上海万向区块链股份公司 System and method for automatically expanding memory of virtual machine based on block chain
CN114844843B (en) * 2022-03-24 2024-06-25 清华大学 Method and device for adjusting number of application instances

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106293868A (en) * 2015-05-15 2017-01-04 苏宁云商集团股份有限公司 In a kind of cloud computing environment, virtual machine expands capacity reduction method and scalable appearance system

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7603719B2 (en) * 2005-01-28 2009-10-13 TVWorks, LLC. Resource access control
CN102214117B (en) * 2010-04-07 2014-06-18 中兴通讯股份有限公司南京分公司 Virtual machine management method, system and server
US8825550B2 (en) * 2012-08-23 2014-09-02 Amazon Technologies, Inc. Scaling a virtual machine instance
CN103810020B (en) * 2014-02-14 2017-08-29 华为技术有限公司 Virtual machine elastic telescopic method and device
US9703951B2 (en) * 2014-09-30 2017-07-11 Amazon Technologies, Inc. Allocation of shared system resources
WO2017147331A1 (en) * 2016-02-24 2017-08-31 Alibaba Group Holding Limited User behavior-based dynamic resource adjustment
CN108090225B (en) * 2018-01-05 2023-06-30 腾讯科技(深圳)有限公司 Database instance running method, device and system and computer readable storage medium
CN109067862B (en) * 2018-07-23 2020-10-16 北京邮电大学 Method and device for automatic extension and retraction of API Gateway
CN110795203B (en) * 2018-08-03 2023-05-02 阿里巴巴集团控股有限公司 Resource scheduling method, device, system and computing equipment
CN110113224B (en) * 2019-03-19 2022-08-09 深圳壹账通智能科技有限公司 Capacity monitoring method and device, computer equipment and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106293868A (en) * 2015-05-15 2017-01-04 苏宁云商集团股份有限公司 In a kind of cloud computing environment, virtual machine expands capacity reduction method and scalable appearance system

Also Published As

Publication number Publication date
CN111651170A (en) 2020-09-11

Similar Documents

Publication Publication Date Title
CN111651170B (en) Instance dynamic adjustment method and device and related equipment
CN108847989B (en) Log processing method based on micro-service architecture, service system and electronic equipment
CN106878064B (en) Data monitoring method and device
CN112650762B (en) Data quality monitoring method and device, electronic equipment and storage medium
CN111444211B (en) Block chain consensus node checking method, device, equipment and storage medium
CN111427957A (en) Block chain voting information verification method, device, equipment and storage medium
CN110598410B (en) Malicious process determination method and device, electronic device and storage medium
JP5278309B2 (en) Audit program, audit system, and audit method
CN110009347B (en) Block chain transaction information auditing method and device
CN111382334B (en) Data processing method and device, computer and readable storage medium
CN111343212B (en) Message processing method, device, equipment and storage medium
CN109992473A (en) Monitoring method, device, equipment and the storage medium of application system
CN110866265A (en) Data storage method, device and storage medium based on block chain
CN109902103A (en) Service data management method, device, equipment and computer readable storage medium
CN109710440A (en) Abnormality eliminating method, device, storage medium and the terminal device of webpage front-end
CN113505260A (en) Face recognition method and device, computer readable medium and electronic equipment
CN111984295A (en) Block chain software whole-network updating method, storage medium and electronic equipment
CN112699136B (en) Cross-link certificate storage method and related device
CN110570197B (en) Data processing method and device based on block chain
CN115952398B (en) Traditional calculation method, system and storage medium based on data of Internet of things
CN115314227B (en) Charging pile access authentication method, system and equipment
CN116431344A (en) Configuration method and device of financial service resource degradation strategy and electronic equipment
CN111277626A (en) Server upgrading method and device, electronic equipment and medium
CN106912066B (en) A kind of calculation method and device of KPI Key Performance Indicator
CN112989406A (en) Information processing 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
TA01 Transfer of patent application right

Effective date of registration: 20220606

Address after: 518000 China Aviation Center 2901, No. 1018, Huafu Road, Huahang community, Huaqiang North Street, Futian District, Shenzhen, Guangdong Province

Applicant after: Shenzhen Ping An medical and Health Technology Service Co.,Ltd.

Address before: Room 12G, Area H, 666 Beijing East Road, Huangpu District, Shanghai 200001

Applicant before: PING AN MEDICAL AND HEALTHCARE MANAGEMENT Co.,Ltd.

GR01 Patent grant
GR01 Patent grant