A disk dynamic allocation method for IPTV CDN containerized streaming application
By introducing the business management module and disk monitoring module into the IPTV CDN container push application, the problem of dynamic disk configuration and expansion is solved, the disk utilization and read performance are improved, and the dynamic allocation and expansion of container disks are realized.
Patent Information
- Application Number
- CN202210936761.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-05
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2042-08-05
AI Technical Summary
The IPTV CDN containerized push application cannot dynamically configure the disk serial number of the physical machine, resulting in low disk utilization and the inability to dynamically expand or recycle disks, affecting reading performance and storage capabilities.
Using the business management module, business image warehouse module, CDN virtualization management module, disk information storage module, disk allocation module and disk monitoring module, the disk information is initialized through the server disk monitoring program to realize dynamic allocation and monitoring of the disk to ensure the maximum storage capacity of the disk. utilization.
It achieves dynamic allocation and expansion of container disks, improves disk utilization, reduces human intervention, enhances disk allocation and recycling efficiency, and meets business needs.
Smart Images

Figure CN115357186B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of IPTV CDN container disk management, and in particular to a disk dynamic allocation method for an IPTV CDN containerized streaming application. Background Art
[0002] There are a lot of data reading interactions between CDN and users in the IPTV industry, pushing video data to actual set-top box users, and video data is stored in various disks. Whether it is a physical disk or a virtual disk, CDN applications have high requirements for disk reading performance and storage space. In the scenario where the physical server carries CDN business, the number of common CDN streaming servers is greater than 24, and the disk configuration of each application is completed when the application is initialized. If a disk fails, the application adjustment configuration needs to be manually checked and then the relevant configuration is updated. The time and resources consumed during this period are beyond the control of maintenance personnel. The same problem also exists in the CDN application container environment, and it also brings new problems. The dynamic expansion and contraction of the disk of the CDN streaming application mainly has the following two aspects:
[0003] 1. Containerized streaming applications cannot know and cannot dynamically configure the disk serial number of the physical machine. Docker is a widely used container operation technology. The image files required by applications running on this basic environment are generally provided directly by the image repository. For large-scale application clusters, the basic configuration of the same container application is the same. However, for CDN streaming applications, when the same host runs multiple streaming containers, assuming that the initial disk requires 2 disks, and the disk serial numbers of the container applications are configured as disk 1 and disk 2, then similar applications on the host will use these two disks, causing disk 1 and disk 2 to be busy reading and writing, while the remaining disks are idle. On the other hand, for the scenario where multiple applications are running on the same physical machine, the corresponding disk serial number cannot be dynamically configured, and the maximum utilization of the disk cannot be achieved, and the CPU and network bandwidth capabilities of the host cannot be maximized.
[0004] 2. Containerized streaming applications cannot dynamically expand / reclaim disk configuration. As the application running time and the number of users covered increase, the available disk space continues to decrease. When the disk storage alarm threshold (for example, 90%) is reached, if the disk cannot be dynamically expanded, the application reading will be limited by the disk space. Even if the application can dynamically delete data through the program, as the number of supported users increases and the usage time increases, the disk reading performance will decrease and the problem of being unable to store more content will arise. Moreover, for online applications, in an IPTV cluster, the number of CDN streaming applications involved is often hundreds or thousands. Manually expanding the disk is often time-consuming and labor-intensive, and may also bring some hidden dangers of configuration omissions, duplications, and errors.
[0005] At the same time, in a containerized environment, for CDN scenarios, the system business pressure is uneven. During peak user periods, more disks need to be configured to save more video files. During off-peak user periods, some disks need to be recycled to facilitate the use of other applications. However, common CDN container application solutions cannot dynamically expand / recycle disks, and cannot efficiently and reasonably utilize each disk resource. Summary of the invention
[0006] 1. Technical issues to be resolved
[0007] In view of the above-mentioned deficiencies in the prior art, the present invention provides a method for dynamically allocating disks for an IPTV CDN containerized streaming application, comprising establishing a business management module, a business image warehouse module and CDN virtualization management, wherein the disk information storage module is responsible for maintaining and storing basic disk information; the disk allocation module is responsible for allocating container disks; the disk monitoring module is responsible for monitoring the status of container disks, and identifying and recycling abnormal disks, thereby more completely ensuring the stability of container disk operation; the server disk monitoring program is responsible for entering disk information during server initialization and installation, and performing subsequent disk abnormality monitoring. The method for dynamically allocating disks for an IPTV CDN containerized streaming application proposed by the present invention supports virtualization work through CDN virtualization management, thereby solving the problem that common CDN container application solutions cannot dynamically expand / recycle disks, and cannot efficiently and reasonably utilize each disk resource.
[0008] (II) Technical solution
[0009] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0010] A method for dynamically allocating disks for an IPTV CDN containerized streaming application comprises the following steps:
[0011] Step S1: Establish a service management module to manage service container disks and issue run, restart and stop commands;
[0012] Step S2: Establish a business image warehouse module to generate and store business images, from the original code to the generated image and storage, and then pull the image file by each expanded container disk;
[0013] Step S3: Establish a CDN virtualization management module to perform CDN virtualization management, including:
[0014] Step S31: Establish a disk information storage module to maintain and store basic disk information;
[0015] Step S32: Establish a disk allocation module to be responsible for allocating disk storage areas;
[0016] Step S33: Establishing a disk monitoring module, specifically including:
[0017] Step S3111: establishing a container disk monitoring program to monitor the status of the container disk, the processing after the disk is abnormal, and the disk recovery;
[0018] Step S3112: Establish a server disk monitoring program, which is responsible for entering disk information during server initialization and installation, and performing subsequent disk abnormality monitoring;
[0019] Step S34: Establish other virtualization resource management modules.
[0020] Furthermore, in step S32, the calculation method of disk allocation is as follows:
[0021] The first step is to determine whether the server status satisfies SS=1;
[0022] The second step is to ensure that the disk container usage difference UD is 0. If UD=0, there is no deviation in the disk container, and the disk container usage allocation is performed; if UD≠0, set the disk status query flag DSQ=1, call the service disk monitoring program, scan the disk in multiple processes, and report the status to the disk information storage module. After completion, count again whether UD is equal to 0. If it is not equal to 0, determine whether the DSQ value reaches the query number threshold, the number of retries and the waiting time. If DSQ reaches the threshold, end the allocation task and return the result of allocation failure. If DSQ does not reach the threshold, continue to query. When UD=0, the subsequent normal disk allocation process is carried out.
[0023] Furthermore, in the above second step, determine whether the total number of server disks DTN - the number of available server disks DSN - the number of used server disks DUN is equal to 0. If not equal to 0, determine whether the value of DSQ reaches the query number threshold, the number of retries and the waiting time. If DSQ reaches the threshold, end the task and return an abnormal result; if DSQ does not reach the threshold, continue to query; if DTN-DSN-DUN=0, establish the server available disk list DSI, and sort it from large to small according to the disk free space ratio FreePrc, so that it can finally meet the business container disk demand N.
[0024] Preferably, the value of the server status SS is 1 or 0, where 0 represents disabling and 1 represents enabling. Only when the value of the server status SS is 1, the container disk application will be allocated to the server host when it is scheduled to run for the first time;
[0025] Set the disk status value to 1 / 2 / 3 / 4, where 1 means free, 2 means in use, 3 means the disk space has reached the upper limit, and 4 means prohibited.
[0026] Furthermore, in step S3111, the container disk monitoring program includes daily business disk monitoring, abnormal disk monitoring and disk recovery monitoring.
[0027] The daily monitoring of the business disk updates the status of the disk used by the container to ensure that the disk is only used by itself.
[0028] The abnormal disk monitoring is to obtain the disk abnormality data of the CDN application through the interface. If there is feedback of disk abnormality, a new disk application process is carried out. If there is no abnormality, wait for the next execution cycle.
[0029] The disk recycling monitoring is to listen to the recycling instructions of the received business POD. After receiving the instructions, the disk details used by the current application are obtained, and the disk information storage module is requested to use the disk details used by the container. If the data is confirmed to be correct after comparison, the disk data is cleaned up; if a deviation is found after comparison, the used disk information returned by the business container is used as the basis for recycling, and other disks are processed by the server disk monitoring program.
[0030] In the above-mentioned disk dynamic allocation method for IPTV CDN containerized streaming application, disk containers can be allocated and used only if the following conditions are met:
[0031] a. SS = 1 on the server where the disk is located;
[0032] b. The server where the disk is located UD = 0;
[0033] c. The server where the disk is located DTN-DSN-DUN = 0;
[0034] d. The server DSN where the disk is located - the number of disks required N is greater than or equal to 0;
[0035] e. The status of the selected disk is status = 1.
[0036] The above-mentioned disk dynamic allocation method of the IPTV CDN containerized streaming application, the timing steps of the CDN virtualization management module are as follows:
[0037] ①. Server disk monitoring program to initialize the disk information after the server is installed;
[0038] ② The container disk monitoring program scans the local disk, confirms the available disk information and reports it;
[0039] ③. After confirming the available disk information, the disk allocation module requests to allocate the disk, and the disk allocation module and the disk information storage module perform disk allocation and result feedback;
[0040] ④. The disk information storage module writes status information to the used disk;
[0041] ⑤. When the disk monitoring module detects unavailable disk information, it reports the unavailable disk information and requests a new disk;
[0042] ⑥ For unavailable disks, the container disk monitoring program reports disk recovery instructions;
[0043] ⑦. Perform disk recycling.
[0044] Preferably, the server disk monitoring program runs on a physical machine.
[0045] (III) Beneficial effects
[0046] The present invention provides a disk dynamic allocation method for an IPTV CDN containerized streaming application. Compared with the prior art, the present invention has the following beneficial effects:
[0047] 1. The disk dynamic allocation method of the IPTV CDN containerized streaming application, when a business container needs a disk, can request it from the CDN virtualization management module, wherein the disk allocation module will screen the appropriate host and the corresponding disk quantity demand and return it to the container according to the server status SS (ServerStatus), disk usage difference UD (UsedDifference), server total disk DTN (DiskTotalNum), server used disk number DUN (DiskUsedNum), server available disk number DSN (DiskSurplusNum), server available disk list DSI (DiskSurplusInfo) and other information, and the corresponding disk serial number will be recorded and monitored in real time, so as to more effectively utilize each disk of the physical machine while meeting the business capability requirements.
[0048] 2. The disk dynamic allocation method of the IPTV CDN containerized streaming application is that the disk consumption of the container application changes with the business. When a new disk is needed or a disk is recycled, the container disk monitoring program can perform corresponding operations according to the relevant instructions of the application. Regarding capacity expansion, the disk allocation module of the container first applies for a disk, and then according to the disk information saved by the corresponding physical storage, after confirming that the allocated disk is not in use, it is allocated to the application that applies for the resource.
[0049] 3. The disk dynamic allocation method of the IPTV CDN containerized streaming application, through the corresponding disk recycling, after the business application releases a disk, the container's disk monitoring module obtains relevant data and starts to clean up the corresponding disk data. After completion, it is reported to the disk information storage module, and the disk information storage module uniformly manages the disk space to facilitate subsequent application for use by other applications. The disk monitoring program on the server will also recycle the disks that are abnormally used, and regenerate the disk status file, and report it to the disk information storage module to realize the use monitoring of container disks and physical disks.
[0050] 4. The disk dynamic allocation method of the IPTV CDN containerized streaming application can achieve the task of expanding the container disk in a relatively complete, safe and orderly manner through the disk allocation algorithm. At the same time, for the disk that needs to be recycled, the monitoring program module will report the corresponding data of the disk to the CDN virtualization management module, and recycle the hardware resources in time, which is conducive to the use of more business application containers and greatly enhances the efficiency of disk allocation, recycling and secondary utilization. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 This is a flowchart of the first operation of the IPTV CDN container proposed by the present invention;
[0052] Figure 2 This is a module composition structure diagram of the disk dynamic allocation method proposed by the present invention;
[0053] Figure 3 This is an operation sequence diagram of each module of the disk dynamic allocation method proposed by the present invention;
[0054] Figure 4 It is a disk information summary table of the present invention;
[0055] Figure 5 The server disk list of the present invention;
[0056] Figure 6 A flow chart of disk allocation for container application of the present invention;
[0057] Figure 7 A flow chart for selecting a host to run the container application of the present invention;
[0058] Figure 8 This is a flow chart of the operation of the container disk monitoring program of the present invention;
[0059] Fig. 9 This is a flow chart of the operation of the server disk monitoring program of the present invention;
[0060] Fig.10 This is a diagram showing the operation relationship of the CDN virtualization management module of the present invention;
[0061] Fig.11 This is a timing diagram of the CDN virtualization management module of the present invention;
[0062] Fig.12 A disk retry application disk interval time diagram is allocated for the present invention. DETAILED DESCRIPTION
[0063] The following is a clear and complete description of the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0064] See also Figure 1-2 The embodiment of the present invention provides a technical solution: a disk dynamic allocation method for an IPTV CDN containerized streaming application, specifically comprising the following steps:
[0065] Step S1: Establish a business management module, first perform full life cycle management on the business container disk, and issue run, restart and stop commands;
[0066] Step S2: Establish a business image warehouse module to generate and store business images, from the original code to the generated image and storage, and then pull the image file by each expanded container disk;
[0067] Step S3: Establish a CDN virtualization management module to perform CDN virtualization management, specifically including:
[0068] Step S31: Establish a disk information storage module to maintain and store basic disk information. The disk information storage module is mainly responsible for maintaining and storing basic disk information. Figure 4 Disk information summary table, Figure 5 Server disk details table, where the Server Status value in the disk information summary table is 0 / 1, 0 represents disabled, 1 represents enabled. Only when the server status is 1, the container application will be assigned to the host when it is scheduled to run for the first time. Figure 5 In the server disk details table shown, Status is the status of the disk, and its status value is 1 / 2 / 3 / 4, where 1 represents free, 2 represents used, 3 represents that the disk space has reached the upper limit, and 4 represents forbidden. Through this module, the streaming devices in the entire CDN system are associated with the disk information and saved for subsequent disk management.
[0069] Among them, Figure 4The disk information summary table shown has the following fields: ServerName is the name of the server (SN for short), DiskTotalNum is the total number of disks (DTN for short), DiskUsedNum is the number of used disks (DUN for short), DiskSurplusNum is the number of remaining disks (DSN for short), DiskUsedInfo is the details of the used disks (DUI for short), which stores the serial numbers of each used disk, and DiskSurplusInfo is the details of the remaining disks (DSI for short), which stores the serial numbers of each unused disk. Disk serial number, UsedDifference is the disk usage deviation (UD for short), the result is the total number of disks - the number of used disks - the number of unused disks (DTN-DUN-DSN), the result is 0 under normal circumstances. If the value is not 0, the disk data storage of the host is abnormal, and the subsequent business container will not be allocated to the host during scheduling. ServerStatus is the server status (SS for short), and its value is 0 / 1, 0 represents disabled, 1 represents enabled. Only when the server status is 1, the container application will be allocated to the host during the first scheduling. The other parameters are auxiliary parameters of this table.
[0070] like Figure 5 As shown, the server disk detail table mainly has the following fields: ServerName is the name of the server (SN for short), Disk is the disk serial number of the host, Used is the size of the used capacity of the disk, in bytes, Free is the remaining space of the disk, in bytes, UsedPec is the usage percentage of the disk, FreePec is the unused percentage of the disk, Status is the status of the disk, and its status values are 1 / 2 / 3 / 4, where 1 represents free, 2 represents used, 3 represents the disk space has reached the upper limit (full), and 4 represents forbidden (forbiden). The UserName parameter stores the container name of the disk being used. When the disk is idle, the value is empty by default.
[0071] Through disk information storage, all streaming devices in the entire CDN system are associated with disk information and saved for subsequent disk management;
[0072] Step S32: Establish a disk allocation module to be responsible for allocating disk storage areas. Figure 6 Container application disk allocation process and Figure 7The process of selecting a host for container application operation is as follows: after receiving the operation instruction from the business dispatch center, a server will be allocated for use first, and the selection will be made based on the host status (SS) and the number of available server disks (DSN) in the disk information storage module, where SS=1, DSN>N (N is the disk requirement). Only the host that meets the business requirements will be allocated for container operation. After the host selection is completed, the disk will be allocated. Combined with the server status SS (ServerStatus), the difference in the number of used disks UD (UsedDifference), the total number of server disks DTN (DiskTotalNum), the number of used disks on the server DUN (DiskUsedNum), the number of available server disks DSN (DiskSurplusNum), and the list of available server disks DSI (DiskSurplusInfo), a series of calculation methods are used to complete the selection and allocation of disks, and finally feedback to the business center for subsequent business application use;
[0073] Among them, the disk allocation calculation, the first step is to determine whether the server status satisfies SS=1. The second step is to ensure that the disk usage difference UD is 0. If UD=0, it means that the disk has no deviation and can proceed to the next step normally. If UD≠0, set the disk status query flag DSQ=1, call the service disk monitoring program, scan the disk in multiple processes, and report the status to the disk information storage module. After completion, count UD again to see if it is equal to 0. If it is not equal to 0, determine whether the DSQ value reaches the query number threshold, the number of retries and the waiting time (see the detailed process for details). Fig.12 Allocate disk retry waiting time, that is, the interval time for applying for disk). If DSQ reaches the threshold, the allocation task is terminated and the result of allocation failure is returned. If DSQ does not reach the threshold, the query is continued. When UD=0, the subsequent normal disk allocation process is carried out. DTN-DSN-DUN is used to determine whether the result is equal to 0, that is, whether the total number of disks-the number of disks available for use-the number of disks already in use is equal to 0, to ensure that the disk data is saved normally. Subsequently, according to the disk available information DSI and the disk available space ratio FreePrc, the disk is sorted from large to small to finally meet the business container disk demand N;
[0074] Step S33: Establishing a disk monitoring module, specifically including:
[0075] Step S3111: Establish a container disk monitoring program to monitor the status of the container disk, the processing after the disk is abnormal, and the disk recovery, so as to maintain the stability of the container disk application operation, wherein the container disk monitoring program includes daily monitoring of business disks, abnormal disk monitoring, and disk recovery monitoring;
[0076] Furthermore, the daily monitoring of business disks updates the status of the disks used by the container to ensure that the disks are only used by the container itself.
[0077] Furthermore, abnormal disk monitoring is to obtain disk abnormality data of CDN applications through the interface. If there is feedback of disk abnormality, a new disk application process will be carried out. If there is no abnormality, wait for the next execution cycle.
[0078] Furthermore, disk recycling monitoring listens to recycling instructions from business PODs. After receiving the instructions, it obtains the disk details used by the current application and requests the disk information storage module for the disk details used by the container. If the data is confirmed to be correct after comparison, the disk data is cleaned up. If a deviation is found after comparison, the used disk information returned by the business container is used as the basis for recycling. Other disks are handled by the server disk monitoring program.
[0079] For details on the daily monitoring of business disks, abnormal disk monitoring, and disk recovery monitoring, see Figure 8 The specific operation of the container disk monitoring program is as follows. First, click Start. The container disk monitoring program starts daily business disk monitoring, abnormal disk monitoring, and disk recovery monitoring. The daily business disk monitoring obtains the disk information used by the current business and observes whether it changes. When the disk does not change, the task ends directly and enters the next cycle. When the disk status changes, the data is written to the mounted disk. The data format is as follows:
[0080] Server_name:XX-AS01
[0081] Disk name:01
[0082] Status:2
[0083] Start time:202106010145601
[0084] User_name:pod_test01, the meanings of its fields are: Start_time is the start time of use, User_name is the name of the container using the disk, and it is executed regularly. If there is an update, it is updated, if there is no change, it remains unchanged, and then the monitoring task ends, and then enters the next cycle. Then the abnormal disk monitoring obtains the CON application disk monitoring interface to observe whether it is abnormal. When there is an unavailable disk (disk is unreadable and unwritable, etc.), the disk expansion demand is directly reported to the business scheduling center, and subsequent disk expansion operations are performed, and the next cycle is entered. In addition, when there is no abnormality, the monitoring task ends directly. Before entering the next cycle, the disk recycling monitoring will receive the recycling instruction from the business POD, and obtain the disk information used by the current business and the information stored in the disk information storage module for comparison. When the data is inconsistent, the disk serial number returned by the business POD is used for recycling (with deviation, it is recycled by the server disk monitoring program). When the data is consistent, the disk serial number returned by the business POD is used for recycling without deviation. Finally, after the disk data processing is completed, the disk status.txt file is updated, and the latest disk status is reported to the disk information storage module. Finally, the task is completed, and the result is reported to the back-end program, waiting for subsequent end-of-process instructions (POD destruction).
[0085] Step S3112: Establish a server disk monitoring program, which is responsible for entering disk information during server initialization and installation, performing subsequent disk abnormality monitoring, and running the server disk monitoring program on the physical machine. For detailed procedures, see Fig. 9 The server disk monitoring program process is as follows: click the Start button to perform the server initialization task (usually only executed once) and write data to the mounted disk. The data format is as follows:
[0086] Server_name:XX-AS01
[0087] Disk_name: 01
[0088] Status:1
[0089] Start_time:202106010145601
[0090] User_name: null, its initial status is 1, where 1 represents free, 2 represents used, 3 represents full, and 4 represents forbidden. After completion, the disk data is reported and saved by the disk information storage module. The disk monitoring module runs the second time that the POD of the disk has been deleted, which means that the disk can be recycled. After the recycling is completed, it enters the next timing cycle and continues to complete the next monitoring task;
[0091] Then, after multiple processes scan the status.txt status file in each disk, the task is completed. At the same time, the P0D list maintained by the following business platform and the disk information data belonging to the local machine in the disk information storage module are obtained and compared to observe whether there are any abnormalities. When there are no abnormalities, the current disk allocation is normal, the task is completed, and the next cycle is entered. When the data is inconsistent, the business platform is used as the basis, and the data of the disk belonging to the non-existent POD is deleted and the disk is recycled. After the recycling is completed, the disk status information is updated and reported to the disk information storage module for use by the new business POD needs. The task is completed and the next cycle is entered.
[0092] Finally, the disk information storage module, disk allocation module and disk monitoring module are interrelated to complete the disk allocation work together, and then combined with other virtualization resource management modules to support virtualization work. The module operation process is shown in Fig.10 The operation relationship of the CDN virtualization management module is as follows: first, the server disk monitoring program initializes the server disk information and reports it; then the container disk monitoring program scans the local disk, confirms the available disk information and reports it; the disk allocation module requests the allocation of the disk, and other virtualization resource management modules obtain other information; the disk allocation module feeds back the allocation status and results to the disk information storage module, and the disk information storage module writes the status information to the used disk; at the same time, the disk monitoring module reports the unavailable disk information and requests a new disk; when the POD task is completed, the disk recovery instruction is reported; and the disk recovery process is performed.
[0093] Working sequence Fig.11CDN virtualization management module timing diagram, first ① after the server is installed, the disk information is initialized, this step is completed by the server disk monitoring program; then, ② scan the local disk, confirm the available disk information and report it, this step is completed by the container disk monitoring program; ③ after confirming the available disk information, the disk allocation module requests to allocate the disk, and the disk allocation module and the disk information storage module perform disk allocation and result feedback; the container P0D container disk monitoring program and other virtualization resource management modules obtain other information; ④ the disk information storage module writes status information to the used disk, such as Disk 01, Disk 02, Disk 03...Disk n; ⑤ when the disk monitoring module monitors the unavailable disk information, it reports the unavailable disk information and requests a new disk; ⑥ when the POD task is completed, the container disk monitoring program reports the disk recovery instruction for the unavailable disk; ⑦ perform disk recovery processing.
[0094] First, the containerized streaming application can obtain and dynamically configure the disk serial number of the physical machine. This method has three device roles: physical machine, business management center and business container server. During initialization, the server disk monitoring program will initialize the device disk information and report it to the disk information storage module. When the business management center issues a running instruction, the generated business container will be sent to the CDN virtualization management module to obtain which physical machines' disk serial numbers can be used. Dynamic configuration rather than fixed configuration can effectively complete disk allocation, and there is no need to fully allocate the required disks when the business container is executed for the first time, resulting in low disk utilization. The disk serial number can be obtained and the disk can be dynamically configured according to business needs. This method is conducive to container applications using the number of disks that meet business needs.
[0095] Second, containerized streaming applications support dynamic expansion of disk configuration. In addition to the disks requested when the container application is executed for the first time, dynamic expansion is supported during subsequent business operations without manual intervention. The main information involved includes: server status SS (ServerStatus), disk usage difference UD (UsedDifference), total number of server disks DTN (DiskTotalNum), number of used server disks DUN (DiskUsedNum), number of available server disks DSN (DiskSurplusNum), server available disk list DSI (DiskSurplusInfo), server status query DSQ (DiskStatusQuery), disk status Status, and disk free space percentage FreePrc (FP).
[0096] For a disk to be usable, it must meet the following conditions at the same time:
[0097] a. SS = 1 on the server where the disk is located;
[0098] b. The server where the disk is located UD = 0;
[0099] c. The server where the disk is located DTN-DSN-DUN = 0;
[0100] d. The server DSN where the disk is located minus the required number of disks N is greater than or equal to 0, that is, DSN–N ≥ 0;
[0101] e. The status of the selected disk is status = 1;
[0102] Disk allocation fails if any of the following conditions are met:
[0103] a. SS = 0 on the server where the disk is located;
[0104] b. The UD of the server where the disk is located is ≠ 0 and the disk status query flag is greater than the system configuration query upper limit;
[0105] c. The server DSN where the disk is located minus the disk requirement number N is less than 0, that is, DSN–N<0.
[0106] Through the disk allocation algorithm, the container disk expansion task can be achieved relatively completely, safely and orderly. At the same time, for disks that need to be recycled, the monitoring program module will report the corresponding data of the disk to the CDN virtualization management module, and recycle hardware resources in a timely manner, which is conducive to the use of more business application containers and greatly enhances the efficiency of disk allocation, recycling and secondary utilization.
[0107] Step S34: Establish other virtualized resource management modules to manage other resources.
[0108] The business management module, business image warehouse module and CDN virtualization management module mainly support the use of disks in various links. For detailed processes, see Figure 3 The specific operation sequence of each module is as follows: first click Start, the business management module issues the running command, obtains the business image through the business image warehouse module, and returns the image file to the CDN application service streaming server, then obtains virtualization-related information, disk, CPU and memory information through the disk information storage module, disk allocation module, disk monitoring module and other virtualization resource management modules in the CDN virtualization management module and returns the data to the CDN application service streaming server, then runs or does not run according to the resource situation, and ends. The CDN virtualization management module includes: disk information storage module, disk allocation module, disk monitoring module and other virtualization resource management modules
[0109] The detailed process of the first operation of the IPTVCDN container formed between the business management module, the business image warehouse module and the CDN virtualization management module is shown in Figure 1 The specific operations are as follows. First, click Start, and allocate a server through the business management module, issue instructions to run the CDN container, and manage the acquisition of the image through the business management module. If the image is successfully acquired, the disk configuration information and other information will be acquired, and the required information will be run and the results will be obtained until the required configuration for the operation is obtained. Start running the container (with CDN streaming capabilities), and after obtaining the disk configuration information, enter the CDN virtualization management module. When the image acquisition process and the required information acquisition process fail, it will automatically return to the business management module.
[0110] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0111] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for dynamically allocating disks for an IPTV CDN containerized streaming application, characterized in that: The following steps are involved: Step S1: Establish a service management module to manage service container disks and issue run, restart and stop commands; Step S2: Establish a business image warehouse module to generate and store business images, from the original code to the generated image and storage, and then pull the image file by each expanded container disk; Step S3: Establish a CDN virtualization management module to perform CDN virtualization management, including: Step S31: Establish a disk information storage module to maintain and store basic disk information; Step S32: Establish a disk allocation module to be responsible for allocating disk storage areas; Step S33: Establishing a disk monitoring module, specifically including: Step S3111: establishing a container disk monitoring program to monitor the status of the container disk, the processing after the disk is abnormal, and the disk recovery; Step S3112: Establish a server disk monitoring program, which is responsible for entering disk information during server initialization and installation, and performing subsequent disk abnormality monitoring; Step S34: establishing other virtualized resource management modules; In step S32, the calculation method of disk allocation is as follows: The first step is to determine whether the server status satisfies SS=1; The second step is to ensure that the disk container usage difference UD is 0. If UD=0, there is no deviation in the disk container, and the disk container usage allocation is performed; if UD≠0, set the disk status query flag DSQ=1, call the service disk monitoring program, scan the disk in multiple processes, and report the status to the disk information storage module. After completion, count again whether UD is equal to 0. If it is not equal to 0, determine whether the DSQ value reaches the query number threshold, the number of retries and the waiting time. If DSQ reaches the threshold, end the allocation task and return the result of allocation failure. If DSQ does not reach the threshold, continue to query. When UD=0, the subsequent normal disk allocation process is carried out; In the second step, determine whether the total number of server disks DTN - the number of available server disks DSN - the number of used server disks DUN is equal to 0. If not, determine whether the value of DSQ reaches the query number threshold, the number of retries and the waiting time. If DSQ reaches the threshold, end the task and return an abnormal result; if DSQ does not reach the threshold, continue the query; if DTN-DSN-DUN=0, create a server available disk list DSI, and sort them from large to small according to the disk free space ratio FreePrc, so that they can finally meet the business container disk demand N.
2. According to claim 1, a disk dynamic allocation method for an IPTV CDN containerized streaming application is characterized in that: The value of server status SS is 1 or 0, where 0 represents disabled and 1 represents enabled. Only when the value of server status SS is 1, the container disk application will be allocated to the server host during the first scheduling operation; Set the disk status value to 1 / 2 / 3 / 4, where 1 means free, 2 means in use, 3 means the disk space has reached the upper limit, and 4 means prohibited.
3. The method for dynamic disk allocation of an IPTV CDN containerized streaming application according to claim 1, characterized in that: In step S3111, the container disk monitoring program includes daily business disk monitoring, abnormal disk monitoring and disk recycling monitoring.
4. The method for dynamic disk allocation of an IPTV CDN containerized streaming application according to claim 3, characterized in that: The daily monitoring of the business disk updates the status of the disk used by the container to ensure that the disk is only used by itself.
5. The method for dynamic disk allocation of an IPTV CDN containerized streaming application according to claim 3, characterized in that: The abnormal disk monitoring is to obtain the disk abnormality data of the CDN application through the interface. If there is feedback of disk abnormality, a new disk application process is carried out. If there is no abnormality, wait for the next execution cycle.
6. The method for dynamic disk allocation of an IPTV CDN containerized streaming application according to claim 3, characterized in that: The disk recycling monitoring is to monitor the recycling instructions of the receiving business POD. After receiving the instructions, the disk details used by the current application are obtained, and the disk information storage module is requested to use the disk details used by the container. If the data is confirmed to be correct after comparison, the disk data is cleaned up; If a deviation is found after comparing the data, the used disk information returned by the business container will be used for recycling, and other disks will be processed by the server disk monitoring program.
7. The method for dynamic disk allocation of an IPTV CDN containerized streaming application according to claim 2, characterized in that: Disk containers can be allocated for use only if the following conditions are met: a. SS of the server where the disk is located = 1; b. UD of the server where the disk is located = 0; c. The server where the disk is located DTN-DSN-DUN = 0; d. The server DSN where the disk is located - the number of disks required N is greater than or equal to 0; e. The status of the selected disk is status = 1.
8. The method for dynamic disk allocation of an IPTV CDN containerized streaming application according to claim 1, characterized in that: The sequential steps of the CDN virtualization management module are as follows: ①. Server disk monitoring program to initialize the disk information after the server is installed; ② The container disk monitoring program scans the local disk, confirms the available disk information and reports it; ③. After confirming the available disk information, the disk allocation module requests to allocate the disk, and the disk allocation module and the disk information storage module perform disk allocation and result feedback; ④. The disk information storage module writes status information to the used disk; ⑤. When the disk monitoring module detects unavailable disk information, it reports the unavailable disk information and requests a new disk; ⑥ For unavailable disks, the container disk monitoring program reports disk recovery instructions; ⑦. Perform disk recycling.
Citation Information
Patent Citations
Visual block storage method and system for SW container platform
CN113849137A
Live broadcast data processing method, cloud platform, computer equipment and storage medium
CN114501052A
Application deployment in multi-cloud environment
US20210286638A1
Distributed database stored at an edge application
US20210304199A1
