Routing service discovery device and method for PAAS platform
Through the routing service discovery device of the PAAS platform, client requests are parsed and forwarded to match the target PAAS platform, which solves the single-node performance pressure problem caused by the master-slave architecture in the big data component system, and improves the horizontal expansion capability and management simplicity of the cluster. .
Patent Information
- Application Number
- CN202110731393.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-30
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-06-30
AI Technical Summary
The master-slave architecture in the big data component system causes excessive performance pressure on a single cluster master node, affecting the horizontal expansion capabilities of user read and write requests and back-end services.
Design a routing service discovery device for the PAAS platform, including the client, the routing discovery service layer and the PAAS platform. The routing discovery service layer parses the client's data request, matches the target PAAS platform, and feeds the data back to the client, reducing The performance pressure of a single cluster master node improves the horizontal scalability of the cluster.
Through the global unified routing and forwarding function, the horizontal expansion of background services is realized, the performance pressure of a single cluster master node is reduced, the expansion capability of the cluster is improved, and multi-cluster management and data interaction links are simplified.
Smart Images

Figure CN113542373B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data technology, and in particular to a routing service discovery device and method for a PAAS platform. Background Art
[0002] The system architecture of big data components is basically based on the master-slave architecture, such as mainstream basic components such as HDFS, Kafka, Elasticsearch, and Druid. All of them process user-side metadata requests through the master node service, communicate and interact with the internal nodes of the cluster itself, process the report requests of the slave nodes, and are responsible for the storage and management of metadata. The platform scale is limited by the physical resources of the Master node. The pressure of RPC requests from the user side will be concentrated on the only Active master node, affecting the user's read and write requests and the horizontal expansion capabilities of the backend service. Summary of the invention
[0003] The purpose of the present invention is to provide a routing service discovery device and method for a PAAS platform, which can reduce the performance pressure of a single cluster master node and improve the horizontal expansion capability of the cluster.
[0004] In order to achieve the above-mentioned object, a first aspect of the present invention provides a routing service discovery device for a PAAS platform, comprising a user terminal, a routing discovery service layer and a PAAS platform, wherein the user terminal accesses and connects with the PAAS platform through a routing discovery service provided by the routing discovery service layer;
[0005] The routing discovery service layer receives and parses the data request sent by the user end to obtain the data path, obtains the target data from the corresponding target PAAS platform based on the data path, and feeds the target data back to the corresponding user end.
[0006] Preferably, the routing discovery service layer includes at least one routing node, and the routing node includes a server and a client;
[0007] The server is used to provide the main service of parsing and processing data requests;
[0008] The client is used to forward the data request to the target PAAS platform to obtain the target data.
[0009] Preferably, the routing discovery service layer also includes a state memory and a timing detector:
[0010] The state storage is used to receive, store and regularly update the state information of each PAAS platform master node through each routing node;
[0011] The timing detector is used to check the survival status of each PAAS platform through each routing node, and determine whether the service of each PAAS platform is available.
[0012] Furthermore, the main services of data request processing provided by the server include:
[0013] Parse the data path of the data request and match the target PAAS platform from multiple PAAS platforms based on data path matching;
[0014] The server searches the state information of the target PAAS platform master node from the cache in the state memory, and searches the available information of the target PAAS platform service from the cache in the timing detector;
[0015] When the master node status information of the target PAAS platform is normal and the target PAAS platform service is available, the server sends a data request to the master node of the target PAAS platform, and the master node of the target PAAS platform obtains the corresponding target data from the child node based on the data path and feeds it back to the corresponding user end through the server.
[0016] Preferably, the routing discovery service layer also includes a security management module for providing authorization management services and authentication management services;
[0017] The authorization management service is used to add, subtract and modify the access permission policy of the user terminal and the PAAS platform, and save the added, subtracted and modified access permission policy data in the database;
[0018] The authentication management service refers to the process of retrieving from the database whether the user who issued the current data request has the authority to access the target PAAS platform based on the content of the current data request, the user information and the target PAAS platform information when receiving the data request sent by the user.
[0019] Preferably, it also includes:
[0020] Routing nodes are used to distribute data requests belonging to the same target PAAS platform to different RPC queues and forward them to the target PAAS platform for processing.
[0021] Preferably, it also includes:
[0022] For any RPC queue, current limiting operation can be performed through parameter configuration.
[0023] Compared with the prior art, the routing service discovery method for the PAAS platform provided by the present invention has the following beneficial effects:
[0024] The routing service discovery device for the PAAS platform provided by the present invention adopts a system architecture including three parts: a user terminal, a routing discovery service layer and an underlying PAAS platform. Multiple user terminals are respectively connected to multiple PAAS platforms through the routing discovery service layer. When any user terminal needs to request target data from a target PAAS platform, the user terminal first sends a data request to the routing discovery service layer, and the routing discovery service layer parses the data path in the data request to find the PAAS platform where the target data is located. Finally, the routing discovery service layer obtains the target data from the corresponding target PAAS platform based on the data path, and feeds back the target data to the corresponding user terminal in the original path.
[0025] It can be seen that the present invention realizes the function of global unified routing forwarding through the routing discovery service layer, improves the horizontal expansion capability of the background service through the federal system, can reduce the performance pressure of a single cluster master node, and improves the horizontal expansion capability of the cluster.
[0026] A second aspect of the present invention provides a routing service discovery method for a PAAS platform, which is applied to the routing service discovery device for a PAAS platform described in the above technical solution, and the device comprises:
[0027] Receive a data request sent by a user terminal through a routing discovery service layer, and parse the data request to obtain a data path;
[0028] The routing discovery service layer receives a data request sent by a user terminal, and parses the data request to obtain a data path.
[0029] Preferably, the routing discovery service layer includes at least one routing node, a state memory and a timing detector, and the routing node includes a server and a client;
[0030] The server is used to provide the main service of parsing and processing data requests;
[0031] The client is used to forward the data request to the target PAAS platform to obtain the target data;
[0032] The state storage is used to receive, store and regularly update the state information of each PAAS platform master node through each routing node;
[0033] The timing detector is used to check the survival status of each PAAS platform through each routing node, and determine whether the service of each PAAS platform is available.
[0034] Compared with the prior art, the beneficial effects of the routing service discovery method for the PAAS platform provided by the present invention are the same as the beneficial effects of the routing service discovery device for the PAAS platform provided by the above technical solution, which will not be described in detail here.
[0035] A third aspect of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned routing service discovery method for the PAAS platform are executed.
[0036] Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present invention are the same as the beneficial effects of the routing service discovery method for the PAAS platform provided by the above technical solution, and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0038] Figure 1 It is a flow chart of a routing service discovery method for a PAAS platform in an embodiment of the present invention;
[0039] Figure 2 This is a system architecture diagram used when the routing service discovery device for the PAAS platform in the embodiment of the present invention is running;
[0040] Figure 3 This is a schematic diagram of the interaction of the state storage in the embodiment of the present invention updating the state information of each PAAS platform master node;
[0041] Figure 4 A logical diagram of implementing authorization management and authentication management through a security management module in an embodiment of the present invention;
[0042] Figure 5 The present invention is an example diagram of the implementation process of the routing service discovery method for the PAAS platform in an embodiment of the present invention. DETAILED DESCRIPTION
[0043] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.
[0044] Embodiment 1
[0045] See also Figure 1 and Figure 2This embodiment provides a routing service discovery method for a PAAS platform, including a user terminal, a routing discovery service layer and a PAAS platform. The user terminal accesses the PAAS platform through the routing discovery service provided by the routing discovery service layer; the routing discovery service layer receives and parses the data request sent by the user terminal to obtain a data path, and obtains target data from the corresponding target PAAS platform based on the data path, and feeds back the target data to the corresponding user terminal.
[0046] The routing service discovery device for the PAAS platform provided in this embodiment adopts a system architecture including three parts: a user terminal, a routing discovery service layer and an underlying PAAS platform. Multiple user terminals are connected to multiple PAAS platforms through the routing discovery service layer respectively. When any user terminal needs to request target data from the target PAAS platform, the user terminal first sends a data request to the routing discovery service layer, and the routing discovery service layer parses the data path in the data request to find the PAAS platform where the target data is located. Finally, the routing discovery service layer obtains the target data from the corresponding target PAAS platform based on the data path, and feeds the target data back to the corresponding user terminal along the original path.
[0047] It can be seen that this embodiment realizes the functions of global unified view and routing forwarding through the routing discovery service layer, improves the horizontal expansion capability of the background service through the federal system, can reduce the performance pressure of a single cluster master node, and improves the horizontal expansion capability of the cluster.
[0048] In the above embodiment, the routing discovery service layer includes at least one routing node, which includes a server and a client; the server is used to provide the main service for parsing and processing data requests; the client is used to forward data requests to the target PAAS platform to obtain target data.
[0049] like Figure 2In the specific implementation, the user end includes user end 1, user end 2 to user end n, the routing discovery service layer (router) includes multiple routing nodes, namely routing node 1, routing node 2 to routing node n, and each routing node includes a server and a client, multiple PAAS platforms form a distributed cluster (cluster), including PAAS platform 1, PAAS platform 2 to PAAS platform n, and each PAAS platform includes multiple master nodes (master) and multiple slave nodes (slave). Among them, the server includes a heavyweight server and a lightweight server, and the client includes a fat client and a thin client. The lightweight server is used to process metadata, the heavyweight server is used to process real user data, and the thin client is used to return the address information of the target data to the user end, so that the user end goes to the target PAAS platform to request the corresponding real user data according to the address information, and the fat client is used to directly return the real user data to the user end. It can be seen that through the different settings of heavyweight servers and lightweight servers, as well as fat clients and thin clients, the adapted server or client can be called for targeted processing according to the data size corresponding to the data request, thereby saving system resources as much as possible while ensuring data processing efficiency.
[0050] It can be understood that the role of the router is mainly to forward the user's data request (RPC read and write request) to the master node of the target PAAS platform, and return the response target data to the user; the cluster is the distributed cluster corresponding to the underlying PAAS platform; the master is the master node of the distributed cluster corresponding to the underlying PAAS platform, which is responsible for processing client RPC read and write requests, managing metadata, processing data node report requests, etc.; the slave is the slave node (data node) of the distributed cluster corresponding to the underlying PAAS platform, which is dedicated to storing massive data and is the node for data interaction with the user.
[0051] In the above embodiment, the routing discovery service layer also includes a state memory and a timing detector: the state memory is used to receive, store and periodically update the state information of each PAAS platform master node through each routing node; the timing detector is used to check the survival status of each PAAS platform through each routing node, and determine whether the services of each PAAS platform are available.
[0052] See also Figure 3In the specific implementation, the service discovery of the PAAS platform is mainly realized by the state memory and timing detector in the routing discovery service layer. The state memory is connected to each routing node respectively, and each routing node is connected to the master node of each PAAS platform respectively. The function of the state memory is to store and regularly update the status information of each PAAS platform master node; the function of the timing detector is to check the survival status of all PAAS platforms and determine whether the PAAS platform service is available. When the master node status information of the target PAAS platform is normal and the target PAAS platform service is available, the server sends the data request to the master node of the target PAAS platform, and the master node of the target PAAS platform obtains the corresponding target data from the child node based on the data path and feeds it back to the corresponding user end through the server.
[0053] It can be understood that the main service of data request processing provided by the server includes: parsing the data path of the data request, matching the target PAAS platform from multiple PAAS platforms based on the data path matching; the server searches for the status information of the target PAAS platform master node from the cache in the state memory, and searches for the available information of the target PAAS platform service from the cache in the timing detector; when the status information of the master node of the target PAAS platform is normal and the target PAAS platform service is available, the server sends the data request to the master node of the target PAAS platform, and the master node of the target PAAS platform obtains the corresponding target data from the child node based on the data path and feeds back to the corresponding user end through the server.
[0054] In the above embodiment, the routing discovery service layer also includes a security management module for providing authorization management services and authentication management services; the authorization management service is used to increase or decrease the access permission policy of the user terminal and the PAAS platform, and save the modified access permission policy data in the database; the authentication management service refers to when receiving a data request sent by the user terminal, based on the content of the current data request, the user terminal information and the target PAAS platform information, searching from the database whether the user terminal that issued the current data request has the authority to access the target PAAS platform. In specific implementation, the authentication management service can be implemented through a component permission management plug-in.
[0055] See also Figure 4In the specific implementation, the authorization management service authorizes PAAS platform users through component permission management plug-ins, such as component 1 permission management plug-in, component 2 permission management plug-in, component 3 permission management plug-in, and component 4 permission management plug-in. The interface for adding, deleting, modifying, and checking permission policies is provided in the form of RESTFUL, and a built-in web management page authorization operation is more intuitive and convenient. Real-time permission acquisition refers to periodically pulling permission information from the security management module. When the user accesses the PAAS platform, authentication is performed based on this permission information and recorded in the audit log. Synchronizing users refers to periodically loading users from the outside and reporting them to the security management module.
[0056] For example, different component permission management plug-ins correspond to different permission strategies. If the access rights of user terminal 1 to access the PAAS platform correspond to the permission management plug-in of component 1, and the permission content is that user terminal 1 can only access PAAS platform 1 and PAAS platform 2, and the access rights of the issued data request correspond to the permission management plug-in of component 2, and the permission content is that the data request can only access PAAS platform 1, then the permission strategy for the data request issued by user terminal 1 can be obtained through the permission management plug-in of component 1 and the permission management plug-in of component 2.
[0057] The above embodiment also includes: using routing nodes to distribute data requests belonging to the same target PAAS platform to different RPC queues and forwarding them to the target PAAS platform for processing. And the current limiting operation can be performed on any RPC queue through parameter configuration.
[0058] In specific implementation, based on the QOS (user request flow) request isolation of the user end and the PAAS platform, the function of current limiting is realized. Data requests from different PAAS platform user ends are distributed to different RPC queues, so that requests to different PAAS platforms do not affect each other. Then, configurable current limiting can be implemented for each RPC queue.
[0059] In the specific implementation process, multiple nodes in the routing service discovery layer can monitor the master node of each PAAS platform at the same time, and use the consistency algorithm to solve the problem that the multiple nodes in the routing service discovery layer detect inconsistent states of the PAAS platform master node. Moreover, when the routing service discovery layer cannot communicate with the PAAS platform master node, the routing service discovery layer will try the PAAS platform backup node, and then try the unavailable master node, and throw an exception if all fail. In addition, when the PAAS platform switches between the master and backup nodes or restarts, or when there is a network connection problem, the state storage will set the master node of this PAAS platform to the "expired" state. When the heartbeat of the master node arrives, the state storage will restore this state.
[0060] In summary, this embodiment scheme realizes the automatic monitoring and service discovery function of multiple PAAS platforms by the unified routing layer, forwards the user's request to the corresponding PAAS platform, reduces the performance pressure of the master node of a single cluster, and improves the horizontal expansion capability of the cluster. Through the unified permission management of the multi-tenant system, the development of permission control of each internal PAAS platform is reduced, the integration of each PAAS platform is facilitated, and the security control capability of each PAAS platform is enhanced. Through the decoupling of the client and the server, the operation and maintenance efficiency of the service is effectively improved, and the business problems caused by expansion and contraction are effectively avoided.
[0061] For ease of understanding, this embodiment is further described in detail through the following example scheme:
[0062] S1: By deploying the metadata storage system zookeeper cluster of the routing service discovery layer and the routing service discovery layer server, build an independent zookeeper cluster to store the mount table and status information of each PAAS platform, build a unified routing service discovery layer cluster, set the JVM startup parameters of the unified routing service discovery layer, configure each node with its own domain name and other information; start the unified routing service discovery layer service.
[0063] S2: Add mount table: dfsrouteradmin-mount <data><PAAS Platform> <data>;
[0064] S3: The grayscale switch of the peripheral system or associated components is to send the request to the unified routing service discovery layer. The PAAS platform peripheral system and associated component jar packages are switched to access the unified routing service discovery layer and restart the service.
[0065] S4: Verify whether the tasks that rely on the PAAS platform are running normally;
[0066] S5: Check whether the audit log of the unified routing service discovery layer meets expectations, including client address, PAAS platform, operation type, specific data accessed, etc.
[0067] See also Figure 5 In the specific implementation, user terminal 1, user terminal 2, user terminal 3, user terminal 4 and user terminal n are connected to the routing discovery service layer respectively. The dotted arrow in the figure only represents one connection relationship, and the solid arrow in the figure represents the service currently being accessed by routing. It can be seen from the figure that user terminal 2 sends a data request to the routing discovery service layer. At this time, the security management module performs multi-tenant unified authority authentication management, and then processes the data request through one of the routing nodes. The heavyweight server or lightweight server is selected through the server, and then the routing node is used to search the state information of the target PAAS platform master node from the cache in the state memory, and the available information of the target PAAS platform service is searched from the cache in the timing detector. The data requests belonging to the same target PAAS platform are distributed to different RPC queues to request queue isolation and current limiting operations, and finally forwarded to the target PAAS platform (PAAS platform 1 in the figure) for processing. The following innovations are achieved:
[0068] 1. Through the routing discovery service layer, the diversion and flow control of high-concurrency requests from the user side are realized, and the horizontal scalability of the backend service is improved by providing a unified view.
[0069] 2. Effectively reduced the performance pressure of the PAAS platform and solved the performance bottleneck caused by excessive cluster size.
[0070] 3. Simplified the management of multiple clusters and data interaction links of the PAAS platform.
[0071] 4. Reduce the coupling degree between the PAAS platform and the peripheral systems, avoid the impact of the expansion and contraction of the PAAS platform on the peripheral systems, and further improve the user experience of the PAAS platform.
[0072] 5. The platform security management capability is enhanced through unified multi-tenant permission authentication management of each PAAS platform.
[0073] Embodiment 2
[0074] This embodiment provides a routing service discovery method for a PAAS platform, including:
[0075] Receive a data request sent by a user terminal through a routing discovery service layer, and parse the data request to obtain a data path;
[0076] The routing discovery service layer receives a data request sent by a user terminal, and parses the data request to obtain a data path.
[0077] Preferably, the routing discovery service layer includes at least one routing node, a state memory and a timing detector, and the routing node includes a server and a client;
[0078] The server is used to provide the main service of parsing and processing data requests;
[0079] The client is used to forward the data request to the target PAAS platform to obtain the target data;
[0080] The state storage is used to receive, store and regularly update the state information of each PAAS platform master node through each routing node;
[0081] The timing detector is used to check the survival status of each PAAS platform through each routing node, and determine whether the service of each PAAS platform is available.
[0082] Compared with the prior art, the beneficial effects of the routing service discovery method for the PAAS platform provided by the embodiment of the present invention are the same as the beneficial effects of the routing service discovery device for the PAAS platform provided by the above-mentioned embodiment 1, which will not be described in detail here.
[0083] Embodiment 3
[0084] This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the routing service discovery method for the PAAS platform are executed.
[0085] Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this embodiment are the same as the beneficial effects of the routing service discovery method for the PAAS platform provided by the above technical solution, and are not described in detail here.
[0086] A person skilled in the art can understand that all or part of the steps in the above-mentioned inventive method can be implemented by instructing related hardware through a program, and the above-mentioned program can be stored in a computer-readable storage medium. When the program is executed, it includes the steps of the above-mentioned embodiment method, and the storage medium can be: ROM / RAM, disk, optical disk, memory card, etc.
[0087] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.< / data> < / data>
Claims
1. A routing service discovery device for a PAAS platform, characterized in that: It includes the user end, routing discovery service layer and PAAS platform. The user end accesses and connects with the PAAS platform through the routing discovery service provided by the routing discovery service layer. The routing discovery service layer receives and parses the data request sent by the user end to obtain the data path, obtains the target data from the corresponding target PAAS platform based on the data path, and feeds the target data back to the corresponding user end; The routing discovery service layer includes at least one routing node, and the routing node includes a server and a client; The server is used to provide the main service of parsing and processing data requests; The client is used to forward the data request to the target PAAS platform to obtain the target data; The routing discovery service layer also includes a state memory and a timing detector: The state storage is used to receive, store and regularly update the state information of each PAAS platform master node through each routing node; The timing detector is used to check the survival status of each PAAS platform through each routing node and determine whether the service of each PAAS platform is available; The main services for data request processing provided by the server include: Parse the data path of the data request and match the target PAAS platform from multiple PAAS platforms based on data path matching; The server searches the state information of the target PAAS platform master node from the cache in the state memory, and searches the available information of the target PAAS platform service from the cache in the timing detector; When the status information of the master node of the target PAAS platform is normal and the target PAAS platform service is available, the server sends the data request to the master node of the target PAAS platform, and the master node of the target PAAS platform obtains the corresponding target data from the sub-node based on the data path and feeds it back to the corresponding user end through the server; The routing discovery service layer also includes a security management module for providing authorization management services and authentication management services; The authorization management service is used to add, subtract and modify the access permission policy of the user terminal and the PAAS platform, and save the added, subtracted and modified access permission policy data in the database; The authentication management service refers to the process of retrieving from the database whether the user who issued the current data request has the authority to access the target PAAS platform based on the content of the current data request, the user information and the target PAAS platform information when receiving the data request sent by the user.
2. The device according to claim 1, characterized in that Also includes: Routing nodes are used to distribute data requests belonging to the same target PAAS platform to different RPC queues and forward them to the target PAAS platform for processing.
3. The device according to claim 2, characterized in that Also includes: For any RPC queue, current limiting operation can be performed through parameter configuration.
4. A routing service discovery method for a PAAS platform based on the routing service discovery device for a PAAS platform according to claim 1, characterized in that: include: Receive a data request sent by a user terminal through a routing discovery service layer, and parse the data request to obtain a data path; The routing discovery service layer receives a data request sent by a user terminal, and parses the data request to obtain a data path.
5. The method according to claim 4, characterized in that The routing discovery service layer includes at least one routing node, a state memory and a timing detector, and the routing node includes a server and a client; The server is used to provide the main service of parsing and processing data requests; The client is used to forward the data request to the target PAAS platform to obtain the target data; The state storage is used to receive, store and regularly update the state information of each PAAS platform master node through each routing node; The timing detector is used to check the survival status of each PAAS platform through each routing node, and determine whether the service of each PAAS platform is available.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 4 to 5 are executed.
