CN109040156B - Soft load resource processing method and device based on container cloud - Google Patents

Soft load resource processing method and device based on container cloud Download PDF

Info

Publication number
CN109040156B
CN109040156B CN201710428727.3A CN201710428727A CN109040156B CN 109040156 B CN109040156 B CN 109040156B CN 201710428727 A CN201710428727 A CN 201710428727A CN 109040156 B CN109040156 B CN 109040156B
Authority
CN
China
Prior art keywords
queue
soft load
mutation
soft
load
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
CN201710428727.3A
Other languages
Chinese (zh)
Other versions
CN109040156A (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.)
China Mobile Communications Group Co Ltd
China Mobile Group Zhejiang Co Ltd
China Mobile Zhejiang Innovation Research Institute Co Ltd
Original Assignee
China Mobile Group Zhejiang Co Ltd
China Mobile Communications Corp
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 China Mobile Group Zhejiang Co Ltd, China Mobile Communications Corp filed Critical China Mobile Group Zhejiang Co Ltd
Priority to CN201710428727.3A priority Critical patent/CN109040156B/en
Publication of CN109040156A publication Critical patent/CN109040156A/en
Application granted granted Critical
Publication of CN109040156B publication Critical patent/CN109040156B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明提供了一种基于容器云的软负载资源处理方法及装置。该方法包括:获取软负载资源池的多个时刻的软负载队列长度,所述多个时刻的软负载队列长度中至少包括当前时刻的软负载队列长度;根据所述多个时刻的软负载队列长度获取队列突变信息;根据所述队列突变信息以软负载容器为单位对软负载资源进行处理。本发明实施例基于容器化技术,整合底层资源,软负载服务与应用服务共享资源,提高了资源利用率;容器化软负载服务,弥补了现有技术不能快速部署软负载服务的缺陷,以软负载容器为单位自动对软负载资源进行动态扩容或缩容,减少系统因高并发高流量或突发流量而引起的业务中断。

Figure 201710428727

The present invention provides a container cloud-based soft load resource processing method and device. The method includes: acquiring soft load queue lengths at multiple times in the soft load resource pool, where the soft load queue lengths at the multiple times include at least the soft load queue length at the current moment; and according to the soft load queue lengths at the multiple times The length acquires queue mutation information; the soft load resource is processed in units of soft load containers according to the queue mutation information. The embodiment of the present invention is based on the containerization technology, integrates the underlying resources, the soft load service and the application service share resources, and improves the resource utilization rate; the containerized soft load service makes up for the defect of the existing technology that cannot quickly deploy the soft load service, and uses the soft load service. The load container automatically expands or shrinks the soft load resources dynamically on a unit basis, reducing system service interruptions caused by high concurrency and high traffic or burst traffic.

Figure 201710428727

Description

一种基于容器云的软负载资源处理方法及装置A method and device for processing soft load resources based on container cloud

技术领域technical field

本发明涉及负载均衡技术领域,具体涉及一种基于容器云的软负载资源处理方法及装置。The present invention relates to the technical field of load balancing, in particular to a container cloud-based soft load resource processing method and device.

背景技术Background technique

随着互联网和云计算技术的迅速发展,使得基于虚拟化的web应用成为目前最重要最广泛的应用。目前基于web应用的信息交换量呈指数增长,应用服务器面临着访问量急剧增加的压力,对其响应能力和处理能力都带来了极高的要求,为此需对数据中心的各项资源进行有效整合,数据中心的资源控制与调度对于业务的正常运转起着决定性作用。With the rapid development of Internet and cloud computing technology, the web application based on virtualization has become the most important and widespread application at present. At present, the amount of information exchange based on web applications is increasing exponentially. The application server is facing the pressure of a sharp increase in the number of visits, which brings extremely high requirements on its response capability and processing capability. Effective integration, data center resource control and scheduling play a decisive role in the normal operation of the business.

由于客观存在的服务器内存、CPU处理速度和其他相关方面的因素,当进行业务扩展、热点活动的推出或周期性的业务高峰时,软负载服务器无法及时的对所有的请求进行处理,必然会造成软负载队列堵塞、应答迟缓、请求丢失、甚至导致业务无法访问等情况。在高并发高流量的业务高峰期中,现有技术根据一定策略手动进行软负载的扩展,在进行业务扩展、热点活动推出或周期性的业务高峰时,以虚拟机为单位手动对软负载进行扩展,当热点活动结束或业务高峰回归正常后,再手动的以虚拟机为单位进行软负载的回收。现有技术主要是根据经验来手动进行软负载的扩展与回收,同时以虚拟机为基础,无法快速的响应软负载资源的需求,造成业务访问不稳定。Due to the objective existence of server memory, CPU processing speed and other related factors, the soft load server cannot process all requests in a timely manner when business expansion, hotspot activities are launched or periodic business peaks, which will inevitably cause The soft load queue is blocked, the response is slow, the request is lost, and even the service cannot be accessed. In the business peak period of high concurrency and high traffic, the existing technology manually expands the soft load according to a certain strategy, and manually expands the soft load in units of virtual machines during business expansion, hotspot activity launch or periodic business peaks. , when the hotspot activity ends or the business peak returns to normal, then manually recover the soft load in units of virtual machines. The existing technology mainly manually expands and recovers soft loads based on experience, and is based on virtual machines, which cannot quickly respond to the requirements of soft load resources, resulting in unstable service access.

具体地,现有的软负载资源处理方法的原理如图1所示,当用户对应用系统进行大并发访问时,首先通过硬负载或LVS进行硬负载均衡,同时为了保证业务的正常访问,再接入软负载。数据中心会根据软负载当前的使用压力情况及运维的历史经验,由运维人员手动的对数据中心软负载服务器以虚拟机为单位进行提前部署。这样能够在某种程度上保证部署在数据中心的业务不会因为访问量过大而导致软负载压力过大导致宕机等问题。Specifically, the principle of the existing soft load resource processing method is shown in Figure 1. When a user performs large concurrent access to the application system, the hard load or LVS is used for hard load balancing first. Access the soft load. According to the current usage pressure of the soft load and the historical experience of operation and maintenance, the data center will manually deploy the soft load server of the data center in advance in units of virtual machines by the operation and maintenance personnel. In this way, it can be ensured to some extent that the business deployed in the data center will not cause problems such as downtime due to excessive soft load pressure due to excessive access volume.

