WEB server configuration management method and related equipment

By separating the web server configuration into a main configuration file and an instance configuration file, and dynamically managing the updates of the configuration files, the problems of slow response and low efficiency in existing technologies are solved, achieving efficient configuration management and improved operational efficiency.

CN120881059APending Publication Date: 2025-10-31广州千阅传媒有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511048349.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-29
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

Existing web server configuration management suffers from slow response times and low efficiency. In particular, when microservice instances change frequently, reliance on manual operations leads to delayed configuration updates, making it unable to adapt to dynamic business needs.

Method used

The web server configuration is separated into a main configuration file and an instance configuration file. Dynamic management is achieved through variable association. Instance change events from the publishing platform are obtained, the updated configuration file is parsed and pushed, and the configuration is detected and rolled back to ensure timely updates of the configuration file.

Benefits of technology

It eliminates the response lag and configuration error risks of traditional manual configuration methods, improves the availability and operational efficiency of web services, and adapts to the efficient management of web server clusters as they expand.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120881059A_ABST
    Figure CN120881059A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to a WEB server configuration management method and related equipment, and the method comprises the steps: obtaining an instance change event of a publishing platform, and analyzing the content of the instance change event; determining an associated instance configuration file according to the service name in the instance change event; modifying the instance configuration file based on the instance change event to obtain an updated instance configuration file; determining an associated main configuration file according to the service name in the instance change event; determining an affected WEB server list according to the instance change event and the bound domain name; and pushing the updated instance configuration file to the affected WEB server. According to the method, dynamic management of configuration is achieved, the risks of response lag, configuration errors, inconsistent states and the like existing in a traditional manual configuration mode are eliminated, efficient configuration management capacity can be kept when the scale of a WEB server cluster is enlarged, and usability and operation and maintenance efficiency of WEB services are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information technology, and in particular to a web server configuration management method and related equipment. Background Technology

[0002] In the current internet technology architecture, backend services are generally deployed using microservices, and their lifecycle management is usually implemented by a dedicated deployment platform. However, the deployment platform can only complete basic operations such as starting, stopping, updating, and adding / deleting service instances. The complete service access chain also needs to solve the problem of service discovery. Service discovery for web services requires adding the IP and port information of the microservice instance to the web server's configuration file.

[0003] Existing web server configuration files are typically managed manually, which suffers from slow response times and low efficiency. When service instances change (e.g., adding or removing them), manual intervention is required to modify the configuration files (adding / deleting instance information) and execute the registration / deregistration process. This not only increases repetitive workload but also causes configuration updates to lag significantly behind instance changes. Especially in scenarios where instances need frequent scaling up or down, each change relies on manual intervention, resulting in a timeframe of minutes from instance adjustment to configuration taking effect, which cannot adapt to dynamic business needs. Summary of the Invention

[0004] To address the aforementioned technical problems, this invention provides a web server configuration management method and related equipment. By separating the web server configuration into a main configuration file and instance configuration files, and using variable association to achieve dynamic configuration management, the method eliminates the problems of slow response and low efficiency inherent in traditional manual configuration methods.

[0005] In a first aspect, embodiments of the present invention provide a web server configuration management method. The method includes:

[0006] Obtain instance change events from the publishing platform and parse the content of the instance change events;

[0007] The associated instance configuration file is determined based on the service name in the instance change event. The instance configuration file contains the service name, instance address, and load balancing policy. The instance configuration file is then modified based on the instance change event to obtain the updated instance configuration file.

[0008] The associated main configuration file is determined based on the service name in the instance change event. The main configuration file contains the bound domain name, listening port, logging rules, etc. The list of affected web servers is determined based on the instance change event and the bound domain name.

[0009] Push the updated instance configuration file to the affected web server.

[0010] In one implementation, pushing the updated instance configuration file to the affected web server includes:

[0011] The updated instance configuration file is pushed to the first servers in the list of affected web servers for configuration testing;

[0012] If the detection passes, the updated instance configuration file will be pushed to the remaining servers in the list of affected web servers;

[0013] If the test fails, the server will terminate the update and roll back the configuration to the version before this update.

[0014] In one implementation, if the detection fails, the server first terminates the update, rolls back the configuration to the version before the current update, and the method further includes:

[0015] A configuration error has been reported.

[0016] In one implementation, after pushing the updated instance configuration file to the affected web server, the method further includes:

[0017] If all affected web servers successfully reload their configurations, then update the synchronization configuration version number in the instance configuration file.

