[go: up one dir, main page]

WO2018121334A1 - Procédé, appareil, dispositif électronique et système de fourniture de service d'application web - Google Patents

Procédé, appareil, dispositif électronique et système de fourniture de service d'application web Download PDF

Info

Publication number
WO2018121334A1
WO2018121334A1 PCT/CN2017/117081 CN2017117081W WO2018121334A1 WO 2018121334 A1 WO2018121334 A1 WO 2018121334A1 CN 2017117081 W CN2017117081 W CN 2017117081W WO 2018121334 A1 WO2018121334 A1 WO 2018121334A1
Authority
WO
WIPO (PCT)
Prior art keywords
web
container unit
web container
web application
application
Prior art date
Application number
PCT/CN2017/117081
Other languages
English (en)
Chinese (zh)
Inventor
付红波
Original Assignee
阿里巴巴集团控股有限公司
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 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2018121334A1 publication Critical patent/WO2018121334A1/fr

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/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; 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 OR CALCULATING; 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

Definitions

  • the present invention relates to the field of networks, and in particular, to a method, device, electronic device and system for providing a webpage application service.
  • the traditional scheme of using web hosting to provide web (Web) applications is: a virtual host server, which starts the web (web) server (apache, tomcat or IIS, etc.) software, and places dozens or even hundreds of virtual sites, virtual System resources and namespaces are shared between sites.
  • web server apache, tomcat or IIS, etc.
  • the program mainly has the following types of common problems:
  • Container technology can improve application availability and security isolation; container technology is deployed in the virtual machine (Virtual Machines, VM) application environment, deployed to Linux containers (Linux Container, LXC), Docker and other containers, so It can enhance the reliability of a single server system, but there are still many problems such as the server where the container is located, resulting in single point of failure, low resource utilization, long data migration time, and limited storage disk space.
  • VM Virtual Machines
  • LXC Linux Container
  • Docker Docker and other containers
  • the present application provides an access method, device, electronic device and system for providing a web application service, which can improve the reliability of a web application service.
  • a method of providing a web application service comprising:
  • the forwarding the access request to the selected web container unit includes:
  • the access request is forwarded according to the address of the host where the selected web container unit is located, and the port to which the selected web container unit is bound on the host.
  • the host machine is a virtual machine.
  • the plurality of web container units run on different hosts.
  • the web container unit corresponding to the same web application stores data in a directory corresponding to the web application in the network attached storage device.
  • the method further includes:
  • the monitoring data includes one or more of the following parameters of the web container unit:
  • the usage of the CPU of the CPU the usage of the memory, the maximum number of concurrent requests for access per unit time, and the number of access requests that exceed the preset threshold.
  • the adjusting the number of web container units corresponding to the web application according to the acquired monitoring data includes at least one of the following:
  • the number of web container units corresponding to the web application is reduced.
  • a method of providing a web application service comprising:
  • the monitoring data includes one or more of the following parameters of the web container unit:
  • the usage of the CPU of the CPU the usage of the memory, the maximum number of concurrent requests for access per unit time, and the number of access requests that exceed the preset threshold.
  • the adjusting the number of web container units corresponding to the web application according to the acquired monitoring data includes at least one of the following:
  • the number of web container units corresponding to the web application is reduced.
  • the increasing the number of web container units corresponding to the web application comprises:
  • Determining a host from a host in which the remaining resources are capable of creating at least one web container instructing the determined host to create a web container unit corresponding to the web application.
  • the reducing the number of web container units corresponding to the web application comprises:
  • Determining a web container unit from the web container unit corresponding to the web application, indicating that the host device where the determined web container unit is located deletes the web container unit corresponding to the web application.
  • a device for providing a web application service comprising:
  • a selection module configured to: after receiving a user access request for the webpage web application, select a web container unit from the web container unit corresponding to the web application; wherein the web container unit is configured to process the received access request ;
  • a forwarding module configured to forward the access request to the selected web container unit.
  • forwarding, by the forwarding module, the access request to the selected web container unit includes:
  • the forwarding module forwards the access request according to the address of the host where the selected web container unit is located, and the port to which the selected web container unit is bound on the host.
  • the plurality of web container units run on different hosts.
  • the storage directory of the web container unit corresponding to each web application is a directory corresponding to the web application in the network attached storage device.
  • the device further includes:
  • An obtaining module configured to acquire monitoring data of a web container unit corresponding to each webpage web application
  • the adjustment module is configured to adjust the number of web container units corresponding to the web application according to the acquired monitoring data.
  • the monitoring data includes one or more of the following parameters of the web container unit:
  • the usage of the CPU of the CPU the usage of the memory, the maximum number of concurrent requests for access per unit time, and the number of access requests that exceed the preset threshold.
  • the adjusting module adjusts, according to the acquired monitoring data, the number of web container units corresponding to the web application, including at least one of the following:
  • the adjustment module increases the number of the web container unit corresponding to the web application
  • the adjustment module reduces the number of web container units corresponding to the web application.
  • a device for providing a web application service comprising:
  • An obtaining module configured to acquire monitoring data of a web container unit corresponding to each webpage web application; wherein, one web application corresponds to one or more web container units, and the web container unit is configured to process an access request for the corresponding web application ;
  • the adjustment module is configured to adjust the number of web container units corresponding to the web application according to the acquired monitoring data.
  • the monitoring data includes one or more of the following parameters of the web container unit:
  • the usage of the CPU of the CPU the usage of the memory, the maximum number of concurrent requests for access per unit time, and the number of access requests that exceed the preset threshold.
  • the adjusting module adjusts, according to the acquired monitoring data, the number of web container units corresponding to the web application, including at least one of the following:
  • the adjustment module increases the number of the web container unit corresponding to the web application
  • the adjustment module reduces the number of web container units corresponding to the web application.
  • the adjusting module increases the number of web container units corresponding to the web application, including:
  • the adjustment module determines a host from a host in which the remaining resources are capable of creating the at least one web container, and instructs the determined host to create a web container unit corresponding to the web application.
  • the adjusting module reduces the number of web container units corresponding to the web application, including:
  • the adjustment module determines a web container unit from the web container unit corresponding to the web application, and indicates that the host device where the determined web container unit is located deletes the web container unit corresponding to the web application.
  • An electronic device for providing a webpage application service comprising: a first memory and a first processor;
  • the first memory is configured to save a program for providing a webpage application service, and the program for providing a webpage service, when being read and executed by the first processor, performs the following operations:
  • An electronic device for providing a web application service comprising: a second memory and a second processor;
  • the second memory is configured to save a program for providing a webpage application service, and the program for providing a webpage service, when being read and executed by the second processor, performs the following operations:
  • a system for providing web application services including:
  • One or more web container units are run on each of the host machines; the web container unit is configured to process an access request for the corresponding web application.
  • system further includes:
  • the access module is configured to: after receiving the user's access request for the webpage web application, select a web container unit from the web container unit corresponding to the web application; according to the address of the host where the selected web container unit is located, And the port to which the selected web container unit is bound on the host, forwarding the access request.
  • the host machine is a virtual machine.
  • the plurality of web container units correspond to different web applications.
  • system further includes:
  • the network attachment storage device is configured to store data of each web application in a directory corresponding to the web application, wherein the directory corresponding to each web application is respectively used as a storage directory of the web container unit corresponding to the web application.
  • system further includes:
  • a monitoring module configured to acquire monitoring data of a web container unit running in the host machine by using a monitoring agent in each host, and obtain monitoring data for each web container unit by using the access module;
  • the flexible scheduling module is configured to adjust the number of web container units corresponding to the web application according to the monitoring data of each web container unit.
  • the monitoring data includes one or more of the following parameters of the web container unit:
  • the usage of the CPU of the CPU the usage of the memory, the maximum number of concurrent requests for access per unit time, and the number of access requests that exceed the preset threshold.
  • the elastic scheduling module adjusts the number of web container units corresponding to the web application according to the acquired monitoring data, including at least one of the following:
  • the elastic scheduling module determines a host from the host where the remaining resources can create the at least one web container, and indicates the container agent on the determined host machine. Creating a web container unit corresponding to the web application on the host machine;
  • the elastic scheduling module determines a web container unit from the web container unit corresponding to the web application when the monitoring data of the web container unit corresponding to the web application meets the contraction condition, and indicates the host where the determined web container unit is located.
  • the container proxy on the host deletes the web container unit corresponding to the web application on the host.
  • At least one embodiment of the present application provides a service for each web application with multiple web container units, which can implement resource control and isolation between web servers, and does not affect each other, thereby improving the reliability of the web application service.
  • multiple web container units corresponding to one web application are distributed on different hosts, so that a single point of failure can be avoided.
  • the usage of the web container unit is monitored, and the number of web container units is automatically increased or decreased according to the monitoring data, thereby improving resource utilization.
  • the storage space and the performance expansion capability provided by the Network Attached Storage (NAS) technology can ensure high availability of user data and avoid the limitation of storage disk space. And no migration is required.
  • NAS Network Attached Storage
  • FIG. 1 is a flowchart of a method for providing a webpage application service according to Embodiment 1;
  • FIG. 2 is a flowchart of a method for providing a webpage application service according to Embodiment 2;
  • FIG. 3 is a schematic diagram of an apparatus for providing a webpage application service according to Embodiment 3;
  • FIG. 4 is a schematic diagram of an apparatus for providing a webpage application service according to Embodiment 4.
  • Figure 5 is a schematic diagram of the system in the example of the seventh embodiment.
  • Fig. 6 is a schematic diagram showing the operation of the application manager in the example of the seventh embodiment.
  • a computing device providing a web application service can include one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
  • RAM random access memory
  • ROM read only memory
  • Memory is an example of a computer readable medium.
  • the memory may include module 1, module 2, ..., module N (N is an integer greater than 2).
  • Computer readable media includes both permanent and non-permanent, removable and non-removable storage media, and information storage can be implemented by any method or technology.
  • the information can be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, disk storage or other magnetic storage devices or any other non-transportable media that can be used to store information that can be accessed by computing devices.
  • Computer-readable media does not include non-transitory computer readable media, such as modulated data signals and carrier waves.
  • Web application An application that can be accessed through the Web. Users only need to have a browser, no need to install other software.
  • Web container unit A container service process that allocates resources (such as CPU, memory, etc.) for processing user access requests to web applications; may be, but is not limited to, LXC, Docker and other container technologies; a web container unit Can be considered an instance of a web container.
  • a web application corresponds to one or more web container units, ie the one or more web container units process access requests for the web application.
  • Embodiment 1 A method for providing a webpage application service, as shown in FIG. 1, includes steps S110-S120:
  • each web application can be provided with multiple web container units to provide services, thereby achieving
  • Web server process control and isolation between processes does not affect each other, improving the reliability of Web application services.
  • the plurality of web container units when a web application corresponds to multiple web container units, when forwarding an access request for the web application, the plurality of web container units may be selected according to a predetermined load balancing policy.
  • each web container unit may be of a standard specification, that is, the resources (model, size, etc.) assigned to each web container unit may be the same.
  • steps S110-S120 may be performed by an access module of a web service connected to each host.
  • the forwarding the access request to the selected web container unit may include:
  • the access request is forwarded according to the address of the host where the selected web container unit is located, and the port to which the selected web container unit is bound on the host.
  • one or more web container units can be run on one host, and the web container unit can be bound to a port on the host.
  • each web container unit can be bound to a different port.
  • the domain name of each web application may be pre-stored, the address of the host where the corresponding web container unit is located, and the routing rule of the bound port, for example, the web application X corresponds to two web containers X1 and X2, wherein The address of the host where X1 is located is Add1, the port bound is PORT1, the address of the host where X2 is located is Add2, and the port bound is PORT2. If the domain name of Web application X is XDN, two files can be saved for Web application X. Routing rules:
  • Selecting a web container unit in step S110 can be regarded as selecting a routing rule that includes the domain name of the web application.
  • the address may be, but is not limited to, an IP address.
  • the forwarding may be performed by using other methods, such as saving the correspondence between the identifier of the web application and the access path of the web container unit, and forwarding the access request according to the access path of the selected web container unit.
  • the host may be, but is not limited to, a virtual machine.
  • the host machine can also be implemented using actual hardware, such as each host machine being a real server.
  • the plurality of web container units can run on different hosts.
  • the multiple web container units correspond to different web applications.
  • multiple web container units corresponding to one web application may be randomly distributed in the host machine; or, an upper limit of a web container unit corresponding to a web application on a host, such as two.
  • the web container unit corresponding to the same web application stores data in a directory corresponding to the web application in the NAS device.
  • the web container units corresponding to the same web application are all read and/or written in the same storage directory, so no data synchronization is required; since the NAS device can provide sufficient storage space, the storage disk is avoided. Space has limitations and no migration is required.
  • a storage directory may be set for each web application in the NAS device, and after creating a web container unit, the storage directory of the corresponding web application in the NAS device is mounted to the container storage directory; if a web container unit is deleted , deletes the storage directory of the web application mounted in the container storage directory.
  • the NAS device may be, but is not limited to, a cloud storage module, or a cloud disk.
  • system local disk or other external storage device may also be used for storage.
  • the method may further include:
  • the monitoring data may be acquired in real time, or the monitoring data may be acquired periodically.
  • the monitoring data can be monitored in real time, and the number of the web container units can be adjusted as soon as the monitoring data meets the predetermined conditions; the monitoring data can be periodically determined according to the monitoring data, and the number of the web container units can be adjusted accordingly.
  • acquiring the monitoring data may refer to a process of collecting monitoring data, or a process of receiving or reading the collected monitoring data.
  • the upper and lower limits of the number of Web container units corresponding to the web application may be preset, for example, at least one and at most five, and the upper limit or lower limit may not be exceeded during the adjustment.
  • the number of web container units corresponding to the web application may be set by the user; or the user may set whether to automatically adjust the number of web container units according to the monitoring data.
  • the monitoring data may include one or more of the following parameters of the web container unit:
  • the usage rate of the CPU the usage rate of the memory, the maximum number of concurrent access requests per unit time (that is, the number of access requests sent to the Web container unit per unit time), and the access request whose processing time exceeds a preset threshold (hereinafter referred to as The number of slow requests).
  • the usage rate of the CPU refers to the proportion of the CPU resources used by the Web container unit in the CPU resources allocated to the Web container unit; the memory usage rate refers to the memory resources used by the Web container unit, and is allocated. The proportion of memory resources given to the web container unit.
  • the usage rate of the CPU and the usage rate of the memory can be collected by the monitoring agent in each host, and the monitoring agent is used to collect the monitoring data of each web container unit running in the host machine.
  • the usage rate of the CPU and the usage rate of the memory may be real-time acquisition, or may be collected periodically, or monitored in real time, and then the average or highest usage rate in the cycle is used as the monitoring data.
  • the maximum number of concurrent access requests per unit time can be counted when the access request is forwarded.
  • the number of slow requests can also be counted by the part that forwards the access request.
  • the load of the web container unit is large, that is, the web corresponding to the web container unit is The application has insufficient processing power and needs to supplement the web container unit.
  • the usage rate of the CPU and the memory is low, or the maximum number of concurrent access requests per unit time is small, or the number of slow requests is small, the load of the web container unit is small, indicating that the web container unit corresponds to the web.
  • the application's processing power is excessive, and some resources are wasted, which can reduce the Web container unit.
  • the adjusting the number of Web container units corresponding to the web application according to the acquired monitoring data may include at least one of the following:
  • the number of web container units corresponding to the web application is reduced.
  • the expansion condition may be, but is not limited to, one or more of the monitoring data reaching the expansion threshold; the reduction condition may be, but is not limited to, one or more of the monitoring data reaching the reduction threshold.
  • different expansion thresholds and reduction thresholds can be adopted.
  • the monitoring data of each web container should be similar, and can be set to satisfy the expansion of any web container corresponding to a web application.
  • the condition is reduced, the number of web container units corresponding to the web application is increased/decreased.
  • it may be configured to increase/decrease the number of web container units corresponding to the web application when all web containers corresponding to one web application or monitoring data of a predetermined number of web containers satisfy the expansion/contraction condition.
  • the increasing the number of web container units corresponding to the web application may include:
  • Determining a host from a host in which the remaining resources are capable of creating at least one web container instructing the determined host to create a web container unit corresponding to the web application.
  • the web container unit is also added.
  • the reducing the number of web container units corresponding to the web application may include:
  • Determining a web container unit from the web container unit corresponding to the web application, indicating that the host device where the determined web container unit is located deletes the web container unit corresponding to the web application.
  • the web container unit is deleted, and the web container unit is deleted.
  • the web container unit can be created or deleted through the container proxy on the host machine.
  • Embodiment 2 A method for providing a webpage application service, as shown in FIG. 2, includes steps S210-S220:
  • S210 Obtain monitoring data of a web container unit corresponding to each web application, where one web application corresponds to one or more web container units, and the web container unit is configured to process an access request for the corresponding web application;
  • the usage of the web container unit is monitored, and the number of web container units is automatically increased or decreased according to the monitoring data, thereby improving resource utilization.
  • the storage directory of the web container unit corresponding to each web application may be a directory corresponding to the web application in the network attached storage device.
  • one web application may correspond to one or more web container units; when one web application corresponds to multiple web container units, the plurality of web container units may run on different hosts.
  • One host can run one or more web container units, each web container unit is bound to a port on the host machine, and the port bound to the different web container unit is different on the same host.
  • the monitoring data may include one or more of the following parameters of the web container unit:
  • the usage of the CPU of the CPU the usage of the memory, the maximum number of concurrent requests for access per unit time, and the number of access requests that exceed the preset threshold.
  • the adjusting the number of web container units corresponding to the web application according to the acquired monitoring data may include at least one of the following:
  • the number of web container units corresponding to the web application is reduced.
  • the increasing the number of web container units corresponding to the web application may include:
  • Determining a host from a host in which the remaining resources are capable of creating at least one web container instructing the determined host to create a web container unit corresponding to the web application.
  • the reducing the number of web container units corresponding to the web application may include:
  • Determining a web container unit from the web container unit corresponding to the web application, indicating that the host device where the determined web container unit is located deletes the web container unit corresponding to the web application.
  • the host machine can be, but is not limited to, a virtual machine.
  • Embodiment 1 For other implementation details in this embodiment, reference may be made to Embodiment 1.
  • Embodiment 3 A device for providing a webpage application service, as shown in FIG. 3, includes:
  • the selecting module 31 is configured to: after receiving the user's access request for the web application, select a web container unit from the web container unit corresponding to the web application; wherein the web container unit is configured to process the received access request ;
  • the forwarding module 32 is configured to forward the access request to the selected web container unit.
  • the selection module 31 is a part of the above device responsible for selecting a web container unit, and may be software, hardware, or a combination of the two.
  • the forwarding module 32 is the part of the above device that is responsible for forwarding the access request, and may be software, hardware, or a combination of the two.
  • the forwarding module forwarding the access request to the selected web container unit may include:
  • the forwarding module forwards the access request according to the address of the host where the selected web container unit is located, and the port to which the selected web container unit is bound on the host.
  • the host machine can be, but is not limited to, a virtual machine.
  • the plurality of web container units can run on different hosts.
  • the storage directory of the web container unit corresponding to each web application may be a directory corresponding to the web application in the network attached storage device.
  • the device may further include:
  • An obtaining module configured to acquire monitoring data of a web container unit corresponding to each webpage web application
  • the adjustment module is configured to adjust the number of web container units corresponding to the web application according to the acquired monitoring data.
  • the monitoring data may include one or more of the following parameters of the web container unit:
  • the usage of the CPU of the CPU the usage of the memory, the maximum number of concurrent requests for access per unit time, and the number of access requests that exceed the preset threshold.
  • the adjusting module may adjust the number of the web container units corresponding to the web application according to the acquired monitoring data, and may include at least one of the following:
  • the adjustment module increases the number of the web container unit corresponding to the web application
  • the adjustment module reduces the number of web container units corresponding to the web application.
  • Embodiment 4 A device for providing a webpage application service, as shown in FIG. 4, includes:
  • the obtaining module 41 is configured to acquire monitoring data of a web container unit corresponding to each webpage web application, where one web application corresponds to one or more web container units, and the web container unit is configured to process access to the corresponding web application. request;
  • the adjusting module 42 is configured to adjust the number of web container units corresponding to the web application according to the acquired monitoring data.
  • the obtaining module 41 is a part of the above device responsible for acquiring monitoring data, and may be software, hardware, or a combination of the two.
  • the adjustment module 42 is a part of the above device responsible for adjusting the number of web container units, and may be software, hardware, or a combination of the two.
  • the monitoring data may include one or more of the following parameters of the web container unit:
  • the usage of the CPU of the CPU the usage of the memory, the maximum number of concurrent requests for access per unit time, and the number of access requests that exceed the preset threshold.
  • the adjusting module according to the acquired monitoring data, adjusting the number of web container units corresponding to the web application may include at least one of the following:
  • the adjustment module increases the number of the web container unit corresponding to the web application
  • the adjustment module reduces the number of web container units corresponding to the web application.
  • the adjusting module increases the number of web container units corresponding to the web application, and the method includes:
  • the adjustment module determines a host from a host in which the remaining resources are capable of creating the at least one web container, and instructs the determined host to create a web container unit corresponding to the web application.
  • the adjusting module reduces the number of web container units corresponding to the web application, and the method includes:
  • the adjustment module determines a web container unit from the web container unit corresponding to the web application, and indicates that the host device where the determined web container unit is located deletes the web container unit corresponding to the web application.
  • Embodiment 5 An electronic device for providing a webpage application service, comprising: a first memory and a first processor;
  • the first memory is configured to save a program for providing a webpage application service, and the program for providing a webpage service, when being read and executed by the first processor, performs the following operations:
  • the operations performed correspond to steps S110-S120 in the first embodiment; other details of the operations performed by the program may be See example one.
  • Embodiment 6 The electronic device for providing a webpage application service, comprising: a second memory and a second processor;
  • the second memory is configured to save a program for providing a webpage application service, and the program for providing a webpage service, when being read and executed by the second processor, performs the following operations:
  • the operations performed correspond to steps S210 to S220 in the second embodiment; other details of the operations performed by the program may be See example two.
  • Embodiment 7 A system for providing a web application service, comprising:
  • One or more web container units are run on each of the host machines; the web container unit is configured to process an access request for the corresponding web application.
  • system may further include:
  • the access module is configured to: after receiving the user's access request for the webpage web application, select a web container unit from the web container unit corresponding to the web application; according to the address of the host where the selected web container unit is located, And the port to which the selected web container unit is bound on the host, forwarding the access request.
  • the host machine may be a virtual machine.
  • the plurality of web container units may correspond to different web applications.
  • system may further include:
  • the network attachment storage device is configured to store data of each web application in a directory corresponding to the web application, wherein the directory corresponding to each web application is respectively used as a storage directory of the web container unit corresponding to the web application.
  • system may further include:
  • a monitoring module configured to collect monitoring data of a web container unit running in the host machine by using a monitoring agent in each host, and obtain monitoring data for each web container unit by using the access module;
  • the flexible scheduling module is configured to adjust the number of web container units corresponding to the web application according to the monitoring data of each web container unit.
  • the monitoring data may include one or more of the following parameters of the web container unit:
  • the usage of the CPU of the CPU the usage of the memory, the maximum number of concurrent requests for access per unit time, and the number of access requests that exceed the preset threshold.
  • the elastic scheduling module adjusts the number of web container units corresponding to the web application according to the collected monitoring data, and may include at least one of the following:
  • the elastic scheduling module determines a host from the host where the remaining resources can create the at least one web container, and indicates the container agent on the determined host machine. Creating a web container unit corresponding to the web application on the host machine;
  • the elastic scheduling module determines a web container unit from the web container unit corresponding to the web application when the monitoring data of the web container unit corresponding to the web application meets the contraction condition, and indicates the host where the determined web container unit is located.
  • the container proxy on the host deletes the web container unit corresponding to the web application on the host.
  • the system of this embodiment may be used to implement the method of Embodiment 1 or 2.
  • each web application has a globally unique identifier APP_ID and a globally unique domain name: APP_DOMAIN_NAME; the user can access the corresponding web application through the domain name.
  • each web container unit can be the same, ie the web container unit is of standard specifications.
  • Each web container unit has a globally unique identifier: CONTAINER_ID.
  • Each web container unit is bound to at least one port on the VM that is the host of the web container unit: CONTAINER_PORT; which port of the web container unit is specifically bound to the VM can be set by itself. That is, the Web container unit runs separate Web service processes (such as apache, nginx, tomcat, etc.) and binds to independent ports (ie, CONTAINER_PORT, which is unique on the VM).
  • the scaling threshold is used to determine whether the resources in the Web container unit need to be adjusted, including the expansion threshold and the reduction threshold. Users can define different scaling thresholds for different web applications.
  • the VM is used as a host for running the web container unit, and has a certain computing resource CPU and storage resources (memory, disk).
  • One or more web container units can be run on each VM, the specific number being related to the resources of the VM itself and the resources allocated for the web container unit.
  • Each VM has a globally unique identifier VM_ID and an intranet IP address: VM_INNER_IP.
  • system running the method of this embodiment is as shown in FIG. 5, and may include:
  • Access module flexible scheduling module, monitoring module, and resource module of the web service
  • each virtual machine includes the following components:
  • Container Agent used to receive the expansion command and the shrink command from the flexible scheduling module, and start or stop the web container unit accordingly;
  • the usage rate of each resource (including at least CPU and memory in this example) provided by the Web container unit is counted and sent to the monitoring module as monitoring data.
  • One or more web container units are run in each virtual machine. For example, two web container units are running in the virtual machine 1 in FIG. 5, corresponding to the web application 1 and the web application 2 respectively; and two web container units are running in the virtual machine 2. Corresponding to Web Application 1 and Web Application 3, respectively.
  • each web container unit uses apache to provide a web service process.
  • the access module of the web service is configured to select a route according to a pre-configured load balancing policy in multiple web container units corresponding to the web application according to the domain name of the accessed web application after receiving the access request for the web application.
  • the rule forwards the access request; periodically counts the maximum number of concurrent and slow requests of each web container unit in a unit time, and reports the monitoring data to the monitoring module.
  • the monitoring module is configured to receive monitoring data from the access module and the monitoring agent of the web service, and store the monitoring data according to the web application, that is, the monitoring data of the web container unit corresponding to the same web application is summarized and saved as the web. Application monitoring data.
  • the flexible scheduling module is configured to traverse the monitoring data of each web application from the monitoring module, and send a capacity expansion or contraction instruction to the container agent of the corresponding VM according to the predetermined elastic scaling policy; and configure a routing rule for the WEB service access module.
  • the resource module is used to store resource information of each VM (such as the number of remaining resources, running several web container units, etc.), and information about the web container unit corresponding to each web application (such as the corresponding web application, the VM, and the bound port). Etc.) In this example, the VM resource information table and the Web container unit information table are respectively saved.
  • system may further include a cloud storage module (or cloud disk) adopting NAS technology for providing greater space storage capacity and performance expansion capability.
  • a cloud storage module or cloud disk
  • NAS technology for providing greater space storage capacity and performance expansion capability.
  • the elastic scaling policy may be determined according to the resource usage rate, the number of concurrent requests, and the number of slow requests (including not limited to the above three types of resources) of the Web container unit to determine whether the capacity expansion threshold or the shrinkage threshold is met. How to implement a scaling policy:
  • the capacity expansion threshold can be any of the following:
  • the number of slow requests is >100.
  • the shrinkage threshold can be any of the following:
  • the number of slow requests is ⁇ 10.
  • the flexible scheduling module can periodically check the web container unit corresponding to each web application, and determine whether the web container unit uses the resource expansion threshold or the capacity reduction, and correspondingly expands or shrinks the process.
  • Expansion process If the resource usage of a web container unit reaches the capacity expansion threshold, apply for the container resource from the resource module, obtain a new web container unit, allocate the VM's IP address and port (Port) for the web container unit, and then call the location.
  • the Container Agent on the assigned VM starts a new Web container unit, and mounts the storage directory of the corresponding Web application in the cloud storage module to the container storage directory, and then adds a new routing rule in the Web service access module.
  • the new routing rule is Route the domain name of the corresponding web application to the IP address and port of the VM where the new web container unit is located.
  • the sending process of the expansion instruction includes:
  • VM_INNER_IP may be found according to the VM_ID of the determined VM, and the expansion instruction is sent to the VM_INNER_IP.
  • the correspondence between the CONTAINER_ID and the VM_ID of the Web container unit is stored in the resource module.
  • the process of shrinking the volume If a web container unit reaches the shrinkage threshold, the routing rule for routing the domain name of the corresponding web application to the IP address and port of the VM where the web container unit is located is deleted from the web service access module (for the web) The application's new access request will no longer be routed to this web container unit. Then polling to determine that there is no running php process in this web container unit, stop the web container unit, release the related resources, and uninstall the web container unit. The container stores the directory where the web application is mounted. Finally, the IP address and port of the VM assigned to this web container unit are returned to the resource module.
  • the sending process of the contraction instruction includes:
  • the web container unit that reaches the shrinkage threshold is determined, and a shrinkage instruction is sent to the Container Agent of the VM where the web container unit is located.
  • the corresponding VM_ID may be found according to the determined CONTAINER_ID of the web container unit, the corresponding VM_INNER_IP is found according to the VM_ID, and the shrinking instruction is sent to the VM_INNER_IP.
  • the correspondence between the CONTAINER_ID and the VM_ID of the indented Web container unit is deleted in the resource module.
  • the application administrator first completes the website program by using the File Transfer Protocol (FTP) method or the flexible virtual host system in this example is opened to the application administrator's service or client. Upload the process and launch the website through the console.
  • Application visitors can enter the domain name of the web application (or click on the app on the mobile terminal) through the browser to access various services provided by the corresponding web application.
  • FTP File Transfer Protocol
  • the application administrator is generally the owner of the website, and has a website program, such as: source code (*.php file) or compiled file (*.class, *.jar, etc.) that can be run directly.
  • App visitors are generally web browsers and are people who can access the web through devices such as terminals.
  • the application administrator can monitor and set the system shown in Figure 5 through the web console, the application on the mobile terminal, and the desktop application.
  • the elastic policy is used to set the elastic policy, such as setting:
  • the application administrator can also configure the scheduling policy, which can be, but is not limited to, the following three types:
  • Normal mode You can specify a fixed number of web container units corresponding to the web application.
  • Real-time scheduling mode According to the monitoring data of each web container, it automatically expands and shrinks according to the predefined configuration policy without human intervention.
  • Scheduled scheduling mode The subscription configuration threshold is expanded and reduced during the scheduled time period to improve the reliability of the Web service. Revert to the default number of web container units outside of the appointment period.
  • the application administrator can also view the monitoring data of each web container unit according to the web container monitoring interface. For example but not limited to:
  • the total number of web containers allocated, monitoring data for each web container (such as resource usage, number of concurrent, slow requests, etc.).
  • the web container resources in the background can be dynamically expanded or reduced in time according to the actual website access volume, so that the website access is smooth, no human operation is required, and the website service can be guaranteed when the number of visits increases sharply.
  • High availability and economy you can shrink the number of Web container units when you have insufficient traffic to save money.
  • the application administrator can also receive the alarm message when the website runs abnormally in a timely manner through a predefined alarm policy, so that the emergency event can be handled in time.
  • the configurable attributes in the alarm policy can include: whether to enable alarm when expanding, whether to enable alarm when shrinking, alarm mode (mail, SMS, web console, etc.), web container resource usage alarm threshold (CPU range, memory range, concurrent number) Range, slow request range).

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 Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