通常在下面几种情况下,数据中心的业务访问将出现故障:1)在业务访问量突发增长时,现有技术的软负载采用虚拟机方式,部署周期长,灵活性差,对软负载需求得不到及时响应;2)热点活动的推出或周期性的业务高峰,在这两种情况下,一般业务流量一般缺少经验值或很难根据经验值来进行前期预测,同时也无法根据当前的软负载的资源使用情况来做预判;3)一般影响业务正常访问的因素很多,各种因素导致的各项资源短缺都会影响业务的正常运行和访问,导致线上业务不能正常提供给用户访问,当发生以上问题时,现有技术只能在故障发生时做被动处理,以虚拟机为单位,为过载的软负载分配资源,存在资源浪费的情况。在故障严重的情况下,将导致大部分用户无法对业务系统进行访问,这对于大型的或核心的系统而言,是不可接受的。Usually, the service access of the data center will fail in the following situations: 1) When the service access volume increases suddenly, the soft load of the existing technology adopts the virtual machine mode, which has a long deployment period and poor flexibility, which requires soft load. No timely response; 2) The launch of hot events or periodic business peaks, in these two cases, general business traffic generally lacks empirical values or is difficult to make early predictions based on experience values, and it is also impossible to make predictions based on current 3) Generally, there are many factors that affect the normal access of the service. The shortage of various resources caused by various factors will affect the normal operation and access of the service, and the online service cannot be normally provided to users. , when the above problems occur, the prior art can only perform passive processing when the fault occurs, and allocate resources to the overloaded soft load in units of virtual machines, which results in a waste of resources. In the case of serious failure, most users cannot access the business system, which is unacceptable for large or core systems.

发明内容SUMMARY OF THE INVENTION

本发明实施例提供一种基于容器云的软负载资源处理方法及装置,用于解决现有的软负载资源处理方法以虚拟机为单位进行手动资源扩缩造成资源部署复杂、资源浪费的问题。Embodiments of the present invention provide a container cloud-based soft load resource processing method and device, which are used to solve the problems of complex resource deployment and resource waste caused by manual resource expansion and scaling in units of virtual machines in the existing soft load resource processing method.

本发明实施例提供了一种基于容器云的软负载资源处理方法,包括:An embodiment of the present invention provides a container cloud-based soft load resource processing method, including:

获取软负载资源池的多个时刻的软负载队列长度,所述多个时刻的软负载队列长度中至少包括当前时刻的软负载队列长度;Acquiring soft load queue lengths at multiple times of the soft load resource pool, where the soft load queue lengths at the multiple times include at least the soft load queue length at the current moment;

根据所述多个时刻的软负载队列长度获取队列突变信息;Obtain queue mutation information according to the soft load queue lengths at the multiple times;

根据所述队列突变信息以软负载容器为单位对软负载资源进行处理。The soft load resources are processed in units of soft load containers according to the queue mutation information.

可选地,根据所述多个时刻的软负载队列长度获取队列突变信息,包括:Optionally, the queue mutation information is obtained according to the soft load queue lengths at the multiple times, including:

根据所述多个时刻的软负载队列长度获取第一队列突变因子和第二队列突变因子,所述第一队列突变因子为所述当前时刻之前的队列突变因子,所述第二队列突变因子为包括所述当前时刻的队列突变因子;The first queue mutation factor and the second queue mutation factor are obtained according to the soft load queue lengths at the multiple moments, the first queue mutation factor is the queue mutation factor before the current moment, and the second queue mutation factor is Including the queue mutation factor at the current moment;

根据所述第一队列突变因子和所述第二队列突变因子的差值获取队列突变信息。Cohort mutation information is acquired according to the difference between the mutation factor of the first cohort and the mutation factor of the second cohort.

可选地,根据如下公式获取所述第一队列突变因子:Optionally, the first cohort mutation factor is obtained according to the following formula:

Figure BDA0001316854870000031
Figure BDA0001316854870000031

根据如下公式获取所述第二队列突变因子:The second cohort mutation factor is obtained according to the following formula:

Figure BDA0001316854870000032
Figure BDA0001316854870000032

其中,ε1表示第一队列突变因子,ε2表示第二队列突变因子;n表示获取的软负载队列长度的个数;x表示所述当前时刻的软负载队列长度,xi表示距离当前时刻相差i的软负载队列长度。Among them, ε1 represents the mutation factor of the first queue, ε2 represents the mutation factor of the second queue; n represents the number of acquired soft load queue lengths; x represents the soft load queue length at the current moment, and x i represents the difference i from the current moment. soft load queue length.

可选地,所述根据所述队列突变信息以软负载容器为单位对软负载资源进行处理,包括:Optionally, the processing of soft load resources in units of soft load containers according to the queue mutation information includes:

若所述第二队列突变因子与所述第二队列突变因子的差大于第一预设阈值,则对软负载资源以软负载容器为单位进行扩容;If the difference between the mutation factor of the second queue and the mutation factor of the second queue is greater than a first preset threshold, the soft load resource is expanded in units of soft load containers;

若所述第一队列突变因子与所述第二队列突变因子的差大于第一预设阈值时,则对软负载资源以软负载容器为单位进行缩容;If the difference between the mutation factor of the first queue and the mutation factor of the second queue is greater than a first preset threshold, shrink the soft load resource in units of soft load containers;

可选地,当所述第一队列突变因子与所述第二队列突变因子的差的绝对值小于第一预设阈值时,所述方法还包括:Optionally, when the absolute value of the difference between the mutation factor of the first cohort and the mutation factor of the second cohort is less than a first preset threshold, the method further includes:

根据当前时刻的软负载队列长度、并发量和响应时间获取资源处理的权重值;Obtain the weight value of resource processing according to the soft load queue length, concurrency and response time at the current moment;

若所述资源处理的权重值大于第二预设阈值,则对软负载资源以软负载容器为单位进行扩容;If the weight value of the resource processing is greater than the second preset threshold, expand the soft load resource in units of soft load containers;

若所述资源处理的权重值小于第三预设阈值时,则对软负载资源以软负载容器为单位进行缩容。If the weight value of the resource processing is smaller than the third preset threshold, the soft load resource is scaled down in units of soft load containers.

可选地,所述根据当前时刻的软负载队列长度、并发量和响应时间获取资源处理的权重值,包括:Optionally, obtaining the weight value of resource processing according to the soft load queue length, concurrency and response time at the current moment includes:

根据当前时刻的软负载队列长度并发量和响应时间分别获取所述当前时刻的软负载队列长度的程度系数、所述并发量的程度系数和所述响应时间的程度系数;Obtain the degree coefficient of the soft load queue length at the current moment, the degree coefficient of the concurrency amount, and the degree coefficient of the response time, respectively, according to the soft load queue length concurrency and the response time at the current moment;