[0018] Secondly, embodiments of the present invention provide a web server configuration management system. The system includes:

[0019] The change event acquisition module is used to acquire instance change events from the publishing platform and parse the content of the instance change events.

[0020] The instance configuration file update module is used to determine the associated instance configuration file based on the service name in the instance change event. The instance configuration file includes the service name, instance address, and load balancing strategy. The instance configuration file is modified based on the instance change event to obtain the updated instance configuration file.

[0021] The server list determination module is used to determine the associated main configuration file based on the service name in the instance change event. The main configuration file includes the bound domain name, listening port, log rules, etc.; and to determine the list of affected web servers based on the instance change event and the bound domain name.

[0022] The push module is used to push the updated instance configuration file to the affected web server.

[0023] In one implementation, the push module includes:

[0024] The detection submodule is used to push the updated instance configuration file to the first servers in the list of affected web servers for configuration detection;

[0025] The push submodule is used to push the updated instance configuration file to the remaining servers in the list of affected web servers if the detection passes.

[0026] The "Terminate Update" submodule is used to terminate the update on the server and roll back the configuration to the version before this update if the detection fails.

[0027] In one embodiment, the system further includes:

[0028] The error reporting module is used to report configuration errors after the server first terminates the update and rolls back the configuration to the version before the current update if the detection fails.

[0029] In one embodiment, the system further includes:

[0030] The version update module is used to update the synchronization configuration version number of the instance configuration file after all the affected web servers have successfully reloaded their configurations.

[0031] Thirdly, the present invention provides an electronic device, the electronic device comprising:

[0032] At least one processor; and

[0033] A memory communicatively connected to the at least one processor; wherein,

[0034] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the above-described web server configuration management method.

[0035] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions that cause a processor to execute the above-described WEB server configuration management method.

[0036] In this embodiment, the process involves acquiring instance change events from the publishing platform and parsing their content; determining the associated instance configuration file based on the service name in the instance change event; modifying the instance configuration file based on the instance change event to obtain an updated instance configuration file; determining the associated main configuration file based on the service name in the instance change event; determining the list of affected web servers based on the instance change event and the bound domain name; and pushing the updated instance configuration file to the affected web servers. This achieves dynamic configuration management, eliminating the risks of response delays, configuration errors, and inconsistent states inherent in traditional manual configuration methods. Furthermore, it maintains efficient configuration management capabilities even as the web server cluster expands, significantly improving the availability and operational efficiency of web services. Attached Figure Description

[0037] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0038] Figure 1 This is a flowchart of a WEB server configuration management method provided in Embodiment 1 of the present invention;

[0039] Figure 2 This is a schematic diagram of the structure of a WEB server configuration management system provided in Embodiment 2 of the present invention;

[0040] Figure 3 This is a schematic diagram of the structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation

[0041] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0042] Figure 1 This is a flowchart of a web server configuration management method provided in Embodiment 1 of the present invention. This embodiment can be applied to a web server configuration management system, such as... Figure 1 As shown, this embodiment may include the following steps:

[0043] Step 101: Obtain the instance change event from the publishing platform and parse the content of the instance change event.

[0044] A microservice project deployment platform, or deployment platform, is a software delivery and operation management tool specifically designed to support microservice architectures. Its core objective is to achieve efficient, secure, and automated deployment and full lifecycle management of microservices. In this embodiment, a change event acquisition module can be embedded in the deployment platform, or a change event acquisition module with a long-lived connection to the deployment platform can be set up to obtain instance change events from the deployment platform in a timely manner.

[0045] After obtaining the instance change event, parse the content of the instance change event, including service name, instance identifier, port, change type, etc., to determine which instance of which service has undergone a change.

[0046] Step 102: Determine the associated instance configuration file based on the service name in the instance change event. The instance configuration file includes the service name, instance address, and load balancing strategy. Modify the instance configuration file based on the instance change event to obtain the updated instance configuration file.

[0047] After parsing the content of the instance change event, the associated instance configuration file is determined based on the service name. For example, the associated instance configuration file can be queried based on the service name in the event, such as the service name user-service corresponding to the instance configuration file user-service.conf.

[0048] The instance configuration file contains the service name, instance address, and load balancing policy. The instance configuration file establishes an association with the main configuration file through the service name, so that traffic from the domain name (managed by the main configuration file) is routed through the service name to the specific instance defined in the instance configuration file.

[0049] For example, the content of a certain instance configuration file can be:

[0050]

