CN116483570A - Dynamic capacity expansion and contraction method, device and equipment for stateful service and storage medium - Google Patents

Dynamic capacity expansion and contraction method, device and equipment for stateful service and storage medium Download PDF

Info

Publication number
CN116483570A
CN116483570A CN202310468162.7A CN202310468162A CN116483570A CN 116483570 A CN116483570 A CN 116483570A CN 202310468162 A CN202310468162 A CN 202310468162A CN 116483570 A CN116483570 A CN 116483570A
Authority
CN
China
Prior art keywords
service
capacity
stateful
servers
threshold
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310468162.7A
Other languages
Chinese (zh)
Inventor
魏新宇
胡炼壮
张浩晨
叶家俊
陈鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shang Yu Software Shenzhen Co ltd
Original Assignee
Shang Yu Software Shenzhen 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 Shang Yu Software Shenzhen Co ltd filed Critical Shang Yu Software Shenzhen Co ltd
Priority to CN202310468162.7A priority Critical patent/CN116483570A/en
Publication of CN116483570A publication Critical patent/CN116483570A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing
    • 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention belongs to the technical field of back-end service, and discloses a dynamic capacity expansion and contraction method, device and equipment for stateful service and a storage medium. The method comprises the following steps: according to the load state data of the back-end server corresponding to the stateful service and a preset state threshold, determining the number of busy servers and the number of idle servers corresponding to each stateful service; determining the expansion and contraction capacity threshold value corresponding to each stateful service according to the routing state information of the backend server corresponding to each stateful service and the preset expansion and contraction capacity condition; determining capacity-shrinking stateful services and capacity-expanding stateful services according to the number of busy servers, the number of idle servers and capacity-expanding threshold values corresponding to the stateful services; and carrying out capacity reduction processing on the back-end server corresponding to the capacity reduction state service, and carrying out capacity expansion processing on the back-end server corresponding to the capacity expansion state service. By the method, the expansion and contraction capacity does not need to be stopped, dynamic expansion or contraction capacity can be performed in time according to the use condition, and user experience is guaranteed.

Description