根据所述当前时刻的软负载队列长度的程度系数、所述并发量的程度系数和所述响应时间的程度系数获取资源处理的权重值。The weight value of resource processing is obtained according to the degree coefficient of the soft load queue length at the current moment, the degree coefficient of the concurrency amount, and the degree coefficient of the response time.

本发明实施例提供一种基于容器云的软负载资源处理装置,包括:An embodiment of the present invention provides a container cloud-based soft load resource processing device, including:

软负载队列长度获取单元,用于获取软负载资源池的多个时刻的软负载队列长度,所述多个时刻的软负载队列长度中至少包括当前时刻的软负载队列长度;a soft-load queue length acquiring unit, configured to acquire soft-load queue lengths at multiple moments in the soft-load resource pool, where the soft-load queue lengths at the multiple moments include at least the soft-load queue length at the current moment;

队列突变信息获取单元,用于根据所述多个时刻的软负载队列长度获取队列突变信息;a queue mutation information acquisition unit, configured to acquire queue mutation information according to the soft load queue lengths at the multiple times;

处理单元,用于根据所述队列突变信息以软负载容器为单位对软负载资源进行处理。The processing unit is configured to process the soft load resources in units of soft load containers according to the queue mutation information.

可选地,所述队列突变信息获取单元包括:Optionally, the queue mutation information acquisition unit includes:

队列突变因子获取模块,用于根据所述多个时刻的软负载队列长度获取第一队列突变因子和第二队列突变因子,所述第一队列突变因子为所述当前时刻之前的队列突变因子,所述第二队列突变因子为包括所述当前时刻的队列突变因子;a queue mutation factor acquisition module, configured to acquire a first queue mutation factor and a second queue mutation factor according to the soft load queue lengths at the multiple moments, where the first queue mutation factor is the queue mutation factor before the current moment, The second cohort mutation factor is the cohort mutation factor including the current moment;

队列突变信息获取模块,用于根据所述第一队列突变因子和所述第二队列突变因子的差值获取队列突变信息。A queue mutation information acquisition module, configured to acquire queue mutation information according to the difference between the first queue mutation factor and the second queue mutation factor.

本发明实施例提供一种电子设备,包括:处理器、存储器和总线;其中,An embodiment of the present invention provides an electronic device, including: a processor, a memory, and a bus; wherein,

处理器和存储器通过总线完成相互间的通信;The processor and the memory communicate with each other through the bus;

处理器用于调用存储器中的程序指令,以执行上述的基于容器云的软负载资源处理方法。The processor is configured to call the program instructions in the memory to execute the above-mentioned method for processing soft load resources based on the container cloud.

本发明实施例提供一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令使所述计算机执行上述的基于容器云的软负载资源处理方法。An embodiment of the present invention provides a non-transitory computer-readable storage medium, where the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions cause the computer to execute the above-mentioned container cloud-based soft load resource processing method .

本发明实施例提供的基于容器云的软负载资源处理方法及装置,获取软负载资源池的多个时刻的软负载队列长度,所述多个时刻的软负载队列长度中至少包括当前时刻的软负载队列长度;根据所述多个时刻的软负载队列长度获取队列突变信息;根据所述队列突变信息以软负载容器为单位对软负载资源进行处理。本发明实施例基于容器化技术,整合底层资源,软负载服务与应用服务共享资源,提高了资源利用率;容器化软负载服务,弥补了现有技术不能快速部署软负载服务的缺陷,以软负载容器为单位自动对软负载资源进行动态扩容或缩容,减少系统因高并发高流量或突发流量而引起的业务中断。The container cloud-based soft load resource processing method and device provided by the embodiments of the present invention acquire soft load queue lengths at multiple times in the soft load resource pool, and the soft load queue lengths at multiple times include at least the soft load queue length at the current moment. Load queue length; obtain queue mutation information according to the soft load queue lengths at the multiple times; process soft load resources in units of soft load containers according to the queue mutation information. The embodiment of the present invention is based on the containerization technology, integrates the underlying resources, the soft load service and the application service share resources, and improves the resource utilization rate; the containerized soft load service makes up for the defect of the existing technology that cannot quickly deploy the soft load service, and uses the soft load service. The load container automatically expands or shrinks the soft load resources dynamically on a unit basis, reducing system service interruptions caused by high concurrency and high traffic or burst traffic.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are For some embodiments of the present invention, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative efforts.

图1是现有技术的软负载资源处理方法的原理图;1 is a schematic diagram of a soft load resource processing method in the prior art;

图2是本发明一个实施例的基于容器云的软负载资源处理方法的流程示意图;2 is a schematic flowchart of a container cloud-based soft load resource processing method according to an embodiment of the present invention;

图3是本发明一个实施例的基于容器云的软负载资源处理方法的原理图;3 is a schematic diagram of a container cloud-based soft load resource processing method according to an embodiment of the present invention;

图4是本发明一个实施例的基于容器云的软负载资源处理装置的结构示意图;4 is a schematic structural diagram of a container cloud-based soft load resource processing apparatus according to an embodiment of the present invention;

图5是本发明一个实施例的电子设备的结构示意图。FIG. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.

具体实施方式Detailed ways

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整的描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments These are some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

现有技术尽管可以通过运维经验和软负载服务器的CPU、内存等使用情况来对软负载资源进行人工调度,保证业务的正常访问,但在绝大多数情况下,很难预测业务的并发请求量和对业务需求的快速响应,造成不能够及时的对软负载资源进行动态扩缩,导致数据中心的业务访问出现故障和正常的业务资源无法得到充分的利用。In the prior art, although it is possible to manually schedule soft load resources based on operation and maintenance experience and the usage of CPU and memory of soft load servers to ensure normal access to services, in most cases, it is difficult to predict concurrent requests for services. Due to the inability to dynamically expand and contract soft load resources in a timely manner, the service access failure of the data center and normal service resources cannot be fully utilized.

现有技术中软负载均衡弹性伸缩能力较弱,部署方式采用虚拟机为单位构建,扩展流程复杂,部署时间较长。在业务量突增时无法进行快速的部署扩展和动态调度,造成业务故障,同时软负载均衡不能自动进行缩容,系统资源存在一定的预留和浪费。In the prior art, the soft load balancing elastic scaling capability is weak, and the deployment method is constructed in units of virtual machines, the expansion process is complicated, and the deployment time is long. Rapid deployment expansion and dynamic scheduling cannot be performed when business volume increases suddenly, resulting in business failures. At the same time, soft load balancing cannot automatically reduce capacity, and system resources are reserved and wasted to a certain extent.