[0051] After determining the instance configuration file, modify the instance configuration file based on the instance change event to obtain the updated instance configuration file. For example, if the change type is instance expansion (service=pay, IP=192.168.1.10), then add a record to the instance configuration file, such as adding a line of instance information "server 192.168.1.10:8080", to obtain the updated instance configuration file.

[0052] Step 103: Determine the associated main configuration file based on the service name in the instance change event. The main configuration file includes the bound domain name, listening port, log rules, etc.; determine the list of affected web servers based on the instance change event and the bound domain name.

[0053] The main configuration file stores static configuration logic strongly associated with the domain name and does not contain specific instance information. Its core content includes the bound domain name, listening port, and logging rules. Corresponding instance configuration files can be associated with the main configuration file via the service name variable.

[0054] For example, the content of a main configuration file can be:

[0055]

[0056] After parsing the instance change event content, the associated main configuration file is determined based on the service name. For example, a pre-stored association table can be retrieved by service name to directly obtain a list of all main configuration files referencing that service name. Alternatively, all main configuration files can be traversed to check if there are forwarding rules referencing that service name (such as "proxy_pass http: / / $project_name" in the example main configuration file above), and the files containing references to that service name are selected as the associated main configuration files.

[0057] After determining the associated main configuration file, the list of affected web servers is determined based on the instance change events and the bound domain names. Specifically, parsing the change events clarifies which instance of which service underwent a change, the bound domain names are confirmed based on the content of the associated main configuration file, and the binding relationship between the domain names and servers is traced back in reverse order. Target servers are then selected based on the scope of the instance change's impact.

[0058] Step 104: Push the updated instance configuration file to the affected web servers.

[0059] In this step, the updated instance configuration file can be pushed to the first server in the list of affected web servers for configuration testing. If the test passes, the updated instance configuration file is pushed to the remaining servers in the list of affected web servers. If the test fails, the first server terminates the update and rolls back the configuration to the version before this update, that is, rolls back the configuration to the previous correct version.

[0060] If the test fails, the server will first terminate the update and roll back the configuration to the version before the update. The method may also include reporting the configuration error to remind relevant staff to correct the configuration.

[0061] In one embodiment, the method may further include:

[0062] Step 105: If all affected web servers successfully reload their configurations, update the synchronization configuration version number of the instance configuration file.

[0063] For example, if the synchronized configuration version number of the instance configuration file before the update is V2.0, and all the affected web servers have successfully reloaded their configurations, the synchronized configuration version number of the updated instance configuration file will be V2.1.

[0064] In this example, by separating the web server configuration into the main configuration file and instance configuration files, and using variable association to achieve dynamic configuration management, the risks of response delays, configuration errors, and inconsistent states that exist in traditional manual configuration methods are eliminated. It can also maintain efficient configuration management capabilities when the web server cluster scales up, significantly improving the availability and operational efficiency of web services.

[0065] Corresponding to the web server configuration management method in this invention, this invention also provides a web server configuration management system. Figure 2 This is a schematic diagram of the structure of a web server configuration management system. Figure 2 As shown, the web server configuration management system includes:

[0066] The change event acquisition module 201 is used to acquire instance change events from the publishing platform and parse the content of the instance change events.

[0067] The instance configuration file update module 202 is used to determine the associated instance configuration file based on the service name in the instance change event. The instance configuration file includes the service name, instance address, and load balancing strategy. The instance configuration file is modified based on the instance change event to obtain the updated instance configuration file.

[0068] The server list determination module 203 is used to determine the associated main configuration file based on the service name in the instance change event. The main configuration file includes the bound domain name, listening port, log rules, etc.; and to determine the list of affected web servers based on the instance change event and the bound domain name.

[0069] Push module 204 is used to push the updated instance configuration file to the affected web server.

[0070] In one embodiment, the push module 204 includes:

[0071] The detection submodule is used to push the updated instance configuration file to the first servers in the list of affected web servers for configuration detection;

[0072] The push submodule is used to push the updated instance configuration file to the remaining servers in the list of affected web servers if the detection passes.

[0073] The "Terminate Update" submodule is used to terminate the update on the server and roll back the configuration to the version before this update if the detection fails.

[0074] In one embodiment, the system further includes:

[0075] The error reporting module is used to report configuration errors after the server first terminates the update and rolls back the configuration to the version before the current update if the detection fails.

[0076] In one embodiment, the system further includes:

[0077] The version update module is used to update the synchronization configuration version number of the instance configuration file after all the affected web servers have successfully reloaded their configurations.