La présente invention concerne un procédé, un appareil, un dispositif électronique et un système de fourniture de service d'application Web. Le procédé de fourniture de service d'application Web comprend les étapes consistant à : sélectionner, lorsqu'une demande d'accès pour une application de page Web (Web) par un utilisateur est reçue, une unité de conteneur Web à partir d'unités de conteneur Web correspondant à l'application Web, l'unité de conteneur Web étant utilisée pour traiter la demande d'accès reçue ; et transmettre la demande d'accès à l'unité de conteneur Web sélectionnée. La présente invention permet d'améliorer la fiabilité des services d'application Web.
PCT/CN2017/117081 2016-12-27 2017-12-19 Procédé, appareil, dispositif électronique et système de fourniture de service d'application web WO2018121334A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611228664.9A CN108243239A (zh) 2016-12-27 2016-12-27 一种提供网页应用服务的方法、装置、电子设备及系统
CN201611228664.9 2016-12-27

Publications (1)

Publication Number Publication Date
WO2018121334A1 true WO2018121334A1 (fr) 2018-07-05

Family

ID=62702845

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/117081 WO2018121334A1 (fr) 2016-12-27 2017-12-19 Procédé, appareil, dispositif électronique et système de fourniture de service d'application web

Country Status (2)

Country Link
CN (1) CN108243239A (fr)
WO (1) WO2018121334A1 (fr)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109981615A (zh) * 2019-03-12 2019-07-05 上海纽盾科技股份有限公司 基于区块链的防攻击系统及方法
CN111367678A (zh) * 2020-03-31 2020-07-03 中国工商银行股份有限公司 集群资源管理方法及系统
CN111831447A (zh) * 2020-07-16 2020-10-27 中国民航信息网络股份有限公司 一种基于性能监控的应用弹性扩容方法及装置
CN112306640A (zh) * 2020-11-12 2021-02-02 广州方硅信息技术有限公司 容器分配方法及其装置、设备、介质
CN112532669A (zh) * 2019-09-19 2021-03-19 贵州白山云科技股份有限公司 一种网络边缘计算方法、装置及介质

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109117149A (zh) * 2018-07-13 2019-01-01 下代互联网重大应用技术(北京)工程研究中心有限公司 一种行为分析系统部署方法及电子设备
CN109240799B (zh) * 2018-09-06 2022-04-15 福建星瑞格软件有限公司 大数据平台集群容灾方法、系统及计算机可读存储介质
CN109284275B (zh) * 2018-09-28 2021-03-09 苏州浪潮智能科技有限公司 一种云平台虚拟机文件系统监控方法和装置
CN112650552A (zh) * 2019-10-09 2021-04-13 中国电信股份有限公司 容器资源调度方法和装置
CN110888780A (zh) * 2019-11-19 2020-03-17 泰康保险集团股份有限公司 应用监控方法、装置、设备及存储介质
CN114385366B (zh) * 2022-01-14 2025-07-25 上海道客网络科技有限公司 容器云平台的容器组弹性扩容方法、系统、介质和设备
CN115145681A (zh) * 2022-06-14 2022-10-04 中电云数智科技有限公司 一种实现容器云集群指定容器缩容策略的方法及相关装置

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104580226A (zh) * 2015-01-15 2015-04-29 上海瀚之友信息技术服务有限公司 一种共享会话数据的系统和方法
CN106201819A (zh) * 2016-06-28 2016-12-07 乐视控股(北京)有限公司 应用容器引擎的系统资源占用量监控方法和装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6823331B1 (en) * 2000-08-28 2004-11-23 Entrust Limited Concept identification system and method for use in reducing and/or representing text content of an electronic document
CN101465866B (zh) * 2007-12-20 2013-01-02 上海盛娱网络科技有限公司 基于Web终端访问WAP网络的方法及转换模块
CN102681899B (zh) * 2011-03-14 2015-06-10 金剑 云计算服务平台的虚拟计算资源动态管理方法
CN103139183A (zh) * 2011-12-02 2013-06-05 电子科技大学 一种基于云平台的应用虚拟化技术
US10218633B2 (en) * 2014-03-28 2019-02-26 Amazon Technologies, Inc. Implementation of a service that coordinates the placement and execution of containers
CN105979009B (zh) * 2016-07-06 2019-05-17 乾云数创(山东)信息技术研究院有限公司 一种针对云应用容器的增加负载自动均衡方法

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104580226A (zh) * 2015-01-15 2015-04-29 上海瀚之友信息技术服务有限公司 一种共享会话数据的系统和方法
CN106201819A (zh) * 2016-06-28 2016-12-07 乐视控股(北京)有限公司 应用容器引擎的系统资源占用量监控方法和装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
SIJIN HE ET AL.: "Elastic Application Container: A Lightweight Approach for Cloud Resource Provisioning", 2012 26TH IEEE INTERNATIONAL CONFERENCE ON ADVANCED INFORMATION NETWORKING AND APPLICATIONS, 19 April 2012 (2012-04-19), XP032169603 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109981615A (zh) * 2019-03-12 2019-07-05 上海纽盾科技股份有限公司 基于区块链的防攻击系统及方法
CN109981615B (zh) * 2019-03-12 2023-11-14 上海纽盾科技股份有限公司 基于区块链的防攻击系统及方法
CN112532669A (zh) * 2019-09-19 2021-03-19 贵州白山云科技股份有限公司 一种网络边缘计算方法、装置及介质
CN111367678A (zh) * 2020-03-31 2020-07-03 中国工商银行股份有限公司 集群资源管理方法及系统
CN111367678B (zh) * 2020-03-31 2023-08-22 中国工商银行股份有限公司 集群资源管理方法及系统
CN111831447A (zh) * 2020-07-16 2020-10-27 中国民航信息网络股份有限公司 一种基于性能监控的应用弹性扩容方法及装置
CN111831447B (zh) * 2020-07-16 2024-04-30 中国民航信息网络股份有限公司 一种基于性能监控的应用弹性扩容方法及装置
CN112306640A (zh) * 2020-11-12 2021-02-02 广州方硅信息技术有限公司 容器分配方法及其装置、设备、介质