图2是本发明一个实施例的基于容器云的软负载资源处理方法的流程示意图。FIG. 2 is a schematic flowchart of a method for processing soft load resources based on a container cloud according to an embodiment of the present invention.

需要说明的是,容器云以容器为资源分割和调度的基本单位,封装整个软件运行时环境,提供用于构建、发布和运行分布式应用的平台。It should be noted that the container cloud uses the container as the basic unit of resource segmentation and scheduling, encapsulates the entire software runtime environment, and provides a platform for building, publishing, and running distributed applications.

如图2所示,该实施例的方法包括:As shown in Figure 2, the method of this embodiment includes:

S21:获取软负载资源池的多个时刻的软负载队列长度,所述多个时刻的软负载队列长度中至少包括当前时刻的软负载队列长度;S21: Acquire soft load queue lengths at multiple times in the soft load resource pool, where the soft load queue lengths at the multiple times at least include the soft load queue length at the current moment;

需要说明的是,本发明实施例的软负载资源池中包括多个软负载容器,每个软负载容器(如图3所示)均运行有软负载服务。软负载队列中保存了待处理的并发请求,待处理的并发请求的个数即为软负载队列的长度。It should be noted that the soft load resource pool in this embodiment of the present invention includes multiple soft load containers, and each soft load container (as shown in FIG. 3 ) runs a soft load service. The soft load queue stores pending concurrent requests, and the number of pending concurrent requests is the length of the soft load queue.

在实际应用中,宿主Master节点通过数据中心软负载资源池的性能和日志数据获取多个时刻的软负载队列长度。In practical applications, the host Master node obtains the soft load queue length at multiple times through the performance of the data center soft load resource pool and log data.

S22:根据所述多个时刻的软负载队列长度获取队列突变信息;S22: Acquire queue mutation information according to the soft load queue lengths at the multiple times;

可理解的是,若当前时刻和前面的整个时间段在软负载队列的长度上存在较大差异,则说明业务请求量变化较大,则需对软负载进行扩容或缩容。因此,本发明实施例通过多个时刻的软负载队列长度获取队列突变信息,可通过队列突变信息对软负载资源进行动态扩容或缩容。It is understandable that if there is a large difference in the length of the soft load queue between the current moment and the entire previous time period, it means that the service request volume changes greatly, and the soft load needs to be expanded or reduced. Therefore, in the embodiment of the present invention, the queue mutation information is obtained according to the soft load queue lengths at multiple times, and the soft load resource can be dynamically expanded or reduced according to the queue mutation information.

S23:根据所述队列突变信息以软负载容器为单位对软负载资源进行处理;S23: Process soft load resources in units of soft load containers according to the queue mutation information;

可理解的是,对软负载资源的处理过程包括对软负载资源的扩容和缩容;对软负载资源的扩容指的是增加软负载容器,对软负载资源的缩容指的是减少软负载容器。It is understandable that the processing process of soft load resources includes expansion and reduction of soft load resources; expansion of soft load resources refers to adding a soft load container, and shrinking of soft load resources refers to reducing soft load. container.

在实际应用中,如果需要进行弹性扩缩则宿主Master节点给数据中心软负载资源池发出弹性扩缩指令进行软负载扩缩容并记录该弹性扩缩事件。如果数据中心软负载资源池不能满足弹性扩展所需要的资源需求,则通知超级管理员对资源池进行扩展处理,并重新进行弹性调度。In practical applications, if elastic scaling is required, the host Master node sends an elastic scaling command to the data center soft load resource pool to perform soft load scaling and records the elastic scaling event. If the data center soft load resource pool cannot meet the resource requirements required for elastic expansion, the super administrator is notified to expand the resource pool and perform elastic scheduling again.

本发明实施例提供的基于容器云的软负载资源处理方法,基于容器化技术,整合底层资源,软负载服务与应用服务共享资源,提高了资源利用率;容器化软负载服务,弥补了现有技术不能快速部署软负载服务的缺陷,以软负载容器为单位自动对软负载资源进行动态扩容或缩容,减少系统因高并发高流量或突发流量而引起的业务中断。The container cloud-based soft load resource processing method provided by the embodiments of the present invention is based on containerization technology, integrates underlying resources, shares resources with soft load services and application services, and improves resource utilization; containerized soft load services make up for existing The technology cannot quickly deploy soft load services. It automatically expands or shrinks soft load resources dynamically in units of soft load containers, reducing system service interruptions caused by high concurrency and high traffic or burst traffic.

在本发明实施例的一种可选的实施方式中,与图2中的方法类似,根据所述多个时刻的软负载队列长度获取队列突变信息,包括:In an optional implementation manner of the embodiment of the present invention, similar to the method in FIG. 2 , obtaining queue mutation information according to the soft load queue lengths at the multiple times includes:

根据所述多个时刻的软负载队列长度获取第一队列突变因子和第二队列突变因子,所述第一队列突变因子为所述当前时刻之前的队列突变因子,所述第二队列突变因子为包括所述当前时刻的队列突变因子;The first queue mutation factor and the second queue mutation factor are obtained according to the soft load queue lengths at the multiple moments, the first queue mutation factor is the queue mutation factor before the current moment, and the second queue mutation factor is Including the queue mutation factor at the current moment;

根据所述第一队列突变因子和所述第二队列突变因子的差值获取队列突变信息。Cohort mutation information is acquired according to the difference between the mutation factor of the first cohort and the mutation factor of the second cohort.

具体地,根据如下公式获取所述第一队列突变因子:Specifically, the first cohort mutation factor is obtained according to the following formula:

Figure BDA0001316854870000081
Figure BDA0001316854870000081

根据如下公式获取所述第二队列突变因子:The second cohort mutation factor is obtained according to the following formula:

Figure BDA0001316854870000082
Figure BDA0001316854870000082

其中,ε1表示第一队列突变因子,ε2表示第二队列突变因子;n表示获取的软负载队列长度的个数;x表示所述当前时刻的软负载队列长度,xi表示距离当前时刻相差i的软负载队列长度。Among them, ε1 represents the mutation factor of the first queue, ε2 represents the mutation factor of the second queue; n represents the number of acquired soft load queue lengths; x represents the soft load queue length at the current moment, and x i represents the difference i from the current moment. soft load queue length.