[0078] The WEB server configuration management system provided in this embodiment of the invention can execute the WEB server configuration management method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0079] Figure 3 A schematic diagram of an electronic device 30 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0080] like Figure 3 As shown, the electronic device 30 includes at least one processor 31 and a memory, such as a read-only memory (ROM) 32 or a random access memory (RAM) 33, communicatively connected to the at least one processor 31. The memory stores computer programs executable by the at least one processor. The processor 31 can perform various appropriate actions and processes based on the computer program stored in the ROM 32 or loaded from storage unit 38 into the RAM 33. The RAM 33 can also store various programs and data required for the operation of the electronic device 30. The processor 31, ROM 32, and RAM 33 are interconnected via a bus 34. An input / output (I / O) interface 35 is also connected to the bus 34.

[0081] Multiple components in electronic device 30 are connected to I / O interface 35, including: input unit 36, such as keyboard, mouse, etc.; output unit 37, such as various types of monitors, speakers, etc.; storage unit 38, such as disk, optical disk, etc.; and communication unit 39, such as network card, modem, wireless transceiver, etc. Communication unit 39 allows electronic device 30 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0082] Processor 31 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 31 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 31 performs the various methods and processes described above, such as web server configuration management methods.

[0083] In some embodiments, the web server configuration management method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 38. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 30 via ROM 32 and / or communication unit 39. When the computer program is loaded into RAM 33 and executed by processor 31, one or more steps of the web server configuration management method described above may be performed. Alternatively, in other embodiments, processor 31 may be configured to execute the web server configuration management method by any other suitable means (e.g., by means of firmware).

[0084] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0085] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0086] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0087] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0088] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0089] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0090] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0091] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A web server configuration management method, characterized in that, The method includes: Obtain instance change events from the publishing platform and parse the content of the instance change events; The associated instance configuration file is determined based on the service name in the instance change event. The instance configuration file contains the service name, instance address, and load balancing policy. The instance configuration file is then modified based on the instance change event to obtain the updated instance configuration file. The associated main configuration file is determined based on the service name in the instance change event. The main configuration file contains the bound domain name, listening port, logging rules, etc. The list of affected web servers is determined based on the instance change event and the bound domain name. Push the updated instance configuration file to the affected web server.

2. The method according to claim 1, characterized in that, The step of pushing the updated instance configuration file to the affected web server includes: The updated instance configuration file is pushed to the first servers in the list of affected web servers for configuration testing; If the detection passes, the updated instance configuration file will be pushed to the remaining servers in the list of affected web servers; If the test fails, the server will terminate the update and roll back the configuration to the version before this update.

3. The method according to claim 2, characterized in that, If the test fails, the server will first terminate the update and roll back the configuration to the version before this update. The method also includes: A configuration error has been reported.

4. The method according to any one of claims 1 to 3, characterized in that, After pushing the updated instance configuration file to the affected web servers, the method further includes: If all affected web servers successfully reload their configurations, then update the synchronization configuration version number in the instance configuration file.

5. A web server configuration management system, characterized in that, include: The change event acquisition module is used to acquire instance change events from the publishing platform and parse the content of the instance change events. The instance configuration file update module is used to determine the associated instance configuration file based on the service name in the instance change event. The instance configuration file includes the service name, instance address, and load balancing strategy. Modify the instance configuration file based on the instance change event to obtain the updated instance configuration file; The server list determination module is used to determine the associated main configuration file based on the service name in the instance change event. The main configuration file includes the bound domain name, listening port, log rules, etc. Determine the list of affected web servers based on the instance change event and the bound domain name; The push module is used to push the updated instance configuration file to the affected web server.

6. The system according to claim 5, characterized in that, The push module includes: The detection submodule is used to push the updated instance configuration file to the first servers in the list of affected web servers for configuration detection; The push submodule is used to push the updated instance configuration file to the remaining servers in the list of affected web servers if the detection passes. The "Terminate Update" submodule is used to terminate the update on the server and roll back the configuration to the version before this update if the detection fails.

7. The system according to claim 6, characterized in that, Also includes: The error reporting module is used to report configuration errors after the server first terminates the update and rolls back the configuration to the version before the current update if the detection fails.

8. The system according to any one of claims 5 to 7, characterized in that, Also includes: The version update module is used to update the synchronization configuration version number of the instance configuration file after all the affected web servers have successfully reloaded their configurations.

9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the WEB server configuration management method according to any one of claims 1-4.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that are used to cause a processor to execute the WEB server configuration management method according to any one of claims 1-4.