Also Published As

Publication number Publication date
CN108243239A (zh) 2018-07-03

Similar Documents

Publication Publication Date Title
WO2018121334A1 (fr) Procédé, appareil, dispositif électronique et système de fourniture de service d'application web
JP6669682B2 (ja) クラウドサーバスケジューリング方法及び装置
US10402231B2 (en) Adjusting variable limit on concurrent code executions
CN111796908B (zh) 一种资源自动弹性伸缩的系统、方法及云平台
US9959188B1 (en) Managing processor usage of a physical host configured for hosting computing instances
CN106489251B (zh) 应用拓扑关系发现的方法、装置和系统
US10104037B2 (en) Method and system for network access request control
US9600319B2 (en) Computer-readable medium, apparatus, and method for offloading processing from a virtual switch to a physical switch
US20070028239A1 (en) Dynamic performance management for virtual servers
CN105245373A (zh) 一种容器云平台系统的搭建及运行方法
CN113010818A (zh) 访问限流方法、装置、电子设备及存储介质
CN106911741B (zh) 一种虚拟化网管文件下载负载均衡的方法及网管服务器
CN111258627A (zh) 一种接口文档生成方法和装置
WO2017185615A1 (fr) Procédé de détermination d'état de service de dispositif de traitement de service et dispositif d'ordonnancement
CN106302640A (zh) 数据请求处理方法及装置
CN111726388A (zh) 一种跨集群高可用的实现方法、装置、系统及设备
CN105592134B (zh) 一种负载分担的方法和装置
US20170111240A1 (en) Service Elastic Method and Apparatus in Cloud Computing
CN105681266B (zh) 一种多媒体电话MMTel的通讯集群方法及装置
CN105897865A (zh) 一种协议无关的网络文件服务管理系统和方法
WO2020252724A1 (fr) Procédé et dispositif de traitement de journal et support d'informations lisible par ordinateur
CN107534678B (zh) 建立vnfm与vim之间的连接的方法、装置及系统
CN106375281A (zh) 一种报文控制方法和装置
US9720670B2 (en) Deploying software in a computer network
WO2015139635A1 (fr) Gestion de sessions d'accès

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17888115

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17888115

Country of ref document: EP

Kind code of ref document: A1