Dynamic routing forwarding system and method for bastion host resource access
By establishing a dynamic routing and forwarding system between bastion machines, the reuse of resource link objects and fault tolerance are realized, the problem of low operation and maintenance efficiency of bastion machines is solved, and the resource connection efficiency and operation and maintenance management capabilities are improved.
Patent Information
- Application Number
- CN202411009875.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-07-26
AI Technical Summary
The operation and maintenance efficiency of the fortress machine is low, which leads to high management difficulties and maintenance costs, and it is difficult to monitor and optimize resource allocation in real time.
A dynamic routing and forwarding system for bastion machine resource access is designed, including cluster deployment module, dynamic routing and forwarding module, link object management module and cluster monitoring module. By establishing a cluster between multiple bastion machines, the linked object life cycle is managed. Real-time monitoring of performance information, predict resource utilization, dynamically allocate resource link requests, and realize the reuse of resource link objects and fault tolerance.
It greatly shortens the time-consuming process of resource connection, improves resource connection efficiency, and displays the performance information of the bastion machine nodes in real time, which facilitates administrators to understand the cluster status and improves operation and maintenance efficiency and resource utilization.
Smart Images

Figure CN118945099A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of application software development, and in particular to a dynamic routing forwarding system and method for bastion host resource access. Background Art
[0002] With the rapid development of the Internet and digitalization, data leakage incidents have occurred frequently, and the information security risks faced by enterprises are increasing. As a special security protection tool, the bastion host can effectively protect the core data and business systems of enterprises and prevent data leakage and illegal access.
[0003] The bastion host can centrally manage multiple servers and applications, simplifying the management process and reducing the management difficulty and maintenance costs of the enterprise. At the same time, the bastion host can also record every user operation in detail, allowing administrators to fully view the user's operation trajectory, which is crucial for audit tracing, compliance inspection, and discovering potential security issues.
[0004] Currently, bastion hosts are widely used in scenarios such as the financial industry, government agencies, enterprises, and multi-cloud environments. How to improve the operation and maintenance efficiency of bastion hosts is a technical problem that needs to be solved. Summary of the invention
[0005] The technical task of the present invention is to address the above shortcomings and provide a dynamic routing forwarding system and method for bastion host resource access to solve the technical problem of how to improve the operation and maintenance efficiency of the bastion host.
[0006] In a first aspect, the present invention provides a dynamic routing forwarding system for bastion host resource access, including a cluster deployment module, a dynamic routing forwarding module, a link object management module, and a cluster monitoring module;
[0007] The cluster deployment module is used to establish a cluster between multiple bastion hosts, and the bastion host nodes, dynamic routing forwarding module, link object management module and cluster monitoring module are deployed in the same network;
[0008] The link object management module is used to manage the life cycle of the link object and store the link object information in the local cache;
[0009] The cluster monitoring module is used to receive performance information uploaded by the bastion host node and display the performance information through a visual interface, and return a cluster unique identifier to each bastion host;
[0010] The cluster monitoring module is used to receive the resource utilization rate of the bastion host node uploaded by the bastion host node, predict the resource utilization rate of the bastion host node in the future time period according to the resource utilization rate of the bastion host node, set the weight ratio of the bastion host node, and display the resource utilization rate and weight ratio of the bastion host node through a visual interface;
[0011] The cluster monitoring module is used to periodically send health check requests to the bastion host node, judge the operating status of the bastion host node based on the response of the bastion host node, and for the bastion host node in the downtime state, send a link object deletion request to the link object management module; correspondingly, based on the link object deletion request, the link object management module is used to delete the corresponding link object in the local cache;
[0012] The dynamic routing forwarding module is used to receive and parse the resource link request uploaded by the bastion host node, and send a link object acquisition request to the link object management module based on the parsing result of the resource link request. The link object management module is used to find the corresponding link object locally and return the link object information to the dynamic routing forwarding module. The dynamic routing forwarding module is used to send a bastion host resource utilization detection request to the cluster monitoring module. Based on the bastion host resource utilization detection request, the cluster monitoring module is used to return the link object information to the dynamic routing forwarding module based on the resource utilization of the bastion host node. The dynamic routing forwarding module is used to forward the resource link request to the specified bastion host node.
[0013] Preferably, after receiving the link object acquisition request sent by the dynamic routing forwarding module, the link object management module searches the local cache for the resource link object specified in the link object acquisition request. If the corresponding resource link object exists in the link object management module, the dynamic routing forwarding module is used to send a bastion host resource usage detection request to the cluster monitoring module. The cluster monitoring module performs screening based on the bastion host resource usage rate in a future predetermined time period and returns the final link object information to the dynamic routing forwarding module. The dynamic routing forwarding module is used to forward the resource link request to the specified bastion host node.
[0014] If the corresponding resource link object does not exist in the link object management module, the dynamic routing forwarding module is used to send a link object consultation request to the cluster monitoring module, the cluster monitoring module is used to query the currently available bastion host node based on the link object consultation request, and return the final link object information to the dynamic routing forwarding module, and the dynamic routing forwarding module is used to forward the resource link request to the specified bastion host node;
[0015] The link object information includes the access address of the bastion host node where the resource link object is located and the cluster unique identifier of the bastion host node.
[0016] Preferably, for different resource link objects, the link object management module is used to store the resource IP, resource access port number and resource account as key values in the local cache, and to add the key to the resource link object key list, which is a list constructed based on the cluster unique identifier of the bastion host where the resource link object is located;
[0017] After receiving the request to obtain the resource link object, the link object management module is used to search the corresponding resource link object from the local cache based on the resource IP, resource access port number and resource account, parse the access address of the bastion host where the resource link object is located and the cluster unique identifier of the bastion host where the resource link object is located, and return the access address of the bastion host where the resource link object is located and the cluster unique identifier of the bastion host where the resource link object is located to the dynamic routing forwarding module;
[0018] When the bastion host node uses an existing resource link object for resource connection, the bastion host node sends a resource link object time-limit update request to the link object management module. The resource link object time-limit update request carries the resource IP, resource access port number and resource account. The link object management module is used to obtain the resource link object through a mutex lock based on the resource IP, resource access port number and resource account, and extend the effective time of the resource link object in the cache;
[0019] When the bastion host node does not use the existing resource link object for resource connection, the bastion host node sends a resource link object timeliness update request to the link object management module. The resource link object timeliness request carries the resource IP, resource access port number, resource account, resource link object, and the cluster unique identifier of the bastion host where the resource link object is located. The link object management module is used to create or update the resource link object based on the resource IP, resource access port number and resource account by means of a mutex lock;
[0020] Based on the link object deletion request sent by the cluster performance monitoring module, the link object management module is used to parse the cluster unique identifier of the bastion host where the resource link object is located based on the link object deletion request, obtain the resource link object key list from the local cache according to the cluster unique identifier, and delete the resource link object information corresponding to each key one by one according to the resource link object key list.
[0021] Preferably, the cluster monitoring module is used to periodically send health check requests to the bastion host node, and judge the operating status of the bastion host node according to the response of the bastion host node. If the bastion host node responds within a predetermined time, the bastion host node is determined to be in a normal operating state. If the bastion host node does not respond within the specified time and exceeds the set number of retries, the bastion host node is determined to be in a down state, the weight ratio of the bastion host node is set to zero, and a link object deletion request is sent to the link object management module. The corresponding resource link object is deleted based on the cluster unique identifier specified in the link object deletion request. When the down bastion host node restarts to report its own resource utilization rate, the weight ratio of the bastion host node is reset.
[0022] Preferably, after receiving the request for detecting the resource utilization rate of the bastion host sent by the dynamic routing forwarding module, the cluster monitoring module is used to parse the cluster unique identifier of the bastion host node specified in the request for detecting the resource utilization rate of the bastion host, and obtain the resource utilization rate of the bastion host node in a future predetermined time period based on the cluster unique identifier. When the resource utilization rate does not exceed the maximum threshold, the cluster unique identifier of the bastion host node is returned to the dynamic routing forwarding module. When the resource utilization rate exceeds the maximum threshold, the bastion host nodes with sufficient resources are screened out according to the resource utilization rates and weight ratios of other bastion host nodes, and the cluster unique identifier and access address of the bastion host node are returned. When the cluster unique identifier of the bastion host node in the request for detecting the resource utilization rate of the bastion host is not parsed, the bastion host nodes with sufficient resources are screened out according to whether the resource utilization rate of the bastion host node exceeds the threshold and the weight ratio of the bastion host node, and the cluster unique identifier and access address of the bastion host node are returned.
[0023] In a second aspect, the present invention provides a dynamic routing forwarding method for bastion host resource access, which is used to implement dynamic routing forwarding for bastion host resource access through a dynamic routing forwarding system for bastion host resource access as described in any one of the first aspects, and the method includes the following steps:
[0024] Establish a cluster between multiple bastion hosts, and deploy the bastion host nodes, dynamic routing forwarding module, link object management module, and cluster monitoring module in the same network;
[0025] The link object management module manages the life cycle of the link object and stores the link object information in the local cache.
[0026] The cluster monitoring module receives the performance information uploaded by the bastion host node, displays the performance information through the visual interface provided by the cluster monitoring module, and returns a cluster unique identifier to each bastion host through the cluster monitoring module;
[0027] The cluster monitoring module receives the resource usage rate uploaded by the bastion host node, predicts the resource usage rate of the bastion host node in the future time period based on the resource usage rate of the bastion host node, sets the weight ratio of the bastion host node, and displays the resource usage rate and weight ratio of the bastion host node through a visual interface;
[0028] The cluster monitoring module periodically sends health check requests to the bastion host node, and determines the running status of the bastion host node based on the response of the bastion host node. For the bastion host node that is in a downtime state, a link object deletion request is sent to the link object management module. Based on the link object deletion request, the link object management module deletes the corresponding link object in the local cache;
[0029] For resource link requests uploaded by the bastion host node, the resource link requests uploaded by the bastion host node are parsed through the dynamic routing forwarding module, and a request to obtain the link object is sent to the link object management module based on the parsed result of the resource link request. The link object management module searches for the corresponding link object locally and returns the link object information to the dynamic routing forwarding module. A request to detect the resource usage rate of the bastion host is sent to the cluster monitoring module through the dynamic routing forwarding module. Based on the request to detect the resource usage rate of the bastion host, the cluster monitoring module returns the link object information to the dynamic routing forwarding module based on the resource usage rate of the bastion host node, and the resource link request is forwarded to the specified bastion host node through the dynamic routing forwarding module.
[0030] Preferably, after receiving the link object acquisition request sent by the dynamic routing forwarding module, the link object management module searches the local cache for the resource link object specified in the link object acquisition request. If the corresponding resource link object exists in the link object management module, a bastion host resource usage detection request is sent to the cluster monitoring module through the dynamic routing forwarding module. The cluster monitoring module performs screening based on the bastion host resource usage rate in a future predetermined time period and returns the final link object information to the dynamic routing forwarding module. The dynamic routing forwarding module forwards the resource link request to the specified bastion host node.
[0031] If the corresponding resource link object does not exist in the link object management module, the dynamic routing forwarding module sends a link object consultation request to the cluster monitoring module. The cluster monitoring module queries the currently available bastion host nodes based on the link object consultation request and returns the final link object information to the dynamic routing forwarding module. The dynamic routing forwarding module forwards the resource link request to the specified bastion host node.
[0032] The link object information includes the access address of the bastion host node where the resource link object is located and the cluster unique identifier of the bastion host node.
[0033] As a preferred embodiment, for different resource link objects, the link object management module uses the resource IP, resource access port number and resource account as key values to store in the local cache, and adds the key to the resource link object key list, which is a list constructed based on the cluster unique identifier of the bastion host where the resource link object is located;
[0034] After receiving the request to obtain the resource link object, the link object management module searches the local cache for the corresponding resource link object based on the resource IP, resource access port number and resource account, parses the access address of the bastion host where the resource link object is located and the cluster unique identifier of the bastion host where the resource link object is located, and returns the access address of the bastion host where the resource link object is located and the cluster unique identifier of the bastion host where the resource link object is located to the dynamic routing forwarding module;
[0035] When the bastion host node uses an existing resource link object for resource connection, the bastion host node sends a resource link object time-limit update request to the link object management module. The resource link object time-limit update request carries the resource IP, resource access port number and resource account. The link object management module obtains the resource link object through a mutex lock based on the resource IP, resource access port number and resource account, and extends the effective time of the resource link object in the cache.
[0036] When the bastion host node does not use the existing resource link object for resource connection, the bastion host node sends a resource link object timeliness update request to the link object management module. The resource link object timeliness request carries the resource IP, resource access port number, resource account, resource link object, and the cluster unique identifier of the bastion host where the resource link object is located. The link object management module creates or updates the resource link object based on the resource IP, resource access port number and resource account by means of a mutex lock;
[0037] Based on the link object deletion request sent by the cluster performance monitoring module, the link object management module parses the cluster unique identifier of the bastion host where the resource link object is located based on the link object deletion request, obtains the resource link object key list from the local cache according to the cluster unique identifier, and deletes the resource link object information corresponding to each key one by one according to the resource link object key list.
[0038] Preferably, the cluster monitoring module periodically sends a health check request to the bastion host node, and determines the operating status of the bastion host node based on the response of the bastion host node. If the bastion host node responds within a predetermined time, the bastion host node is determined to be in a normal operating state. If the bastion host node does not respond within the specified time and exceeds the set number of retries, the bastion host node is determined to be in a down state, the weight ratio of the bastion host node is set to zero, and a link object deletion request is sent to the link object management module. The corresponding resource link object is deleted based on the cluster unique identifier specified in the link object deletion request. When the down bastion host node restarts to report its own resource utilization rate, the weight ratio of the bastion host node is reset.
[0039] Preferably, after receiving the request for detecting the resource utilization rate of the bastion host sent by the dynamic routing forwarding module, the cluster monitoring module parses the cluster unique identifier of the bastion host node specified in the request for detecting the resource utilization rate of the bastion host, obtains the resource utilization rate of the bastion host node in a future predetermined time period based on the cluster unique identifier, and returns the cluster unique identifier of the bastion host node to the dynamic routing forwarding module when the resource utilization rate does not exceed the maximum threshold. When the resource utilization rate exceeds the maximum threshold, the bastion host nodes with sufficient resources are screened out according to the resource utilization rate and weight ratio of other bastion host nodes, and the cluster unique identifier and access address of the bastion host node are returned. When the cluster unique identifier of the bastion host node in the request for detecting the resource utilization rate of the bastion host is not parsed, the bastion host nodes with sufficient resources are screened out according to whether the resource utilization rate of the bastion host node exceeds the threshold and the weight ratio of the bastion host node, and the cluster unique identifier and access address of the bastion host node are returned.
[0040] The dynamic routing forwarding system and method for bastion host resource access of the present invention has the following advantages:
[0041] 1. Resource link objects can be reused, which greatly shortens the time spent in the resource connection process and improves the efficiency of resource connection;
[0042] 2. The cluster monitoring module receives the performance data of all bastion host nodes, and predicts the resource utilization rate in the future time period based on the resource utilization rate of the bastion host node itself, which facilitates the allocation of subsequent resource link objects and improves efficiency;
[0043] 3. The visualization page of the cluster resource monitoring module can display the performance information of all bastion host nodes in real time, making it easier for administrators to understand the overall operating status of the cluster and provide data support for the upgrade and expansion of bastion host nodes. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0045] The present invention is further described below in conjunction with the accompanying drawings.
[0046] Figure 1 This is a block diagram of the working principles of a dynamic routing forwarding module, a link object management module, and a cluster monitoring module in a dynamic routing forwarding system for accessing bastion host resources in Example 1. DETAILED DESCRIPTION
[0047] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it. However, the embodiments are not intended to limit the present invention. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments may be combined with each other.
[0048] The embodiments of the present invention provide a dynamic routing forwarding system and method for bastion host resource access, which are used to solve the technical problem of how to improve the operation and maintenance efficiency of the bastion host.
[0049] Embodiment 1:
[0050] The present invention discloses a dynamic routing forwarding system for bastion host resource access, comprising a cluster deployment module, a dynamic routing forwarding module, a link object management module and a cluster monitoring module.
[0051] The cluster deployment module is used to establish a cluster between multiple bastion hosts. The bastion host nodes, dynamic routing forwarding module, link object management module and cluster monitoring module are deployed in the same network.
[0052] In this embodiment, the cluster deployment module mainly achieves load balancing and fault tolerance by establishing a cluster between multiple bastion hosts. All bastion host nodes, resource access dynamic routing forwarding module, resource link object management module, and cluster monitoring module should be deployed in the same internal network to ensure efficient and secure communication. The communication between each module should use encryption protocols (such as TLS / SSL) to prevent data leakage and tampering.
[0053] The link object management module is used to manage the life cycle of the link object and store the link object information in the local cache.
[0054] In this embodiment, for different resource link objects, the link object management module is used to store the resource IP, resource access port number and resource account as key values in the local cache, and to add the key to the resource link object key list. The resource link object key list is a list built based on the cluster unique identifier of the bastion host where the resource link object is located.
[0055] The cluster monitoring module is used to receive performance information uploaded by the bastion host nodes and display the performance information through a visual interface, and return a cluster unique identifier to each bastion host.
[0056] In this embodiment, each bastion host will send its own performance information to the cluster monitoring module when it is deployed, including IP, CPU, memory, hard disk, bastion host access address and other information. After receiving the performance information, the cluster monitoring module sends a unique bastion host identifier in the cluster to the current bastion host as the cluster unique identifier. This bastion host identifier plays the role of uniquely identifying the bastion host. The cluster monitoring module stores the performance information of all bastion host nodes in real time and provides a visualization page of performance data to facilitate administrators to understand the overall operation status of the cluster.
[0057] The cluster monitoring module is used to receive the resource utilization rate of the bastion host node uploaded by the bastion host node, predict the resource utilization rate of the bastion host node in the future time period based on the bastion host node's own resource utilization rate, set the weight ratio of the bastion host node, and display the resource utilization rate and weight ratio of the bastion host node through a visual interface.
[0058] In this embodiment, all bastion host nodes in the cluster will periodically and actively report their own resource utilization rates to the bastion host cluster monitoring module, including the utilization rates of CPU, memory, and disk. The cluster monitoring module predicts the future bastion host resource utilization rate based on the resource utilization of the bastion host in the past time period, sets the threshold of the bastion host resource utilization rate, and other functions. At the same time, the cluster monitoring module will analyze the collected bastion host resource utilization rates in the time dimension, determine the resource utilization rate of the bastion host in the future period, and set the weight ratio of the bastion host being used. The larger the weight ratio of the bastion host being used, the more sufficient the available resources of this bastion host are, and the more effectively it can connect to the resources. On the contrary, the fewer resources that can be controlled by the bastion host, the lower the performance of the bastion host, and it cannot efficiently connect to the resources. The administrator manually sets the weight ratio of the bastion host being used in the performance data visualization page of the bastion host.
[0059] The cluster monitoring module is used to periodically send health check requests to the bastion host node, determine the operating status of the bastion host node based on the response of the bastion host node, and for the bastion host node that is in a downtime state, send a link object deletion request to the link object management module; correspondingly, based on the link object deletion request, the link object management module is used to delete the corresponding link object in the local cache.
[0060] In this embodiment, the cluster monitoring module will periodically send health check requests to the registered bastion host. When the bastion host fails to respond within the specified timeout period and exceeds the set number of retries, the bastion host cluster monitoring module considers the bastion host to be unavailable and down, and sets its weight ratio to 0. At the same time, the bastion host cluster monitoring module will notify the bastion host resource link object management module of the cluster unique identifier of the bastion host to delete the resource link object associated with the bastion host. When the downed bastion host restarts and reports its own resource usage, the bastion host cluster monitoring module will reset its weight ratio.
[0061] The dynamic routing forwarding module is used to receive and parse the resource link request uploaded by the bastion host node, and send a link object acquisition request to the link object management module based on the parsing result of the resource link request. The link object management module is used to find the corresponding link object locally and return the link object information to the dynamic routing forwarding module. The dynamic routing forwarding module is used to send a bastion host resource utilization detection request to the cluster monitoring module. Based on the bastion host resource utilization detection request, the cluster monitoring module is used to return the link object information to the dynamic routing forwarding module based on the resource utilization of the bastion host node. The dynamic routing forwarding module is used to forward the resource link request to the specified bastion host node.
[0062] The main function of the dynamic routing forwarding module in this embodiment is to obtain the bastion host access address of the optimal resource link object according to the resource connection request, and forward the resource connection request to the specified bastion host service to complete the resource connection operation.
[0063] After receiving the resource connection request, the dynamic routing forwarding module parses the resource IP, resource port, and resource account, and sends a request to obtain the resource link object to the link object management module.
[0064] After the link object management module receives the link object acquisition request sent by the dynamic routing forwarding module, it searches the local cache for the resource link object specified in the link object acquisition request. If the corresponding resource link object exists in the link object management module, the dynamic routing forwarding module is used to send a bastion host resource usage detection request to the cluster monitoring module. The cluster monitoring module screens based on the bastion host resource usage rate in the future scheduled time period and returns the final link object information to the dynamic routing forwarding module. The dynamic routing forwarding module is used to forward the resource link request to the specified bastion host node.
[0065] If the corresponding resource link object does not exist in the link object management module, the dynamic routing forwarding module is used to send a link object consultation request to the cluster monitoring module, the cluster monitoring module is used to query the currently available bastion host nodes based on the link object consultation request and return the final link object information to the dynamic routing forwarding module, and the dynamic routing forwarding module is used to forward the resource link request to the specified bastion host node.
[0066] The link object information includes the access address of the bastion host node where the resource link object is located and the cluster unique identifier of the bastion host node.
[0067] In this embodiment, the source link object management module is mainly used to manage the life cycle of resource link objects. In the process of connecting to resources, the authority authentication is very cumbersome and time-consuming. Therefore, storing the successfully authenticated resource link objects is conducive to improving the efficiency of the next access using the same authentication data. In order to better distinguish different resource link objects, it is necessary to use the resource IP, resource access port, and resource account as the key to store the resource link objects in the cache.
[0068] After receiving a request to obtain a resource link object, the link object management module is used to search for the corresponding resource link object from the local cache based on the resource IP, resource access port number and resource account, parse the access address of the bastion host where the resource link object is located and the cluster unique identifier of the bastion host, and return the access address of the bastion host where the resource link object is located and the cluster unique identifier of the bastion host to the dynamic routing forwarding module.
[0069] When the bastion host node uses an existing resource link object for resource connection, the bastion host node sends a resource link object timeliness update request to the link object management module. The resource link object timeliness request carries the resource IP, resource access port number and resource account. The link object management module is used to obtain the resource link object based on the resource IP, resource access port number and resource account through a mutex lock, and extend the effective time of the resource link object in the cache.
[0070] When the bastion host node does not use the existing resource link object for resource connection, the bastion host node sends a resource link object time-limit update request to the link object management module. The resource link object time-limit request carries the resource IP, resource access port number, resource account, resource link object, and the cluster unique identifier of the bastion host where the resource link object is located. The link object management module is used to create or update the resource link object based on the resource IP, resource access port number and resource account by means of a mutex lock. That is, when the resource link object is not found according to the key, the resource link object in the request is stored in the cache, and the key is added to the resource link object key list corresponding to the bastion host cluster unique identifier; when the resource link object is found according to the key, the resource link object in the cache is directly replaced with the resource link object in the request, and the cluster unique identifier of the bastion host is parsed according to the resource chain object, and the information about this key in the resource link object key list corresponding to the bastion host cluster unique identifier is removed, and the bastion host cluster unique identifier in the new resource link object is parsed, and this key is added to its corresponding resource link object key list.
[0071] Based on the link object deletion request sent by the cluster performance monitoring module, the link object management module is used to parse the cluster unique identifier of the bastion host where the resource link object is located based on the link object deletion request, obtain the resource link object key list from the local cache according to the cluster unique identifier, and delete the resource link object information corresponding to each key one by one according to the resource link object key list.
[0072] The system of this embodiment, with the cooperation of the cluster deployment module, the dynamic routing forwarding module, the link object management module and the cluster monitoring module, can realize dynamic routing forwarding when the bastion host accesses resources.
[0073] Embodiment 2:
[0074] The present invention provides a dynamic routing forwarding method for bastion host resource access, which implements dynamic routing forwarding for bastion host resource access through the system disclosed in Example 1. The method includes the following steps:
[0075] Step S100 establishes a cluster between multiple bastion hosts, and deploys bastion host nodes, dynamic routing forwarding modules, link object management modules, and cluster monitoring modules in the same network;
[0076] Step S200 manages the life cycle of the link object through the link object management module and stores the link object information in the local cache
[0077] Step S300 receives the performance information uploaded by the bastion host node through the cluster monitoring module, displays the performance information through the visual interface provided by the cluster monitoring module, and returns a cluster unique identifier to each bastion host through the cluster monitoring module;
[0078] Step S400 receives the resource utilization rate of the bastion host node uploaded by the cluster monitoring module, predicts the resource utilization rate of the bastion host node in the future time period according to the resource utilization rate of the bastion host node, sets the weight ratio of the bastion host node, and displays the resource utilization rate and weight ratio of the bastion host node through a visual interface;
[0079] Step S500 periodically sends a health check request to the bastion host node through the cluster monitoring module, determines the running status of the bastion host node based on the response of the bastion host node, and sends a link object deletion request to the link object management module for the bastion host node in the downtime state, and deletes the corresponding link object in the local cache based on the link object deletion request and the link object management module;
[0080] In step S600, for the resource link request uploaded by the bastion host node, the dynamic routing forwarding module parses the resource link request uploaded by the bastion host node, and based on the parsed result of the resource link request, sends a request to obtain the link object to the link object management module. The link object management module searches for the corresponding link object locally and returns the link object information to the dynamic routing forwarding module. The dynamic routing forwarding module sends a request to detect the resource usage rate of the bastion host to the cluster monitoring module. Based on the request to detect the resource usage rate of the bastion host, the cluster monitoring module returns the link object information to the dynamic routing forwarding module based on the resource usage rate of the bastion host node, and forwards the resource link request to the specified bastion host node through the dynamic routing forwarding module.
[0081] In step S100 of this embodiment, a cluster is established between multiple bastion hosts to achieve load balancing and fault tolerance. All bastion host nodes, resource access dynamic routing forwarding module, resource link object management module, and cluster monitoring module should be deployed in the same internal network to ensure efficient and secure communication. The communication between each module should use encryption protocols (such as TLS / SSL) to prevent data leakage and tampering.
[0082] In step S200 of this embodiment, for different resource link objects, the link object management module stores the resource IP, resource access port number and resource account as key values in the local cache, and is used to add the key to the resource link object key list. The resource link object key list is a list built based on the cluster unique identifier of the bastion host where the resource link object is located.
[0083] In step S300 of this embodiment, each bastion host will send its own performance information to the cluster monitoring module when it is deployed, including information such as IP, CPU, memory, hard disk, and bastion host access address. After receiving the performance information, the cluster monitoring module sends a unique bastion host identifier in the cluster to the current bastion host as the cluster unique identifier. This bastion host identifier plays the role of uniquely identifying the bastion host. The cluster monitoring module stores the performance information of all bastion host nodes in real time and provides a visualization page of performance data to facilitate administrators to understand the overall operation status of the cluster.
[0084] In step S400 of this embodiment, all bastion host nodes in the cluster will periodically and actively report their own resource utilization rates to the bastion host cluster monitoring module, including the utilization rates of CPU, memory, and disk. The cluster monitoring module predicts the future bastion host resource utilization rate based on the resource utilization of the bastion host in the previous time period, sets the threshold of the bastion host resource utilization rate, and other functions. At the same time, the cluster monitoring module will analyze the collected bastion host resource utilization rates in the time dimension, determine the resource utilization rate of the bastion host in the future period, and set the weight ratio of the bastion host being used. The larger the weight ratio of the bastion host being used, the more sufficient the available resources of this bastion host are, and the more effectively it can connect to the resources. On the contrary, the fewer resources that can be controlled by the bastion host, the lower the performance of the bastion host, and it cannot efficiently connect to the resources. The administrator manually sets the weight ratio of the bastion host being used in the performance data visualization page of the bastion host.
[0085] In step S500 of this embodiment, the cluster monitoring module will periodically send health check requests to the registered bastion host. When the bastion host fails to respond within the specified timeout period and exceeds the set number of retries, the bastion host cluster monitoring module considers that the bastion host is unavailable and is in a downtime state, and sets its weight ratio to 0. At the same time, the bastion host cluster monitoring module will notify the bastion host resource link object management module of the cluster unique identifier of the bastion host to execute the deletion of the resource link object associated with the bastion host. When the downed bastion host restarts and reports its own resource usage, the bastion host cluster monitoring module will reset its weight ratio.
[0086] In step S600 of this embodiment, after receiving the resource connection request, the dynamic routing forwarding module parses the resource IP, resource port, and resource account, and sends a request to obtain the resource link object to the link object management module.
[0087] After the link object management module receives the link object acquisition request sent by the dynamic routing forwarding module, it searches the local cache for the resource link object specified in the link object acquisition request. If the corresponding resource link object exists in the link object management module, the dynamic routing forwarding module is used to send a bastion host resource usage detection request to the cluster monitoring module. The cluster monitoring module screens based on the bastion host resource usage rate in the future scheduled time period and returns the final link object information to the dynamic routing forwarding module. The dynamic routing forwarding module is used to forward the resource link request to the specified bastion host node.
[0088] If the corresponding resource link object does not exist in the link object management module, the dynamic routing forwarding module sends a link object consultation request to the cluster monitoring module. The cluster monitoring module queries the currently available bastion host nodes based on the link object consultation request and returns the final link object information to the dynamic routing forwarding module. The dynamic routing forwarding module forwards the resource link request to the specified bastion host node.
[0089] The link object information includes the access address of the bastion host node where the resource link object is located and the cluster unique identifier of the bastion host node.
[0090] In this embodiment, the source link object management module is mainly used to manage the life cycle of resource link objects. In the process of connecting to resources, the authority authentication is very cumbersome and time-consuming. Therefore, storing the successfully authenticated resource link objects is conducive to improving the efficiency of the next access using the same authentication data. In order to better distinguish different resource link objects, it is necessary to use the resource IP, resource access port, and resource account as the key to store the resource link objects in the cache.
[0091] After receiving the request to obtain the resource link object, the link object management module searches for the corresponding resource link object from the local cache based on the resource IP, resource access port number and resource account, parses the access address of the bastion host where the resource link object is located and the cluster unique identifier of the bastion host, and returns the access address of the bastion host where the resource link object is located and the cluster unique identifier of the bastion host to the dynamic routing forwarding module.
[0092] When the bastion host node uses an existing resource link object for resource connection, the bastion host node sends a request to update the resource link object validity period to the link object management module. The resource link object validity period request carries the resource IP, resource access port number and resource account. The link object management module obtains the resource link object based on the resource IP, resource access port number and resource account through a mutex lock and extends the effective period of the resource link object in the cache.
[0093] When the bastion host node does not use the existing resource link object for resource connection, the bastion host node sends a resource link object time-limit update request to the link object management module. The resource link object time-limit request carries the resource IP, resource access port number, resource account, resource link object, and the cluster unique identifier of the bastion host where the resource link object is located. The link object management module is used to create or update the resource link object based on the resource IP, resource access port number and resource account by means of a mutex lock. That is, when the resource link object is not found according to the key, the resource link object in the request is stored in the cache, and the key is added to the resource link object key list corresponding to the bastion host cluster unique identifier; when the resource link object is found according to the key, the resource link object in the cache is directly replaced with the resource link object in the request, and the cluster unique identifier of the bastion host is parsed according to the resource chain object, and the information about this key in the resource link object key list corresponding to the bastion host cluster unique identifier is removed, and the bastion host cluster unique identifier in the new resource link object is parsed, and this key is added to its corresponding resource link object key list.
[0094] Based on the link object deletion request sent by the cluster performance monitoring module, the link object management module parses the cluster unique identifier of the bastion host where the resource link object is located based on the link object deletion request, obtains the resource link object key list from the local cache according to the cluster unique identifier, and deletes the resource link object information corresponding to each key one by one according to the resource link object key list.
[0095] The present invention has been shown and described in detail above through the accompanying drawings and preferred embodiments. However, the present invention is not limited to these disclosed embodiments. Based on the above multiple embodiments, those skilled in the art can know that the means in the above different embodiments can be combined to obtain more embodiments of the present invention, and these embodiments are also within the protection scope of the present invention.
Claims
1. A dynamic routing forwarding system for bastion host resource access, characterized in that: It includes cluster deployment module, dynamic routing forwarding module, link object management module and cluster monitoring module; The cluster deployment module is used to establish a cluster between multiple bastion hosts, and the bastion host nodes, dynamic routing forwarding module, link object management module and cluster monitoring module are deployed in the same network; The link object management module is used to manage the life cycle of the link object and store the link object information in the local cache; The cluster monitoring module is used to receive performance information uploaded by the bastion host node and display the performance information through a visual interface, and return a cluster unique identifier to each bastion host; The cluster monitoring module is used to receive the resource utilization rate of the bastion host node uploaded by the bastion host node, predict the resource utilization rate of the bastion host node in the future time period according to the resource utilization rate of the bastion host node, set the weight ratio of the bastion host node, and display the resource utilization rate and weight ratio of the bastion host node through a visual interface; The cluster monitoring module is used to periodically send health check requests to the bastion host node, judge the operating status of the bastion host node based on the response of the bastion host node, and for the bastion host node in the downtime state, send a link object deletion request to the link object management module; correspondingly, based on the link object deletion request, the link object management module is used to delete the corresponding link object in the local cache; The dynamic routing forwarding module is used to receive and parse the resource link request uploaded by the bastion host node, and send a link object acquisition request to the link object management module based on the parsing result of the resource link request. The link object management module is used to find the corresponding link object locally and return the link object information to the dynamic routing forwarding module. The dynamic routing forwarding module is used to send a bastion host resource utilization detection request to the cluster monitoring module. Based on the bastion host resource utilization detection request, the cluster monitoring module is used to return the link object information to the dynamic routing forwarding module based on the resource utilization of the bastion host node. The dynamic routing forwarding module is used to forward the resource link request to the specified bastion host node.
2. The dynamic routing forwarding system for bastion host resource access according to claim 1 is characterized in that: After receiving the link object acquisition request sent by the dynamic routing forwarding module, the link object management module searches the local cache for the resource link object specified in the link object acquisition request. If the corresponding resource link object exists in the link object management module, the dynamic routing forwarding module is used to send a bastion host resource usage detection request to the cluster monitoring module. The cluster monitoring module performs screening based on the bastion host resource usage rate in the future predetermined time period and returns the final link object information to the dynamic routing forwarding module. The dynamic routing forwarding module is used to forward the resource link request to the specified bastion host node. If the corresponding resource link object does not exist in the link object management module, the dynamic routing forwarding module is used to send a link object consultation request to the cluster monitoring module, the cluster monitoring module is used to query the currently available bastion host node based on the link object consultation request, and return the final link object information to the dynamic routing forwarding module, and the dynamic routing forwarding module is used to forward the resource link request to the specified bastion host node; The link object information includes the access address of the bastion host node where the resource link object is located and the cluster unique identifier of the bastion host node.
3. The dynamic routing forwarding system for bastion host resource access according to claim 1 is characterized in that: For different resource link objects, the link object management module is used to store the resource IP, resource access port number and resource account as key values in the local cache, and to add the key to the resource link object key list, which is a list constructed based on the cluster unique identifier of the bastion host where the resource link object is located; After receiving the request to obtain the resource link object, the link object management module is used to search the corresponding resource link object from the local cache based on the resource IP, resource access port number and resource account, parse the access address of the bastion host where the resource link object is located and the cluster unique identifier of the bastion host where the resource link object is located, and return the access address of the bastion host where the resource link object is located and the cluster unique identifier of the bastion host where the resource link object is located to the dynamic routing forwarding module; When the bastion host node uses an existing resource link object for resource connection, the bastion host node sends a resource link object time-limit update request to the link object management module. The resource link object time-limit update request carries the resource IP, resource access port number and resource account. The link object management module is used to obtain the resource link object through a mutex lock based on the resource IP, resource access port number and resource account, and extend the effective time of the resource link object in the cache; When the bastion host node does not use the existing resource link object for resource connection, the bastion host node sends a resource link object timeliness update request to the link object management module. The resource link object timeliness request carries the resource IP, resource access port number, resource account, resource link object, and the cluster unique identifier of the bastion host where the resource link object is located. The link object management module is used to create or update the resource link object based on the resource IP, resource access port number and resource account by means of a mutex lock; Based on the link object deletion request sent by the cluster performance monitoring module, the link object management module is used to parse the cluster unique identifier of the bastion host where the resource link object is located based on the link object deletion request, obtain the resource link object key list from the local cache according to the cluster unique identifier, and delete the resource link object information corresponding to each key one by one according to the resource link object key list.
4. The dynamic routing forwarding system for bastion host resource access according to claim 1 is characterized in that: The cluster monitoring module is used to periodically send health check requests to the bastion host node, and judge the operating status of the bastion host node based on the response of the bastion host node. If the bastion host node responds within a predetermined time, the bastion host node is determined to be in a normal operating state. If the bastion host node does not respond within the specified time and exceeds the set number of retries, the bastion host node is determined to be in a down state, the weight ratio of the bastion host node is set to zero, and a link object deletion request is sent to the link object management module. The corresponding resource link object is deleted based on the cluster unique identifier specified in the link object deletion request. When the down bastion host node restarts to report its own resource utilization rate, the weight ratio of the bastion host node is reset.
5. The dynamic routing forwarding system for bastion host resource access according to claim 1 is characterized in that: After receiving the request for detecting the resource utilization rate of the bastion host sent by the dynamic routing forwarding module, the cluster monitoring module is used to parse the cluster unique identifier of the bastion host node specified in the request for detecting the resource utilization rate of the bastion host, and obtain the resource utilization rate of the bastion host node in the future predetermined time period according to the cluster unique identifier. When the resource utilization rate does not exceed the maximum threshold, the cluster unique identifier of the bastion host node is returned to the dynamic routing forwarding module. When the resource utilization rate exceeds the maximum threshold, the bastion host nodes with sufficient resources are screened out according to the resource utilization rate and weight ratio of other bastion host nodes, and the cluster unique identifier and access address of the bastion host node are returned. When the cluster unique identifier of the bastion host node in the request for detecting the resource utilization rate of the bastion host is not parsed, the bastion host nodes with sufficient resources are screened out according to whether the resource utilization rate of the bastion host node exceeds the threshold and the weight ratio of the bastion host node, and the cluster unique identifier and access address of the bastion host node are returned.
6. A dynamic routing forwarding method for bastion host resource access, characterized in that: The method is used to implement dynamic routing forwarding of bastion host resource access through a dynamic routing forwarding system for bastion host resource access as described in any one of claims 1 to 5, and the method comprises the following steps: Establish a cluster between multiple bastion hosts, and deploy the bastion host nodes, dynamic routing forwarding module, link object management module, and cluster monitoring module in the same network; The link object management module manages the life cycle of the link object and stores the link object information in the local cache. The cluster monitoring module receives the performance information uploaded by the bastion host node, displays the performance information through the visual interface provided by the cluster monitoring module, and returns a cluster unique identifier to each bastion host through the cluster monitoring module; The cluster monitoring module receives the resource usage rate uploaded by the bastion host node, predicts the resource usage rate of the bastion host node in the future time period based on the resource usage rate of the bastion host node, sets the weight ratio of the bastion host node, and displays the resource usage rate and weight ratio of the bastion host node through a visual interface; The cluster monitoring module periodically sends health check requests to the bastion host node, and determines the running status of the bastion host node based on the response of the bastion host node. For the bastion host node that is in a downtime state, a link object deletion request is sent to the link object management module. Based on the link object deletion request, the link object management module deletes the corresponding link object in the local cache; For resource link requests uploaded by the bastion host node, the resource link requests uploaded by the bastion host node are parsed through the dynamic routing forwarding module, and a request to obtain the link object is sent to the link object management module based on the parsed result of the resource link request. The link object management module searches for the corresponding link object locally and returns the link object information to the dynamic routing forwarding module. A request to detect the resource usage rate of the bastion host is sent to the cluster monitoring module through the dynamic routing forwarding module. Based on the request to detect the resource usage rate of the bastion host, the cluster monitoring module returns the link object information to the dynamic routing forwarding module based on the resource usage rate of the bastion host node, and the resource link request is forwarded to the specified bastion host node through the dynamic routing forwarding module.
7. The dynamic routing forwarding method for bastion host resource access according to claim 6 is characterized in that: After receiving the link object acquisition request sent by the dynamic routing forwarding module, the link object management module searches the local cache for the resource link object specified in the link object acquisition request. If the corresponding resource link object exists in the link object management module, the dynamic routing forwarding module sends a request to detect the use of bastion host resources to the cluster monitoring module. The cluster monitoring module screens based on the bastion host resource usage rate in the future predetermined time period and returns the final link object information to the dynamic routing forwarding module. The dynamic routing forwarding module forwards the resource link request to the specified bastion host node. If the corresponding resource link object does not exist in the link object management module, the dynamic routing forwarding module sends a link object consultation request to the cluster monitoring module. The cluster monitoring module queries the currently available bastion host nodes based on the link object consultation request and returns the final link object information to the dynamic routing forwarding module. The dynamic routing forwarding module forwards the resource link request to the specified bastion host node. The link object information includes the access address of the bastion host node where the resource link object is located and the cluster unique identifier of the bastion host node.
8. The dynamic routing forwarding method for bastion host resource access according to claim 6 is characterized in that: For different resource link objects, the link object management module uses the resource IP, resource access port number and resource account as key values to store them in the local cache, and adds the key to the resource link object key list. The resource link object key list is a list built based on the cluster unique identifier of the bastion host where the resource link object is located. After receiving the request to obtain the resource link object, the link object management module searches the local cache for the corresponding resource link object based on the resource IP, resource access port number and resource account, parses the access address of the bastion host where the resource link object is located and the cluster unique identifier of the bastion host where the resource link object is located, and returns the access address of the bastion host where the resource link object is located and the cluster unique identifier of the bastion host where the resource link object is located to the dynamic routing forwarding module; When the bastion host node uses an existing resource link object for resource connection, the bastion host node sends a resource link object time-limit update request to the link object management module. The resource link object time-limit update request carries the resource IP, resource access port number and resource account. The link object management module obtains the resource link object through a mutex lock based on the resource IP, resource access port number and resource account, and extends the effective time of the resource link object in the cache. When the bastion host node does not use the existing resource link object for resource connection, the bastion host node sends a resource link object timeliness update request to the link object management module. The resource link object timeliness request carries the resource IP, resource access port number, resource account, resource link object, and the cluster unique identifier of the bastion host where the resource link object is located. The link object management module creates or updates the resource link object based on the resource IP, resource access port number and resource account by means of a mutex lock; Based on the link object deletion request sent by the cluster performance monitoring module, the link object management module parses the cluster unique identifier of the bastion host where the resource link object is located based on the link object deletion request, obtains the resource link object key list from the local cache according to the cluster unique identifier, and deletes the resource link object information corresponding to each key one by one according to the resource link object key list.
9. The dynamic routing forwarding method for bastion host resource access according to claim 6 is characterized in that: The cluster monitoring module periodically sends health check requests to the bastion host node, and determines the operating status of the bastion host node based on the response of the bastion host node. If the bastion host node responds within the predetermined time, the bastion host node is determined to be in normal operating status. If the bastion host node does not respond within the specified time and exceeds the set number of retries, the bastion host node is determined to be in a down state, and the weight ratio of the bastion host node is set to zero. A link object deletion request is sent to the link object management module, and the corresponding resource link object is deleted based on the cluster unique identifier specified in the link object deletion request. When the down bastion host node restarts and reports its own resource utilization rate, the weight ratio of the bastion host node is reset.
10. The dynamic routing forwarding method for bastion host resource access according to claim 6, characterized in that: After receiving the request for detecting the resource usage rate of the bastion host sent by the dynamic routing forwarding module, the cluster monitoring module parses the cluster unique identifier of the bastion host node specified in the request for detecting the resource usage rate of the bastion host, and obtains the resource usage rate of the bastion host node in the future predetermined time period according to the cluster unique identifier. When the resource usage rate does not exceed the maximum threshold, the cluster unique identifier of the bastion host node is returned to the dynamic routing forwarding module. When the resource usage rate exceeds the maximum threshold, the bastion host nodes with sufficient resources are screened out according to the resource usage rates and weight ratios of other bastion host nodes, and the cluster unique identifier and access address of the bastion host node are returned. When the cluster unique identifier of the bastion host node in the request for detecting the resource usage rate of the bastion host is not parsed, the bastion host nodes with sufficient resources are screened out according to whether the resource usage rate of the bastion host node exceeds the threshold and the weight ratio of the bastion host node, and the cluster unique identifier and access address of the bastion host node are returned.
Citation Information
Patent Citations
Paas cloud hosting system and method
CN106550002A
Bastion host allocation method and device
CN111327663A
Distributed server intelligent monitoring analysis and fault processing system and method
CN113872795A
Bastion host cluster, server cluster management method and system, equipment and medium
CN117793098A
Method for realizing cloud host permission linkage for cloud host and cloud bastion host
WO2023142070A1