Dynamic capacity expansion and contraction method, device and equipment for stateful service and storage medium
Technical Field
The present invention relates to the field of backend services, and in particular, to a method, an apparatus, a device, and a storage medium for dynamic capacity expansion and contraction of a stateful service.
Background
Today, where networks are rapidly evolving, a wide variety of network applications are layered, which require network requests with backend services to perform various functions. The amount of requests for some hot applications is substantial and multiple identical backend services must be deployed to carry user requests together. These backend service resources are naturally quite expensive, and how to scale these resources back out with as little impact as possible to the user becomes a challenge.
Along with the development of containerization and cloud computing, k8s (kubernetes) provides a set of brand-new distributed architecture leading scheme based on container technology, and the development in the whole container technology field is a major breakthrough and innovation, and the deployment of stateful services is mainly divided into stateless services and stateful services.
For elastic expansion of stateless services (i.e. requests can be processed at any one back end), basically, only the container ready check of k8s and the container life cycle interface are accessed, and the technical difficulty is small. The elastic expansion of the stateful service is not easy, and because of the characteristic that the logic of the request distribution to the back end is strongly related to the service (for example, the request in a short period of one user must be processed by the same back end), how to process the user request when the user request is contracted is a difficult point, and the common scheme is to stop the expansion and contraction of the user, but the user experience is very affected, the user cannot be dynamically expanded and contracted in time according to the use condition, and the cost is high.
The description is only intended to aid in understanding the technical solutions of the invention and is not intended to represent an admission that the description is prior art.
Disclosure of Invention
The invention mainly aims to provide a dynamic capacity expansion and contraction method, device, equipment and storage medium for stateful services, and aims to solve the technical problem that a traditional scheme aiming at stateful service capacity expansion and contraction in the prior art is difficult to dynamically expand and contract in time according to the use condition, and user experience is affected.
In order to achieve the purpose, the invention provides a dynamic capacity expansion and contraction method of a stateful service, which comprises the following steps:
acquiring state information of a back-end server corresponding to a stateful service, wherein the state information comprises routing state information and load state data;
determining the number of busy servers and the number of idle servers corresponding to each stateful service according to the load state data of the backend server corresponding to the stateful service and a preset state threshold;
determining a capacity expansion threshold corresponding to each stateful service according to the routing state information of the backend server corresponding to each stateful service and a preset capacity expansion condition;
determining capacity-shrinking stateful services and capacity-expanding stateful services according to the number of busy servers, the number of idle servers and capacity-expanding threshold values corresponding to the stateful services;
And carrying out capacity reduction processing on the back-end server corresponding to the capacity reduction state service, and carrying out capacity expansion processing on the back-end server corresponding to the capacity expansion state service.
Optionally, the preset state threshold includes a low load threshold and a high load threshold, and determining, according to the load state data of the backend server corresponding to the stateful service and the preset state threshold, the number of busy servers and the number of idle servers corresponding to the stateful service includes:
determining the busy servers and the number of the busy servers corresponding to the stateful services according to the load state data of the back-end servers corresponding to the stateful services and the high load number threshold, wherein the load state data of the busy servers is larger than the high load number threshold;
and determining the idle servers and the number of the idle servers corresponding to the stateful services according to the load state data of the back-end servers corresponding to the stateful services and the low load number threshold, wherein the load state data of the idle servers is smaller than the low load number threshold.
Optionally, the capacity expansion threshold includes a service capacity expansion threshold and a service capacity expansion threshold, and determining capacity expansion status service and capacity expansion status service according to the number of busy servers, the number of idle servers and the capacity expansion threshold corresponding to each status service includes:
Determining capacity-expansion stateful services in the stateful services according to the number of busy servers corresponding to the stateful services and a service capacity-expansion threshold, wherein the number of the busy servers corresponding to the capacity-expansion stateful services is larger than or equal to the service capacity-expansion threshold;
and determining the capacity-shrinking stateful service in the stateful service according to the number of idle servers corresponding to the stateful service and the service capacity-shrinking threshold, wherein the number of idle servers corresponding to the capacity-shrinking stateful service is larger than or equal to the service capacity-shrinking threshold.
Optionally, the performing capacity expansion processing on the backend server corresponding to the capacity expansion stateful service includes:
according to a preset capacity expansion strategy, determining capacity expansion servers corresponding to the capacity expansion state services in unused servers, and respectively adding the capacity expansion servers to back-end servers corresponding to the capacity expansion state services;
starting the capacity expansion server and adjusting the route state information of the capacity expansion server to be in a ready state;
the performing the capacity reduction processing on the backend server corresponding to the capacity reduction state service includes:
determining a capacity-shrinking server in the back-end servers corresponding to the capacity-shrinking state services according to a preset capacity-shrinking strategy;
The routing state information of the capacity reduction server is adjusted to be in a closed state;
and after the user data and the connection information of the volume reduction server are cleared, the routing state information of the volume reduction server is adjusted to be in a closed state, and the volume reduction server is closed.
Optionally, the dynamic capacity expansion and contraction method of the stateful service further includes:
when a service request sent by a client is received, acquiring a target service of the client;
when the connection information of the target service is acquired, determining a target back-end server according to the connection information, and determining whether the target back-end server has capacity reduction possibility according to the state information of the target back-end server;
and when the target back-end server has the capacity reduction possibility, the target back-end server is redetermined through a retry strategy, and the service request is forwarded to the target back-end server.
Optionally, the connection information includes user identification information, back-end service name information, and back-end service index information, and when receiving a service request sent by a client, after obtaining a target service of the client, the connection information further includes:
When the connection information of the target service cannot be acquired, acquiring the state information of a back-end server corresponding to the target service;
determining available back-end servers and the number of the available back-end servers according to the state information of the back-end servers corresponding to the target service;
and when the number of the available back-end servers is larger than a preset number threshold, determining a target back-end server in the available back-end servers through polling, and forwarding the service request to the target back-end server.
Optionally, the re-determining the target backend server through a retry strategy includes:
acquiring retry times, waiting for a preset time period when the retry times are smaller than a preset retry threshold, and determining whether the connection information of the target service is acquired or not again;
and when the connection information of the target service cannot be acquired, returning to execute the step of acquiring the state information of the back-end server corresponding to the target service.
In addition, in order to achieve the purpose, the invention also provides a dynamic capacity expansion device of the stateful service, which comprises:
The system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring state information of a back-end server corresponding to a stateful service, and the state information comprises routing state information and load state data;
the acquisition module is further used for determining the number of busy servers and the number of idle servers corresponding to each stateful service according to the load state data of the backend server corresponding to the stateful service and a preset state threshold;
the acquisition module is further configured to determine a capacity expansion threshold value corresponding to each stateful service according to the routing state information of the backend server corresponding to each stateful service and a preset capacity expansion condition;
the expansion and contraction module is used for determining capacity-contracted state services and capacity-expanded state services according to the number of busy servers, the number of idle servers and the capacity-expanded threshold value corresponding to each stateful service;
the expansion and contraction module is further configured to perform capacity expansion processing on the backend server corresponding to the capacity expansion state service, and perform capacity expansion processing on the backend server corresponding to the capacity expansion state service.
In addition, to achieve the purpose, the invention also provides a dynamic capacity expansion device with a state service, which comprises: a memory, a processor, and a dynamic scaling procedure for a stateful service stored on the memory and executable on the processor, the dynamic scaling procedure for a stateful service being configured to implement the steps of the dynamic scaling method for a stateful service as described above.
In addition, to achieve the above object, the present invention further proposes a storage medium having stored thereon a dynamic capacity expansion program of a stateful service, which when executed by a processor, implements the steps of the dynamic capacity expansion method of a stateful service as described above.
According to the invention, the number of busy servers and the number of idle servers corresponding to each stateful service are determined according to the load state data and the preset state threshold value of the back-end server corresponding to each stateful service, the capacity expansion threshold value corresponding to each stateful service is determined according to the route state information and the preset capacity expansion condition of the back-end server corresponding to each stateful service, the capacity reduction stateful service and the capacity expansion stateful service are determined according to the number of busy servers, the number of idle servers and the capacity expansion threshold value corresponding to each stateful service, the capacity reduction processing is carried out on the back-end server corresponding to the capacity reduction stateful service, and the capacity expansion processing is carried out on the back-end server corresponding to the capacity expansion stateful service. Aiming at stateful service, the traditional capacity expansion and contraction scheme is to stop service capacity expansion and contraction, has poor flexibility and influences user experience, the capacity expansion and contraction method does not need to stop service maintenance, can dynamically expand or contract capacity in time according to the use condition, ensures the user experience without perception, and can automatically perform capacity expansion and contraction, the automatic capacity expansion can ensure the service quality, and the automatic capacity contraction can effectively reduce the cost.
Drawings
FIG. 1 is a schematic diagram of a dynamic capacity expansion device for stateful services of a hardware runtime environment, in accordance with an embodiment of the present invention;
FIG. 2 is a flow chart of a dynamic capacity expansion and contraction method for stateful services according to a first embodiment of the present invention;
FIG. 3 is a schematic diagram of the overall structure of an embodiment of a dynamic capacity expansion method for stateful services according to the present invention;
FIG. 4 is a schematic diagram of an embodiment of a dynamic capacity expansion method for stateful services according to the present invention;
FIG. 5 is a schematic diagram illustrating an embodiment of a dynamic capacity expansion method for stateful services according to the present invention;
FIG. 6 is a schematic diagram of a capacity reduction process according to an embodiment of a dynamic capacity reduction method for stateful services of the present invention;
FIG. 7 is a schematic diagram illustrating a dynamic capacity expansion and contraction method for stateful services according to an embodiment of the present invention;
FIG. 8 is a flow chart of a second embodiment of a dynamic capacity expansion method for stateful services according to the present invention;
FIG. 9 is a schematic routing flow chart of an embodiment of a dynamic capacity expansion method for stateful services according to the present invention;
fig. 10 is a block diagram of a dynamic capacity expansion device with status service according to a first embodiment of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a dynamic capacity expansion device of a stateful service of a hardware running environment according to an embodiment of the present invention.
As shown in fig. 1, the dynamic scaling device of the stateful service may include: a processor 1001, such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a Wireless interface (e.g., a Wireless-Fidelity (Wi-Fi) interface). The Memory 1005 may be a high-speed random access Memory (Random Access Memory, RAM) Memory or a stable nonvolatile Memory (NVM), such as a disk Memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
Those skilled in the art will appreciate that the architecture shown in fig. 1 does not constitute a limitation of dynamic capacity expansion devices for stateful services, and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
As shown in fig. 1, an operating system, a network communication module, a user interface module, and a dynamic expansion and contraction program of a stateful service may be included in the memory 1005 as one storage medium.
In the dynamic scaling device with state service shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the dynamic capacity expansion device with the state service can be arranged in the dynamic capacity expansion device with the state service, and the dynamic capacity expansion device with the state service calls the dynamic capacity expansion program with the state service stored in the memory 1005 through the processor 1001 and executes the dynamic capacity expansion method with the state service provided by the embodiment of the invention.
An embodiment of the present invention provides a dynamic capacity expansion and contraction method for a stateful service, and referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of a dynamic capacity expansion and contraction method for a stateful service according to the present invention.
In this embodiment, the dynamic capacity expansion and contraction method of the stateful service includes the following steps:
step S10: and acquiring state information of a back-end server corresponding to the stateful service, wherein the state information comprises routing state information and load state data.
It should be noted that, the execution body of the embodiment is a dynamic capacity expansion device with a state service, and a dynamic capacity expansion program with a state service is set in the dynamic capacity expansion device with a state service, and automatic capacity expansion is implemented by running the dynamic capacity expansion program with a state service. As shown in fig. 3, in this embodiment, the dynamic capacity expansion device with a state service includes a proxy server, several back-end servers, a registry and a telescopic device, where the proxy server receives a user request sent by a client and forwards the request to a corresponding back-end server, the back-end server replies the user request, the proxy server forwards the reply to the user, the back-end server updates its state in the registry, and the proxy server can obtain the state of the back-end server from the registry, and in this process, the telescopic device expands or contracts the back-end servers capable of performing reply processing according to actual conditions, thereby reducing cost while guaranteeing service quality.
It is understood that the stateful services refer to all stateful services that can be handled, and stateful requests can be divided into two types: one is that it needs to be sent to a designated back-end process (the back-end already holds relevant data of the corresponding user), and the second is that it can be sent to any back-end process (for example, all the back-ends do not already hold relevant data of the user), where the stateful service described in this embodiment may be any service in any of these two types, and this embodiment is not limited and is determined according to the actual situation.
It should be understood that different stateful services correspond to different backend servers, each backend server has its own state information, where the state information refers to relevant state conditions of the backend server, including backend service information, load state data, and route state information, that is, a backend service name and an instance index, a load state value, and a route state, where the backend service name and the instance index may be represented by a service-number form, the load state value may be represented by a loadState, where in this embodiment, the load state value is obtained by the backend server according to the number of user data held by the backend server, and where routingState may be used to represent a route state, including three states of READY (READY), shutdown (CLOSED), and CLOSED (CLOSED), where only if the route state is READY, the backend server may accept a request, and if the route state is shutdown, the request may not be forwarded, where the overall structure of the state information is as follows:
{
"service-1":{
"loadState":5,
"routingState":"READY",
}
}
Wherein, service-1 represents a backend service name+instance index, "loadState" 5 represents a load state value of 5 (having held related data of 5 users), "routingState" and "READY" represent a routing state as READY, and other representation forms and other structures can be used, which is not limited in this embodiment. The back-end server stores the state information in the registry and updates the state information periodically, and the proxy server can acquire the state information of the back-end server from the registry.
In a specific implementation, the proxy server may obtain state information of all the stateful services corresponding to the backend server from the registry.
Step S20: and determining the number of busy servers and the number of idle servers corresponding to each stateful service according to the load state data of the backend server corresponding to the stateful service and a preset state threshold.
It should be noted that, the preset state threshold refers to a value for measuring the current degree of the load state of the back-end server, including a low load threshold and a high load quantity threshold, which are respectively preset quantity thresholds of the held user data corresponding to the high load state in the low load state, for example: the low load threshold and the high load number threshold are set to 3 and 10, respectively, and can be adjusted according to practical situations, which is not limited in this embodiment.
Further, the step S20 includes: and determining the number of busy servers and busy servers corresponding to the stateful services according to the load state data of the back-end servers corresponding to the stateful services and the high load number threshold, wherein the load state data of the busy servers is larger than the high load number threshold, and determining the number of idle servers and idle servers corresponding to the stateful services according to the load state data of the back-end servers corresponding to the stateful services and the low load number threshold, and the load state data of the idle servers is smaller than the low load number threshold.
It is understood that the busy server refers to a back-end server in a high load state, where the load state data is greater than the high load quantity threshold, that is, when the quantity of user data held by one back-end server is greater than the quantity threshold in the high load state, the back-end server may be considered as a busy server, for example: if the high load number threshold is 10 and the load status data of the back-end server a is 15, the back-end server a is a busy server. The idle server refers to a back-end server in a low load state, where the load state data is smaller than the low load quantity threshold, that is, when the quantity of user data held by one back-end server is smaller than the quantity threshold in the low load state, the back-end server may be considered as an optional server, for example: if the low load quantity threshold is 5 and the load state data of the back-end server B is 3, the back-end server B is an idle server.
It should be understood that if the load status data of the back-end server is greater than or equal to the low load quantity threshold and less than or equal to the high load quantity threshold, the back-end server may be considered as a good server, i.e., a back-end server with a good load status, and thus, the back-end server may be classified into a free server, a good server, and a busy server according to the low load quantity threshold and the high load quantity threshold. The number of busy servers and the number of idle servers are the number of busy servers and the number of idle servers, and after all the busy servers and the idle servers are determined, the number of busy servers and the number of idle servers corresponding to different stateful services can be known.
It should be noted that, the route status information of the idle server, the good server and the busy server are ready status, and the back-end server in the closed state and the closed state cannot reply to the user request currently, and generally does not divide the load status, so the load status data of the idle server is greater than zero. The back-end servers in the off state and the off state may be excluded according to the routing state information before the division, or may be excluded according to the load state data during the division, which is not limited in this embodiment.
In a specific implementation, a back-end server with load state data larger than a high load quantity threshold is used as a busy server, a back-end server with load state data smaller than a low load quantity threshold is used as an idle server, and the quantity of the busy servers and the quantity of the idle servers corresponding to different stateful services are determined.
Step S30: and determining the expansion and contraction capacity threshold value corresponding to each stateful service according to the routing state information of the backend server corresponding to each stateful service and the preset expansion and contraction capacity condition.
It can be understood that the preset capacity expansion and contraction conditions refer to the situation that expansion and contraction are needed, including the capacity expansion condition and the capacity contraction condition, that is, the situation that expansion is needed and the situation that contraction is needed, where the number of busy servers is generally greater, the situation that expansion is needed is considered as follows: the number of busy servers exceeds half, which can be determined according to actual requirements, and this embodiment does not limit this, and in general, when the number of idle servers is large, it is considered that the situation of capacity reduction needs to be performed, for example: the number of idle servers exceeds half, which can be determined according to actual requirements, and this embodiment is not limited. In this embodiment, a capacity expansion threshold is set to determine whether capacity expansion needs to be performed, where the capacity expansion threshold includes a service capacity expansion threshold and a service capacity expansion threshold, that is, a number threshold for determining capacity expansion conditions and a number threshold for determining capacity expansion conditions, for example: and taking half of the number of the back-end servers in the ready state corresponding to each stateful service as a service capacity expansion threshold, and taking one third of the number of the back-end servers in the ready state corresponding to each stateful service as a service capacity reduction threshold.
In a specific implementation, a service capacity expansion threshold and a service capacity reduction threshold are determined according to actual requirements and are used for judging whether capacity expansion and capacity reduction are needed.
Step S40: and determining the capacity-shrinking stateful service and the capacity-expanding stateful service according to the number of busy servers, the number of idle servers and the capacity-expanding threshold value corresponding to each stateful service.
Further, the step S40 includes: and determining capacity-expanding stateful services in the stateful services according to the number of busy servers corresponding to the stateful services and a service capacity-expanding threshold, wherein the number of busy servers corresponding to the capacity-expanding stateful services is larger than or equal to the service capacity-expanding threshold, and determining capacity-expanding stateful services in the stateful services according to the number of idle servers corresponding to the stateful services and the service capacity-expanding threshold, and the number of idle servers corresponding to the capacity-expanding stateful services is larger than or equal to the service capacity-expanding threshold.
It should be understood that the capacity expansion stateful service refers to a stateful service requiring capacity expansion, the number of busy servers is greater than or equal to a service capacity expansion threshold, and the capacity expansion stateful service refers to a stateful service requiring capacity expansion, and the number of idle servers is greater than or equal to a service capacity expansion threshold.
In a specific implementation, stateful services with the number of busy servers being greater than or equal to a service capacity expansion threshold are found out and used as capacity expansion stateful services, and stateful services with the number of idle servers being greater than or equal to a service capacity reduction threshold are found out and used as capacity reduction stateful services.
Step S50: and carrying out capacity reduction processing on the back-end server corresponding to the capacity reduction state service, and carrying out capacity expansion processing on the back-end server corresponding to the capacity expansion state service.
Further, the performing capacity expansion processing on the backend server corresponding to the capacity expansion state service includes: and determining the capacity expansion server corresponding to each capacity expansion state service in the unused servers according to a preset capacity expansion strategy, adding the capacity expansion servers into the back-end servers corresponding to the capacity reduction state services respectively, starting the capacity expansion servers, and adjusting the routing state information of the capacity expansion servers to be in a ready state.
It should be noted that, the preset capacity expansion policy refers to a preset capacity expansion mode, and at least includes the capacity expansion amount, that is, the number of servers increased in each capacity expansion, for example: 1, can be set according to actual demand. The capacity expansion server refers to an added server, namely a newly added server required for capacity expansion. The unused server refers to a back-end server which is not in use and can be used for capacity expansion.
As shown in the capacity expansion flow diagram of fig. 4, the capacity expansion server is started and initialized, the routing state is set to be the ready state, and the state of the capacity expansion server is not stored in the registry during internal initialization, so that the user request is not forwarded to the server, and after the routing state is adjusted to be ready, the request of a new user is automatically loaded, thereby realizing the purpose of dynamic capacity expansion.
In a specific implementation, as shown in fig. 5, when the number of busy servers is greater than or equal to the service capacity expansion threshold, the expansion instruction is immediately initiated by the expansion device, and a new server is determined to be needed, so that the resource pool is enlarged, the busy servers are reduced below the threshold, and the capacity expansion is completed.
Further, the performing the capacity reduction processing on the backend server corresponding to the capacity reduction stateful service includes: and determining a capacity reduction server in the back-end servers corresponding to the capacity reduction state services according to a preset capacity reduction strategy, adjusting the routing state information of the capacity reduction server to be in a closed state, and after the user data and the connection information of the capacity reduction server are cleared, adjusting the routing state information of the capacity reduction server to be in a closed state, and closing the capacity reduction server.
It may be understood that the preset volume reduction policy refers to a preset volume reduction manner, and may include a volume reduction number, a minimum number of instances, and a volume reduction whitelist, where the volume reduction number is a number of servers that reduce volume each time, for example: the minimum number of examples can be set according to actual demands, the minimum number of back-end servers required by each tolerant state service on the premise of ensuring that the user request can be processed at normal speed can be set according to actual demands, so as to ensure service quality, the tolerant whitelist is a list of servers which cannot be contracted, the back-end servers in the tolerant whitelist cannot be contracted, and the minimum number of back-end servers can be determined according to actual conditions. The capacity reduction server refers to a server with reduced capacity reduction requirements.
It should be understood that the user data refers to data related to the use of an application by a user in a client, such as: game data, which is not limited in this embodiment. The connection information refers to a binding relationship between the user and the back-end server, and includes user identification information, back-end service name information, and back-end service index information, that is, information corresponding to the user identification, the back-end service name, and the back-end service index, where the user identification may be represented by a user-letter/number format, the back-end service name may be represented by a name-service, and the back-end service index may be represented by an index, for example:
{
"user-a":{
"game-service":{
"index":1,
}
}
}
Wherein, user-a represents the identity of user a, name-service represents the back-end service name, index represents the back-end service index, 1 is a specific index, other representation forms and other structures can be used, and the embodiment is not limited to this. The user data of the volume reduction servers are all user data held in each volume reduction server, and the connection information of the volume reduction servers is all connection information related to each volume reduction server.
As shown in the schematic capacity reduction flow chart of fig. 6, when starting to close the server, the routing state is firstly adjusted to be in a closing state, then a period of time is waited for, the user data is landed and the connection information is cleared, and then the routing state is set to be in a closed state, so that the server is closed. Since the routing state is perceived to take a certain time, a period of time is required to wait for ensuring that the state has been updated, and at this time the new user cannot be routed to the back-end server, since the user request is loaded with user state data in the memory due to the need for the user data to be landed and the connection information to be cleared in the shrink volume, the old user request cannot be routed to the back-end server and also cannot be forwarded to another back-end.
In a specific implementation, as shown in fig. 7, when the number of idle servers is greater than or equal to the service capacity reduction threshold, the telescopic device immediately initiates a capacity reduction instruction to determine the servers to be reduced, so that the resource pool is reduced, the idle servers are reduced below the threshold, and the capacity reduction is completed.
In this embodiment, the number of busy servers and the number of idle servers corresponding to each stateful service are determined according to the load state data and the preset state threshold of the backend server corresponding to each stateful service, the expansion threshold corresponding to each stateful service is determined according to the routing state information and the preset expansion condition of the backend server corresponding to each stateful service, the number of busy servers, the number of idle servers and the expansion threshold corresponding to each stateful service, the capacity-shrinking stateful service and the capacity-expanding stateful service are determined, the capacity-shrinking processing is performed on the backend server corresponding to the capacity-shrinking stateful service, and the capacity-expanding processing is performed on the backend server corresponding to the capacity-expanding stateful service. Aiming at stateful service, the embodiment does not need to stop maintenance, can dynamically expand or contract according to the use condition in time, ensures user experience without perception, and can automatically expand and contract, thereby ensuring service quality and effectively reducing cost.
Referring to fig. 8, fig. 8 is a flow chart of a dynamic capacity expansion method for stateful services according to a second embodiment of the present invention.
Based on the above embodiment, the dynamic capacity expansion and contraction method of the stateful service further includes:
step S601: and when receiving a service request sent by a client, acquiring a target service of the client.
It should be noted that, the client is a client of an application used by a user, for example: the game APP is not limited in this embodiment, when a user wants to use a certain function in the client, the client sends a corresponding request, that is, the service request, to the proxy server, where the target service refers to a service required by the user, that is, a service corresponding to the function is implemented, and according to the service request, it is determined that there is a target service name in the request, different service requests correspond to different target services, and different target services require different backend servers.
In a specific implementation, a client sends a service request to a proxy server, and the proxy server determines a target service required by a user according to a current service request of the client, acquires connection information of the target service from a registry, and is used for judging an object sent by a subsequent service request.
Step S602: when the connection information of the target service is acquired, determining a target back-end server according to the connection information, and determining whether the target back-end server has the capacity reduction possibility according to the state information of the target back-end server.
It will be appreciated that the connection information between the user and the backend server will only exist if the user's target service has been recently processed by a certain backend, where the service request can only be sent to a specified backend (the backend that processed the user-related service). The embodiment is provided with a global registry, the registry can store connection information between the users and the back-end server, if the registry does not have corresponding connection information, it indicates that the target service has not been processed recently, at this time, the service request can be sent to any back-end capable of realizing the target service for processing, and the user who can occur this situation is usually a new user or an old user who is inactive for a long time.
It should be understood that, the target backend server refers to a backend server that processes a service request of a current user finally, only when the routing state of the target backend server is in a ready state, the proxy server can forward the request in the past, and if the routing state of the target backend server is in a closed state or a closed state, the target backend server is considered to have a capacity reduction possibility at this time, that is, the target backend server may be in capacity reduction.
In a specific implementation, if the proxy server can obtain the corresponding connection information from the registry, only the designated backend server can be selected to process the service request, at this time, according to the routing state information, whether the backend has the possibility of shrinking, if the routing state is the ready state, it is indicated that the backend can normally forward the request, and if the routing state is the off state or the closed state, it is possible that the backend is shrinking, and step S603 is executed.
Further, after the step S601, the method further includes: when the connection information of the target service cannot be acquired, acquiring the state information of a back-end server corresponding to the target service, determining the number of available back-end servers and the number of available back-end servers according to the state information of the back-end server corresponding to the target service, and forwarding the service request to the target back-end server by polling when the number of available back-end servers is greater than a preset number threshold.
If the registry does not have the corresponding connection information, it is described that the back-end server replying to the current service request needs to be determined by screening, and since only the back-end capable of implementing the target service can process the current service request, the back-end server capable of processing the target service is found according to the target service name, and then further screening is performed according to the routing state information.
It can be understood that the available back-end servers refer to back-end servers whose routing states are ready, and the number of available back-end servers is the number of available back-end servers. The preset number threshold refers to a preset number of servers, which is usually set to 0, and may also be adjusted according to actual situations, which is not limited in this embodiment. When the number of available back-end servers is greater than the preset number threshold, that is, the number of available back-end servers is greater than 0, it is considered that the back-end servers can process the request, and the next step can be performed. When the number of the available back-end servers is smaller than or equal to a preset number threshold, determining that the service request cannot be replied, generating request error information, feeding back the request error information to the client, namely when the number of the available back-end servers is 0, indicating that no back-end is available, and directly returning an error.
It should be understood that, when the registry does not have corresponding connection information, the present embodiment determines the target backend server through polling, and the specific implementation is not limited in this embodiment.
In a specific implementation, when the number of available back-end servers is greater than 0, a suitable back-end server is determined as a target back-end server in the available back-end servers, and is used for subsequent service request replies.
Step S603: and when the target back-end server has the capacity reduction possibility, the target back-end server is redetermined through a retry strategy, and the service request is forwarded to the target back-end server.
It should be noted that, the retry strategy, that is, the retry mechanism, refers to a manner in which the target backend server may perform the next step when the volume is contracted.
Further, the step S603 includes: the step S603 includes: when the target back-end server has the capacity reduction possibility, the retry times are acquired, when the retry times are smaller than or equal to a preset retry threshold value, the preset time period is waited for, whether the connection information of the target service is acquired is determined again, when the connection information of the target service is acquired, the step of determining the target back-end server according to the connection information is executed in a returning mode, and when the connection information of the target service cannot be acquired, the step of acquiring the state information of the back-end server corresponding to the target service is executed in a returning mode.
It may be understood that the retry number refers to the number of times that the retry mechanism has been adopted, and each time the retry mechanism is used, the retry number is +1, and the preset retry threshold refers to the maximum retry number, which may be set according to the actual situation, and this embodiment is not limited thereto. The preset time period refers to a waiting interval when a retry mechanism is adopted, for example: 1s may be set according to actual conditions, and this embodiment is not limited thereto.
In a specific implementation, when the capacity reduction possibility exists in the target back-end server, if the retry number is smaller than the maximum retry number, retrying after waiting for a preset time period, requesting to acquire the connection information of the target service from the registry again, executing the corresponding steps according to the acquired result, and if the retry number reaches the maximum retry number, indicating that no back-end is available, and directly returning an error.
As shown in the routing flow chart of fig. 9, the proxy server firstly checks whether the user has the connection information of the corresponding service (i.e. the data is processed by a certain back end in the near term), if the user has the connection information, the proxy server can only send the connection information to the corresponding back end, then judges whether the routing state of the back end is ready, the request can be forwarded in the ready state, and adopts a retry mechanism to query the connection information at regular time until the back end is landed to finish clearing the connection information of the user, and then the request can be safely forwarded to other back ends; if the connection information is not available, checking the number of available back ends corresponding to the target service, if the number is equal to zero, indicating that no back end service is available, directly returning an error, and if the number is available, obtaining a back end forwarding request through a polling algorithm.
In this embodiment, when a service request sent by a client is received, a target service of the client is obtained, when connection information of the target service is obtained, a target backend server is determined according to the connection information, whether the target backend server has a capacity reduction possibility or not is determined according to state information of the target backend server, when the target backend server has the capacity reduction possibility, the target backend server is determined again through a retry strategy, and the service request is forwarded to the target backend server. For stateful services, the embodiment does not need to stop taking the service for capacity reduction, and even if the target back end is performing capacity reduction, a retry mechanism can be adopted to safely forward the request to other back ends, so that the user does not feel, and the user experience is ensured.
Referring to fig. 10, fig. 10 is a block diagram illustrating a first embodiment of a dynamic capacity expansion device with a stateful service according to the present invention.
As shown in fig. 10, a dynamic capacity expansion device for stateful services according to an embodiment of the present invention includes:
the acquiring module 10 is configured to acquire state information of a backend server corresponding to a stateful service, where the state information includes routing state information and load state data.
The obtaining module 10 is further configured to determine the number of busy servers and the number of idle servers corresponding to the stateful services according to the load state data of the backend server corresponding to the stateful services and a preset state threshold.
The obtaining module 10 is further configured to determine a capacity expansion threshold value corresponding to each stateful service according to the routing state information of the backend server corresponding to each stateful service and a preset capacity expansion condition.
And the expansion and contraction module 20 is configured to determine the capacity-contracted state service and the capacity-expanded state service according to the number of busy servers, the number of idle servers and the capacity-expanded threshold value corresponding to each stateful service.
The expansion and contraction module 20 is further configured to perform capacity expansion processing on the backend server corresponding to the capacity expansion state service, and perform capacity expansion processing on the backend server corresponding to the capacity expansion state service.
In this embodiment, the number of busy servers and the number of idle servers corresponding to each stateful service are determined according to the load state data and the preset state threshold of the backend server corresponding to each stateful service, the expansion threshold corresponding to each stateful service is determined according to the routing state information and the preset expansion condition of the backend server corresponding to each stateful service, the number of busy servers, the number of idle servers and the expansion threshold corresponding to each stateful service, the capacity-shrinking stateful service and the capacity-expanding stateful service are determined, the capacity-shrinking processing is performed on the backend server corresponding to the capacity-shrinking stateful service, and the capacity-expanding processing is performed on the backend server corresponding to the capacity-expanding stateful service. Aiming at stateful service, the embodiment does not need to stop maintenance, can dynamically expand or contract according to the use condition in time, ensures user experience without perception, and can automatically expand and contract, thereby ensuring service quality and effectively reducing cost.
In an embodiment, the preset status threshold includes a low load threshold and a high load quantity threshold, and the obtaining module 10 is further configured to determine, according to load status data of a backend server corresponding to each of the stateful services and the high load quantity threshold, a number of busy servers corresponding to each of the stateful services, where the load status data of the busy servers is greater than the high load quantity threshold;
and determining the idle servers and the number of the idle servers corresponding to the stateful services according to the load state data of the back-end servers corresponding to the stateful services and the low load number threshold, wherein the load state data of the idle servers is smaller than the low load number threshold.
In an embodiment, the capacity expansion threshold includes a service capacity expansion threshold and a service capacity expansion threshold, and the expansion module 20 is further configured to determine capacity expansion status services in the stateful services according to the number of busy servers and the service capacity expansion threshold corresponding to each stateful service, where the number of busy servers corresponding to the capacity expansion status services is greater than or equal to the service capacity expansion threshold;
and determining the capacity-shrinking stateful service in the stateful service according to the number of idle servers corresponding to the stateful service and the service capacity-shrinking threshold, wherein the number of idle servers corresponding to the capacity-shrinking stateful service is larger than or equal to the service capacity-shrinking threshold.
In an embodiment, the expansion and contraction module 20 is further configured to determine, according to a preset expansion policy, an expansion server corresponding to each of the expansion state services from among the unused servers, and add the expansion servers to a backend server corresponding to each of the expansion state services;
and starting the capacity expansion server and adjusting the routing state information of the capacity expansion server to be in a ready state.
In an embodiment, the scaling module 20 is further configured to determine a scaling server from the backend servers corresponding to the scaling stateful services according to a preset scaling policy;
the routing state information of the capacity reduction server is adjusted to be in a closed state;
and after the user data and the connection information of the volume reduction server are cleared, the routing state information of the volume reduction server is adjusted to be in a closed state, and the volume reduction server is closed.
In an embodiment, the dynamic capacity expansion device of the stateful service further includes:
the processing module 30 is configured to obtain a target service of a client when a service request sent by the client is received;
when the connection information of the target service is acquired, determining a target back-end server according to the connection information, and determining whether the target back-end server has capacity reduction possibility according to the state information of the target back-end server;
And when the target back-end server has the capacity reduction possibility, the target back-end server is redetermined through a retry strategy, and the service request is forwarded to the target back-end server.
In an embodiment, the processing module 30 is further configured to obtain, when connection information of the target service cannot be obtained, status information of a backend server corresponding to the target service;
determining available back-end servers and the number of the available back-end servers according to the state information of the back-end servers corresponding to the target service;
and when the number of the available back-end servers is larger than a preset number threshold, determining a target back-end server in the available back-end servers through polling, and forwarding the service request to the target back-end server.
In an embodiment, the scaling module 20 is further configured to obtain a retry number, wait for a preset time period when the retry number is less than a preset retry threshold, and re-determine whether to obtain the connection information of the target service;
and when the connection information of the target service cannot be acquired, returning to execute the step of acquiring the state information of the back-end server corresponding to the target service.
It should be understood that the foregoing is illustrative only and is not limiting, and that in specific applications, those skilled in the art may set the invention as desired, and the invention is not limited thereto.
It should be noted that the above-described working procedure is merely illustrative, and does not limit the scope of the present invention, and in practical application, a person skilled in the art may select part or all of them according to actual needs to achieve the purpose of the embodiment, which is not limited herein.
In addition, technical details not described in detail in this embodiment may refer to the dynamic capacity expansion and contraction method of the stateful service provided in any embodiment of the present invention, which is not described herein.
Furthermore, it should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system 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 system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The embodiment numbers of the present invention are merely for description and do not represent advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the example method may be implemented by means of software plus a necessary general purpose hardware platform, but of course also by means of hardware, although in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. Read Only Memory)/RAM, magnetic disk, optical disk) and including several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (10)