举例来说,当前时刻为12点,获取12点、11点和10点三个时刻对应的软负载队列的长度。根据第一队列突变因子的计算公式计算得到不包括当前时刻12点的队列突变因子,根据第二队列突变因子的计算公式计算得到包括当前时刻12点的队列突变因子。For example, the current time is 12 o'clock, and the lengths of the soft load queues corresponding to the three times of 12 o'clock, 11 o'clock and 10 o'clock are obtained. The queue mutation factor excluding the current time 12 o'clock is calculated according to the calculation formula of the first queue mutation factor, and the queue mutation factor including the current time 12 o'clock is calculated according to the calculation formula of the second queue mutation factor.

进一步地,所述根据所述队列突变信息以软负载容器为单位对软负载资源进行处理,包括:Further, the processing of soft load resources in units of soft load containers according to the queue mutation information includes:

若所述第二队列突变因子与所述第二队列突变因子的差大于第一预设阈值,则对软负载资源以软负载容器为单位进行扩容;If the difference between the mutation factor of the second queue and the mutation factor of the second queue is greater than a first preset threshold, the soft load resource is expanded in units of soft load containers;

若所述第一队列突变因子与所述第二队列突变因子的差大于第一预设阈值,则对软负载资源以软负载容器为单位进行缩容;If the difference between the mutation factor of the first queue and the mutation factor of the second queue is greater than a first preset threshold, shrink the soft load resource in units of soft load containers;

进一步地,当所述第一队列突变因子与所述第二队列突变因子的差的绝对值小于第一预设阈值时,所述方法还包括:Further, when the absolute value of the difference between the mutation factor of the first cohort and the mutation factor of the second cohort is less than a first preset threshold, the method further includes:

根据当前时刻的软负载队列长度、并发量和响应时间获取资源处理的权重值;Obtain the weight value of resource processing according to the soft load queue length, concurrency and response time at the current moment;

若所述资源处理的权重值大于第二预设阈值时,则对软负载资源以软负载容器为单位进行扩容;If the weight value of the resource processing is greater than the second preset threshold, expand the soft load resource in units of soft load containers;

若所述资源处理的权重值小于第三预设阈值时,则对软负载资源以软负载容器为单位进行缩容。If the weight value of the resource processing is smaller than the third preset threshold, the soft load resource is scaled down in units of soft load containers.

需要说明的是,本发明实施例的并发量指的是正在处理的并发请求的个数。It should be noted that the concurrency in the embodiment of the present invention refers to the number of concurrent requests being processed.

可理解的是,当根据队列突变因子判断获知软负载队列没有发生突变,则根据当前时刻的软负载队列长度、并发量和响应时间对软负载资源进行处理。It is understandable that, when it is determined according to the queue mutation factor that there is no mutation in the soft load queue, the soft load resource is processed according to the soft load queue length, concurrency and response time at the current moment.

具体地,所述根据当前时刻的软负载队列长度、并发量和响应时间获取资源处理的权重值,包括:Specifically, obtaining the weight value of resource processing according to the soft load queue length, concurrency and response time at the current moment includes:

根据当前时刻的软负载队列长度并发量和响应时间分别获取所述当前时刻的软负载队列长度的程度系数、所述并发量的程度系数和所述响应时间的程度系数;Obtain the degree coefficient of the soft load queue length at the current moment, the degree coefficient of the concurrency amount, and the degree coefficient of the response time, respectively, according to the soft load queue length concurrency and the response time at the current moment;

根据所述当前时刻的软负载队列长度的程度系数、所述并发量的程度系数和所述响应时间的程度系数获取资源处理的权重值。The weight value of resource processing is obtained according to the degree coefficient of the soft load queue length at the current moment, the degree coefficient of the concurrency amount, and the degree coefficient of the response time.

在实际应用中,获取上述三个指标的程度系数需要根据赋值参考表进行赋值,此操作可以针对不同的应用场景和时间段,动态化的由管理员分配。赋值参考表如表1所示:In practical applications, obtaining the degree coefficients of the above three indicators needs to be assigned according to the assignment reference table. This operation can be dynamically assigned by the administrator for different application scenarios and time periods. The assignment reference table is shown in Table 1:

表1赋值参考表Table 1 Assignment reference table

极端重要extremely important 强烈重要strongly important 明显重要obviously important 99 77 55

根据赋值参考表进行归一化处理,得出上述三个指标对应的程度系数。xi_norm即为指标的程度系数,具体的计算方法如下:Perform normalization processing according to the assignment reference table to obtain the degree coefficients corresponding to the above three indicators. x i_norm is the degree coefficient of the index, and the specific calculation method is as follows:

Figure BDA0001316854870000101
Figure BDA0001316854870000101

其中xi表示赋值参考表中的第i项的值。where x i represents the value of the i-th item in the assignment reference table.

举例来说,当前时刻软负载队列长度为10,并发量为100;响应时间为30(单位为ms)根据相对应的重要程度,获取上述三个指标的程度系数。(假设队列长度的重要程度:9;并发量的重要程度:7;响应时间的重要程度:5)。For example, at the current moment, the soft load queue length is 10, the concurrency is 100, and the response time is 30 (unit is ms). According to the corresponding importance degree, the degree coefficients of the above three indicators are obtained. (Assume the importance of queue length: 9; the importance of concurrency: 7; the importance of response time: 5).

因此,当前时刻软负载队列长度的程度系数为9/21;并发量的程度系数为7/21;响应时间的程度系数为5/21。三者相加得出一个值。以这个值与上下限阈值对比。Therefore, the degree coefficient of the soft load queue length at the current moment is 9/21; the degree coefficient of the concurrency is 7/21; and the degree coefficient of the response time is 5/21. Add the three to get a value. Compare this value with the upper and lower thresholds.

在实际应用中,可根据实际的运行状况,经过多次实验,得出最合适的上下限阈值,也可以根据软负载需求,由管理员手动指定上下限阈值。In practical applications, the most appropriate upper and lower thresholds can be obtained after many experiments according to the actual operating conditions, or the administrator can manually specify the upper and lower thresholds according to the soft load requirements.

在实际应用中,通过调用硬负载接口,来更新后端的软负载实例。先启动软负载实例和加载信息,再更新硬负载信息,保证业务接入时,无感知。In practical applications, the backend soft load instance is updated by calling the hard load interface. Start the soft load instance and load information first, and then update the hard load information to ensure that there is no perception when the service is accessed.