1. The dynamic capacity expansion and contraction method for the stateful service is characterized by comprising the following steps of:
acquiring state information of a back-end server corresponding to a stateful service, wherein the state information comprises routing state information and load state data;
determining the number of busy servers and the number of idle servers corresponding to each stateful service according to the load state data of the backend server corresponding to the stateful service and a preset state threshold;
determining a capacity expansion threshold corresponding to each stateful service according to the routing state information of the backend server corresponding to each stateful service and a preset capacity expansion condition;
determining capacity-shrinking stateful services and capacity-expanding stateful services according to the number of busy servers, the number of idle servers and capacity-expanding threshold values corresponding to the stateful services;
and carrying out capacity reduction processing on the back-end server corresponding to the capacity reduction state service, and carrying out capacity expansion processing on the back-end server corresponding to the capacity expansion state service.
2. The method of claim 1, wherein the preset status threshold comprises a low load threshold and a high load number threshold, and wherein determining the number of busy servers and the number of idle servers corresponding to each stateful service based on the load status data of the backend server corresponding to the stateful service and the preset status threshold comprises:
Determining the busy servers and the number of the busy servers corresponding to the stateful services according to the load state data of the back-end servers corresponding to the stateful services and the high load number threshold, wherein the load state data of the busy servers is larger than the high load number threshold;
and determining the idle servers and the number of the idle servers corresponding to the stateful services according to the load state data of the back-end servers corresponding to the stateful services and the low load number threshold, wherein the load state data of the idle servers is smaller than the low load number threshold.
3. The method of claim 1, wherein the scaling threshold comprises a service scaling threshold and a service scaling threshold, wherein the determining the scaled stateful services and the scaled stateful services based on the number of busy servers, the number of idle servers, and the scaling threshold for each of the stateful services comprises:
determining capacity-expansion stateful services in the stateful services according to the number of busy servers corresponding to the stateful services and a service capacity-expansion threshold, wherein the number of the busy servers corresponding to the capacity-expansion stateful services is larger than or equal to the service capacity-expansion threshold;
And determining the capacity-shrinking stateful service in the stateful service according to the number of idle servers corresponding to the stateful service and the service capacity-shrinking threshold, wherein the number of idle servers corresponding to the capacity-shrinking stateful service is larger than or equal to the service capacity-shrinking threshold.
4. The method of claim 1, wherein the performing the capacity expansion process on the backend server corresponding to the capacity-expanded stateful service comprises:
according to a preset capacity expansion strategy, determining capacity expansion servers corresponding to the capacity expansion state services in unused servers, and respectively adding the capacity expansion servers to back-end servers corresponding to the capacity expansion state services;
starting the capacity expansion server and adjusting the route state information of the capacity expansion server to be in a ready state;
the performing the capacity reduction processing on the backend server corresponding to the capacity reduction state service includes:
determining a capacity-shrinking server in the back-end servers corresponding to the capacity-shrinking state services according to a preset capacity-shrinking strategy;
the routing state information of the capacity reduction server is adjusted to be in a closed state;
and after the user data and the connection information of the volume reduction server are cleared, the routing state information of the volume reduction server is adjusted to be in a closed state, and the volume reduction server is closed.
5. The method of any of claims 1 to 4, wherein the dynamic scaling method of the stateful services further comprises:
when a service request sent by a client is received, acquiring a target service of the client;
when the connection information of the target service is acquired, determining a target back-end server according to the connection information, and determining whether the target back-end server has capacity reduction possibility according to the state information of the target back-end server;
and when the target back-end server has the capacity reduction possibility, the target back-end server is redetermined through a retry strategy, and the service request is forwarded to the target back-end server.
6. The method of claim 5, wherein the connection information includes user identification information, back-end service name information, and back-end service index information, and when receiving a service request sent by a client, after obtaining a target service of the client, further comprising:
when the connection information of the target service cannot be acquired, acquiring the state information of a back-end server corresponding to the target service;
determining available back-end servers and the number of the available back-end servers according to the state information of the back-end servers corresponding to the target service;
And when the number of the available back-end servers is larger than a preset number threshold, determining a target back-end server in the available back-end servers through polling, and forwarding the service request to the target back-end server.
7. The method of claim 6, wherein the redefining the target backend server by a retry strategy comprises:
acquiring retry times, waiting for a preset time period when the retry times are smaller than a preset retry threshold, and determining whether the connection information of the target service is acquired or not again;
and when the connection information of the target service cannot be acquired, returning to execute the step of acquiring the state information of the back-end server corresponding to the target service.
8. A dynamic capacity expansion device for a stateful service, the dynamic capacity expansion device for a stateful service comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring state information of a back-end server corresponding to a stateful service, and the state information comprises routing state information and load state data;
The acquisition module is further used for determining the number of busy servers and the number of idle servers corresponding to each stateful service according to the load state data of the backend server corresponding to the stateful service and a preset state threshold;
the acquisition module is further configured to determine a capacity expansion threshold value corresponding to each stateful service according to the routing state information of the backend server corresponding to each stateful service and a preset capacity expansion condition;
the expansion and contraction module is used for determining capacity-contracted state services and capacity-expanded state services according to the number of busy servers, the number of idle servers and the capacity-expanded threshold value corresponding to each stateful service;
the expansion and contraction module is further configured to perform capacity expansion processing on the backend server corresponding to the capacity expansion state service, and perform capacity expansion processing on the backend server corresponding to the capacity expansion state service.
9. A dynamic capacity expansion device for stateful services, the device comprising: memory, a processor and a dynamic scaling procedure of a stateful service stored on the memory and executable on the processor, the dynamic scaling procedure of a stateful service being configured to implement the steps of the dynamic scaling method of a stateful service as claimed in any one of claims 1 to 7.
10. A storage medium, wherein a dynamic capacity expansion program of a stateful service is stored on the storage medium, and the dynamic capacity expansion program of the stateful service, when executed by a processor, implements the steps of the dynamic capacity expansion method of the stateful service according to any one of claims 1 to 7.
CN202310468162.7A 2023-04-19 2023-04-19 Dynamic capacity expansion and contraction method, device and equipment for stateful service and storage medium Pending CN116483570A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310468162.7A CN116483570A (en) 2023-04-19 2023-04-19 Dynamic capacity expansion and contraction method, device and equipment for stateful service and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310468162.7A CN116483570A (en) 2023-04-19 2023-04-19 Dynamic capacity expansion and contraction method, device and equipment for stateful service and storage medium