本发明实施例结合容器化技术,对底层资源进行整合,软负载服务和应用服务共享资源池,最大化利用数据中心的资源,减少资源的浪费和冗余,提升数据中心的资源使用率。对于数据中心的容器云环境,具有较好的推广价值。对软负载服务进行容器化,可以实现软负载资源的动态扩展和弹性伸缩能力,能够有效提升数据中心的响应时间,针对大流量和大并发业务,能够快速的进行对软负载资源进行伸缩。并通过两级判断机制,对软负载使用情况进行综合考虑,加入队列变异因子,能够对软负载状态进行更加准确的判断,实现细粒度的弹性扩缩资源,在大规模生产环境下具有较强的实践价值。The embodiment of the present invention combines the containerization technology to integrate the underlying resources, the soft load service and the application service share the resource pool, maximize the utilization of the resources of the data center, reduce the waste and redundancy of resources, and improve the resource utilization rate of the data center. For the container cloud environment of the data center, it has good promotion value. Containerizing soft-load services can realize dynamic expansion and elastic scaling of soft-load resources, effectively improve the response time of data centers, and quickly scale soft-load resources for large traffic and large concurrent services. And through the two-level judgment mechanism, the soft load usage is comprehensively considered, and the queue variation factor is added, which can make more accurate judgments on the soft load status, realize fine-grained elastic scaling of resources, and have strong performance in large-scale production environments. practical value.

图4是本发明一个实施例的基于容器云的软负载资源处理装置的结构示意图。如图4所示,该实施例的装置包括软负载队列长度获取单元41、队列突变信息获取单元42和处理单元43,具体地:FIG. 4 is a schematic structural diagram of a container cloud-based soft load resource processing apparatus according to an embodiment of the present invention. As shown in FIG. 4 , the apparatus of this embodiment includes a soft load queue length acquisition unit 41, a queue mutation information acquisition unit 42 and a processing unit 43, specifically:

软负载队列长度获取单元41,用于获取软负载资源池的多个时刻的软负载队列长度,所述多个时刻的软负载队列长度中至少包括当前时刻的软负载队列长度;The soft load queue length obtaining unit 41 is configured to obtain the soft load queue lengths at multiple moments of the soft load resource pool, and the soft load queue lengths at the multiple moments include at least the soft load queue length at the current moment;

队列突变信息获取单元42,用于根据所述多个时刻的软负载队列长度获取队列突变信息;a queue mutation information acquisition unit 42, configured to acquire queue mutation information according to the soft load queue lengths at the multiple moments;

处理单元43,用于根据所述队列突变信息以软负载容器为单位对软负载资源进行处理。The processing unit 43 is configured to process soft load resources in units of soft load containers according to the queue mutation information.

本发明实施例提供的基于容器云的软负载资源处理装置,基于容器化技术,整合底层资源,软负载服务与应用服务共享资源,提高了资源利用率;容器化软负载服务,弥补了现有技术不能快速部署软负载服务的缺陷,以软负载容器为单位自动对软负载资源进行动态扩容或缩容,减少系统因高并发高流量或突发流量而引起的业务中断。The container cloud-based soft load resource processing device provided by the embodiments of the present invention is based on containerization technology, integrates underlying resources, shares resources with soft load services and application services, and improves resource utilization; the containerized soft load service makes up for existing The technology cannot quickly deploy soft load services. It automatically expands or shrinks soft load resources dynamically in units of soft load containers, reducing system service interruptions caused by high concurrency and high traffic or burst traffic.

进一步地,队列突变信息获取单元42包括:Further, the queue mutation information acquisition unit 42 includes:

队列突变因子获取模块,用于根据所述多个时刻的软负载队列长度获取第一队列突变因子和第二队列突变因子,所述第一队列突变因子为所述当前时刻之前的队列突变因子,所述第二队列突变因子为包括所述当前时刻的队列突变因子;a queue mutation factor acquisition module, configured to acquire a first queue mutation factor and a second queue mutation factor according to the soft load queue lengths at the multiple moments, where the first queue mutation factor is the queue mutation factor before the current moment, The second cohort mutation factor is the cohort mutation factor including the current moment;

队列突变信息获取模块,用于根据所述第一队列突变因子和所述第二队列突变因子的差值获取队列突变信息。A queue mutation information acquisition module, configured to acquire queue mutation information according to the difference between the first queue mutation factor and the second queue mutation factor.

本发明实施例的基于容器云的软负载资源处理装置可以用于执行上述方法实施例,其原理和技术效果类似,此处不再赘述。The container cloud-based soft load resource processing apparatus according to the embodiment of the present invention can be used to execute the foregoing method embodiments, and the principles and technical effects thereof are similar, and details are not described herein again.

图5是本发明一个实施例的电子设备的结构示意图。FIG. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.

参照图5,电子设备包括:处理器(processor)51、存储器(memory)52和总线53;其中,5, the electronic device includes: a processor (processor) 51, a memory (memory) 52 and a bus 53; wherein,

处理器51和存储器52通过总线53完成相互间的通信;The processor 51 and the memory 52 communicate with each other through the bus 53;

处理器51用于调用存储器52中的程序指令,以执行上述各方法实施例所提供的基于容器云的软负载资源处理方法。The processor 51 is configured to call program instructions in the memory 52 to execute the container cloud-based soft load resource processing methods provided by the above method embodiments.

此外,上述的存储器52中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。In addition, the above-mentioned logic instructions in the memory 52 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes .

本实施例提供一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,计算机能够执行上述各方法实施例所提供的基于容器云的软负载资源处理方法。This embodiment provides a computer program product, the computer program product includes a computer program stored on a non-transitory computer-readable storage medium, the computer program includes program instructions, and when the program instructions are executed by a computer, the computer program The container cloud-based soft load resource processing method provided by the above method embodiments can be executed.

本实施例提供一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令使所述计算机执行上述各方法实施例所提供的基于容器云的软负载资源处理方法。This embodiment provides a non-transitory computer-readable storage medium, where the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions cause the computer to execute the container cloud-based storage medium provided by the above method embodiments. Soft load resource processing method.