Publications (1)

Publication Number Publication Date
CN116483570A true CN116483570A (en) 2023-07-25

Family

ID=87213534

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310468162.7A Pending CN116483570A (en) 2023-04-19 2023-04-19 Dynamic capacity expansion and contraction method, device and equipment for stateful service and storage medium

Country Status (1)

Country Link
CN (1) CN116483570A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117082068A (en) * 2023-08-25 2023-11-17 北京神州云合数据科技发展有限公司 Elastic expansion method and system for tax return server

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117082068A (en) * 2023-08-25 2023-11-17 北京神州云合数据科技发展有限公司 Elastic expansion method and system for tax return server
CN117082068B (en) * 2023-08-25 2024-03-29 北京神州云合数据科技发展有限公司 Elastic expansion method and system for tax return server

Similar Documents

Publication Publication Date Title
CN108958893B (en) Resource control method, device and computer readable storage medium for high concurrent service
CN106897299B (en) Database access method and device
JP7103705B1 (en) Cluster-based capacity reduction processing method and equipment
EP1335572A3 (en) Dynamically updated qos parameterization according to expected business revenue
WO2019237594A1 (en) Session persistence method and apparatus, and computer device and storage medium
CN110704177B (en) Computing task processing method and device, computer equipment and storage medium
CN111901157B (en) Service deployment method, device, equipment and medium based on k8s
CN107888787B (en) Method and device for processing media access request
CN116483570A (en) Dynamic capacity expansion and contraction method, device and equipment for stateful service and storage medium
CN105791254A (en) Network request processing method, device and terminal
US20230254312A1 (en) Service processing method and device
CN109002364B (en) Method for optimizing inter-process communication, electronic device and readable storage medium
CN112087401A (en) Method and device for realizing service quality in distributed storage
CN113810433A (en) File uploading method and device and computer equipment
CN114158030A (en) Session binding method, system and storage medium
CN112218334B (en) Dynamic optimization method and device for core network load and computing equipment
CN117221326A (en) Software load balancing scheduling method, system, electronic equipment and storage medium
CN111737000A (en) Method for realizing load balance
KR20210072956A (en) Edge Cloud Computing Offloading Method in the IoT environment
CN112688980B (en) Resource distribution method and device, and computer equipment
CN114780228A (en) Hybrid cloud resource creation method and system
CN112019630B (en) Load balancing method and device
US20090183172A1 (en) Middleware Bridge System And Method
CN113886082A (en) Request processing method and device, computing equipment and medium
CN115915289A (en) Method, device, network element and medium for determining strategy or allocating resources of computing task

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