本发明实施例提供的基于容器云的软负载资源处理方法及装置,获取软负载资源池的多个时刻的软负载队列长度,所述多个时刻的软负载队列长度中至少包括当前时刻的软负载队列长度;根据所述多个时刻的软负载队列长度获取队列突变信息;根据所述队列突变信息以软负载容器为单位对软负载资源进行处理。本发明实施例基于容器化技术,整合底层资源,软负载服务与应用服务共享资源,提高了资源利用率;容器化软负载服务,弥补了现有技术不能快速部署软负载服务的缺陷,以软负载容器为单位自动对软负载资源进行动态扩容或缩容,减少系统因高并发高流量或突发流量而引起的业务中断。The container cloud-based soft load resource processing method and device provided by the embodiments of the present invention acquire soft load queue lengths at multiple times in the soft load resource pool, and the soft load queue lengths at multiple times include at least the soft load queue length at the current moment. Load queue length; obtain queue mutation information according to the soft load queue lengths at the multiple times; process soft load resources in units of soft load containers according to the queue mutation information. The embodiment of the present invention is based on the containerization technology, integrates the underlying resources, the soft load service and the application service share resources, and improves the resource utilization rate; the containerized soft load service makes up for the defect of the existing technology that cannot quickly deploy the soft load service, and uses the soft load service. The load container automatically expands or shrinks the soft load resources dynamically on a unit basis, reducing system service interruptions caused by high concurrency and high traffic or burst traffic.

本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.

本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block in the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device produce Means for implementing the functions specified in a flow or flow of a flowchart and/or a block or blocks of a block diagram.

需要说明的是术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that the terms "comprising", "comprising" or any other variation thereof are intended to cover a non-exclusive inclusion such that a process, method, article or device comprising a series of elements includes not only those elements, but also includes no explicit Other elements listed, or those inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.

本发明的说明书中,说明了大量具体细节。然而能够理解的是,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。类似地,应当理解,为了精简本发明公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释呈反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。In the description of the present invention, numerous specific details are set forth. It will be understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description. Similarly, it is to be understood that in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together into a single embodiment in order to simplify the present disclosure and to aid in the understanding of one or more of the various aspects of the invention. , figures, or descriptions thereof. However, this method of disclosure should not be construed to reflect the intention that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.

以上实施例仅用于说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。The above embodiments are only used to illustrate the technical solutions of the present invention, but not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The recorded technical solutions are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions in the embodiments of the present invention.

Claims (7)

1. A soft load resource processing method based on a container cloud is characterized by comprising the following steps:
acquiring soft load queue lengths of a soft load resource pool at multiple moments, wherein the soft load queue lengths at the multiple moments at least comprise the soft load queue length at the current moment;
acquiring queue mutation information according to the soft load queue lengths at the multiple moments;
processing the soft load resources by taking the soft load container as a unit according to the queue mutation information;
wherein, the obtaining of the queue mutation information according to the soft load queue lengths at the multiple moments comprises:
acquiring a first queue mutation factor and a second queue mutation factor according to the soft load queue lengths at the multiple moments, wherein the first queue mutation factor is a queue mutation factor before the current moment, and the second queue mutation factor is a queue mutation factor including the current moment;
acquiring queue mutation information according to the difference value of the first queue mutation factor and the second queue mutation factor;
wherein the first queue mutation factor is obtained according to the following formula:
Figure FDA0002838794020000011
obtaining the second queue mutation factor according to the following formula:
Figure FDA0002838794020000012
wherein ε 1 represents a first cohort mutation factor and ε 2 represents a second cohort mutation factor; n represents the number of the obtained soft load queue lengths; x represents the soft load queue length at the current time, xiRepresenting the soft load queue length at a difference i from the current time.
2. The method according to claim 1, wherein the processing soft load resources in units of soft load containers according to the queue break information comprises:
if the difference between the second queue mutation factor and the second queue mutation factor is larger than a first preset threshold value, carrying out capacity expansion on the soft load resource by taking a soft load container as a unit;
and if the difference between the first queue mutation factor and the second queue mutation factor is larger than a first preset threshold value, carrying out capacity reduction on the soft load resource by taking a soft load container as a unit.
3. The method of claim 2, wherein when the absolute value of the difference between the first queue mutation factor and the second queue mutation factor is less than a first preset threshold, the method further comprises:
acquiring a weight value of resource processing according to the length, the concurrency quantity and the response time of the soft load queue at the current moment;
if the weight value of the resource processing is larger than a second preset threshold value, carrying out capacity expansion on the soft load resource by taking a soft load container as a unit;
and if the weight value of the resource processing is smaller than a third preset threshold value, carrying out capacity reduction on the soft load resource by taking a soft load container as a unit.
4. The method according to claim 3, wherein the obtaining the weight value of the resource processing according to the soft load queue length, the concurrency amount and the response time at the current time comprises:
respectively acquiring a degree coefficient of the soft load queue length, a degree coefficient of the concurrency amount and a degree coefficient of the response time at the current moment according to the concurrency amount and the response time of the soft load queue length at the current moment;
and acquiring a weight value of resource processing according to the degree coefficient of the soft load queue length at the current moment, the degree coefficient of the concurrency quantity and the degree coefficient of the response time.
5. A container cloud-based soft load resource processing apparatus, comprising:
a soft load queue length obtaining unit, configured to obtain soft load queue lengths at multiple times of a soft load resource pool, where the soft load queue lengths at the multiple times at least include a soft load queue length at a current time;
a queue mutation information obtaining unit, configured to obtain queue mutation information according to the soft load queue lengths at the multiple times;
the processing unit is used for processing the soft load resources by taking the soft load container as a unit according to the queue mutation information;
wherein the queue mutation information acquiring unit includes:
a queue mutation factor obtaining module, configured to obtain a first queue mutation factor and a second queue mutation factor according to the soft load queue lengths at the multiple times, where the first queue mutation factor is a queue mutation factor before the current time, and the second queue mutation factor is a queue mutation factor including the current time;
the queue mutation information acquisition module is used for acquiring queue mutation information according to the difference value of the first queue mutation factor and the second queue mutation factor;
wherein the first queue mutation factor is obtained according to the following formula:
Figure FDA0002838794020000031
obtaining the second queue mutation factor according to the following formula:
Figure FDA0002838794020000032
wherein ε 1 represents a first cohort mutation factor and ε 2 represents a second cohort mutation factor; n represents the number of the obtained soft load queue lengths; x represents the soft load queue length at the current time, xiIndicating the phase from the current timeThe soft load queue length of difference i.
6. An electronic device, comprising: a processor, a memory, and a bus; wherein,
the processor and the memory complete mutual communication through the bus;
the processor is configured to call program instructions in the memory to perform the container cloud based soft load resource handling method of any of claims 1-4.
7. A non-transitory computer readable storage medium storing computer instructions that cause the computer to perform the container cloud based soft load resource processing method of any one of claims 1-4.
CN201710428727.3A 2017-06-08 2017-06-08 Soft load resource processing method and device based on container cloud Active CN109040156B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710428727.3A CN109040156B (en) 2017-06-08 2017-06-08 Soft load resource processing method and device based on container cloud

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710428727.3A CN109040156B (en) 2017-06-08 2017-06-08 Soft load resource processing method and device based on container cloud

Publications (2)

Publication Number Publication Date
CN109040156A CN109040156A (en) 2018-12-18
CN109040156B true CN109040156B (en) 2021-06-22

Family

ID=64629200

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710428727.3A Active CN109040156B (en) 2017-06-08 2017-06-08 Soft load resource processing method and device based on container cloud

Country Status (1)

Country Link
CN (1) CN109040156B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112559173A (en) * 2020-12-07 2021-03-26 北京知道创宇信息技术股份有限公司 Resource adjusting method and device, electronic equipment and readable storage medium
CN113254152B (en) * 2021-05-18 2024-09-13 北京金山云网络技术有限公司 Service deployment method and device, electronic equipment and storage medium
CN115190015B (en) * 2022-07-12 2025-05-06 中国工商银行股份有限公司 Soft load system configuration method, device, computer equipment and storage medium
CN115225577B (en) * 2022-09-20 2022-12-27 深圳市明源云科技有限公司 Data processing control method and device, electronic equipment and readable storage medium
CN115883357A (en) * 2022-11-24 2023-03-31 中国光大银行股份有限公司 Soft load server processing method and device, electronic equipment and medium
CN116708297B (en) * 2023-05-31 2024-06-11 杭州复恒科技有限公司 Cross-platform server flow resource adjusting method, system and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103095846A (en) * 2013-02-02 2013-05-08 深圳先进技术研究院 A method and a system of user personalized scheduling of cloud calculation resources
CN104104551A (en) * 2013-04-02 2014-10-15 中国移动通信集团公司 Cloud resource requirement assessment method and device
CN105975340A (en) * 2016-03-24 2016-09-28 国云科技股份有限公司 A Virtual Machine Application Allocation and Deployment Algorithm
CN106528266A (en) * 2016-10-28 2017-03-22 柏域信息科技(上海)有限公司 Resource dynamic adjustment method and device in cloud computing system
CN106534318A (en) * 2016-11-15 2017-03-22 浙江大学 OpenStack cloud platform resource dynamic scheduling system and method based on flow affinity
CN106603661A (en) * 2016-12-14 2017-04-26 国云科技股份有限公司 Dynamic resource balance scheduling method suitable for cloud platform

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9854045B2 (en) * 2015-04-13 2017-12-26 Sap Se Generic cloud enabling of stateful applications

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103095846A (en) * 2013-02-02 2013-05-08 深圳先进技术研究院 A method and a system of user personalized scheduling of cloud calculation resources
CN104104551A (en) * 2013-04-02 2014-10-15 中国移动通信集团公司 Cloud resource requirement assessment method and device
CN105975340A (en) * 2016-03-24 2016-09-28 国云科技股份有限公司 A Virtual Machine Application Allocation and Deployment Algorithm
CN106528266A (en) * 2016-10-28 2017-03-22 柏域信息科技(上海)有限公司 Resource dynamic adjustment method and device in cloud computing system
CN106534318A (en) * 2016-11-15 2017-03-22 浙江大学 OpenStack cloud platform resource dynamic scheduling system and method based on flow affinity
CN106603661A (en) * 2016-12-14 2017-04-26 国云科技股份有限公司 Dynamic resource balance scheduling method suitable for cloud platform

Also Published As

Publication number Publication date
CN109040156A (en) 2018-12-18

Similar Documents

Publication Publication Date Title
CN109040156B (en) Soft load resource processing method and device based on container cloud
EP3467652B1 (en) Data balancing method and device
CN112445615B (en) A thread scheduling system, computer device and storage medium
CN108182105B (en) Local dynamic migration method and control system based on Docker container technology
CN111078363A (en) NUMA node scheduling method, device, equipment and medium for virtual machine
WO2020134364A1 (en) Virtual machine migration method, cloud computing management platform, and storage medium
CN105471985A (en) Load balance method, cloud platform computing method and cloud platform
CN103593242A (en) Resource sharing control system based on Yarn frame
CN104834569A (en) Cluster resource scheduling method and cluster resource scheduling system based on application types
Wang et al. Ada-Things: An adaptive virtual machine monitoring and migration strategy for internet of things applications
CN103905472B (en) A kind of cloud storage method and system accessed by webpage mode
CN102868763A (en) Energy-saving dynamic adjustment method of virtual web application cluster in cloud computing environment
CN105530306A (en) Hyper-converged storage system supporting data application service
CN104375897A (en) Cloud computing resource scheduling method based on minimum relative load imbalance degree
WO2018086467A1 (en) Method, apparatus and system for allocating resources of application clusters under cloud environment
CN106095531A (en) A kind of dispatching method of virtual machine loaded based on grade and physical machine in cloud platform
CN110442454B (en) Resource scheduling method and device and computer equipment
CN104021029A (en) Spatial information cloud computing system and implementing method thereof
CN106936882A (en) A kind of electronic article transaction system
CN112905334A (en) Resource management method, device, electronic equipment and storage medium
CN108089918A (en) A kind of figure computational load equalization methods towards heterogeneous server structure
CN103067486A (en) Big-data processing method based on platform-as-a-service (PaaS) platform
CN106156049A (en) A kind of method and system of digital independent
CN104519082B (en) A kind of expansion method and device of cloud computing
CN107528871A (en) Data analysis in storage system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: No. 19, Jiefang East Road, Hangzhou, Zhejiang Province, 310016

Patentee after: CHINA MOBILE GROUP ZHEJIANG Co.,Ltd.

Patentee after: CHINA MOBILE COMMUNICATIONS GROUP Co.,Ltd.

Address before: No. 19, Jiefang East Road, Hangzhou, Zhejiang Province, 310016

Patentee before: CHINA MOBILE GROUP ZHEJIANG Co.,Ltd.

Patentee before: CHINA MOBILE COMMUNICATIONS Corp.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20231220

Address after: No. 19, Jiefang East Road, Hangzhou, Zhejiang Province, 310016

Patentee after: CHINA MOBILE GROUP ZHEJIANG Co.,Ltd.

Patentee after: China Mobile (Zhejiang) Innovation Research Institute Co.,Ltd.

Patentee after: CHINA MOBILE COMMUNICATIONS GROUP Co.,Ltd.

Address before: No. 19, Jiefang East Road, Hangzhou, Zhejiang Province, 310016

Patentee before: CHINA MOBILE GROUP ZHEJIANG Co.,Ltd.

Patentee before: CHINA MOBILE COMMUNICATIONS GROUP Co.,Ltd.