Multi-tenant implementation method and system for micro-service platform

By creating independent service instances and resources for each tenant in the microservice platform, the load and maintenance problems caused by the increase in the number of tenants in the microservice architecture are solved, and high availability and security are achieved.

CN119996498AInactive Publication Date: 2025-05-13SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD

Patent Information

Application Number
CN202510215869.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-26
Publication Date
2025-05-13
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the microservice architecture, as the number of tenants and instances increases, the load of shared databases and microservice platforms is increasing, resulting in increased maintenance difficulties. A method to solve this problem is urgently needed.

Method used

By providing the purchase and activation functions of microservice instances in the management side system, users can create independent tenant service instances in the tenant side cluster, each instance generates a unique ID and store instance information in the management side database. The user's business microservice applications are deployed on the user side and registered in the tenant side service instance to realize automatic registration and automatic discovery of microservices. Each tenant service instance has a database, registry and configuration center for improved availability, security, and load capacity.

Benefits of technology

It realizes the flexibility, security and maintainability of the microservice platform, provides users with highly available and highly reliable services, and reduces the difficulty of system maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119996498A_ABST
    Figure CN119996498A_ABST
Patent Text Reader

Abstract

The invention discloses a micro-service platform multi-tenant implementation method and system, and belongs to the technical field of micro-services, the system comprises a management side system, a tenant side system and a user side system, and a user purchases and opens a micro-service instance on the management side; after the purchase is successful, creating tenant service instances on the tenant side cluster, generating a unique ID for each tenant service instance, and storing the information of the tenant service instances in the management side database; a business micro-service application of a user is deployed or installed on a user side, and is registered on a service instance of a tenant side, so that a mechanism of automatic registration and automatic discovery of micro-service is realized. The problem that platform service maintenance is difficult under the condition of a large number of tenants is solved, the flexibility, safety and maintainability of the system are improved, and high-availability and high-reliability services are provided for users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of microservice technology, and in particular to a method and system for implementing multi-tenancy on a microservice platform. Background Art

[0002] With the rapid development of cloud computing and microservice architecture, enterprises have an increasing demand for building efficient and flexible multi-tenant systems. Multi-tenant systems allow a single software instance to provide services to multiple tenants at the same time, and each tenant has an independent virtual instance, thereby achieving resource sharing and isolation.

[0003] Microservices is an emerging software architecture that splits a large monolithic application into several microservices according to business. Each microservice makes work easier and reduces the coupling of various businesses. Multi-tenant technology is a multi-user environment that shares the same program or system. Currently, multi-tenant deployment in microservice architecture is mainly achieved by adding tenant fields at the table level and multi-instance single database.

[0004] With the rapid development of the Internet, microservices are widely used, and the demand for microservice management platforms is increasing. However, with the increase in the number of tenants and instances, the shared database and microservice platform are increasingly overloaded and maintenance becomes more difficult, so a method is urgently needed to solve this problem. Summary of the invention

[0005] The technical task of the present invention is to address the above shortcomings and provide a method and system for implementing multi-tenancy on a microservice platform, solve the problem of difficulty in maintaining platform services under a large number of tenants, improve the flexibility, security and maintainability of the system, and provide users with highly available and reliable services.

[0006] The technical solution adopted by the present invention to solve its technical problem is:

[0007] A method for implementing multi-tenancy on a microservice platform, including management side, tenant side and user side systems,

[0008] Users purchase and activate microservice instances on the management side (microservice platform console);

[0009] After the purchase is successful, a tenant service instance is created in the tenant-side cluster. A unique ID is generated for each tenant service instance, and the tenant service instance information is stored in the management-side database.

[0010] The user's business microservice application is deployed or installed on the user side and registered with the service instance on the tenant side to implement the microservice automatic registration and automatic discovery mechanism.

[0011] Each tenant service instance is deployed independently to improve availability and stability. Each tenant service instance has its own database to improve data security. Each tenant service instance has its own registration center and configuration center to increase load capacity.

[0012] Furthermore, the management side system and management side program provide management functions, including activation, renewal, cancellation, and detail viewing of tenant instances;

[0013] The management side system can be developed in languages ​​such as Java, Python, and Golang, and communicate with the tenant side and user side systems using the HTTP protocol;

[0014] The management side system is specifically implemented as follows:

[0015] 1) User management: It provides user registration, login, and logout functions. User information is stored in a separate database, which is physically isolated from the tenant-side and user-side systems to ensure user information security. At the same time, you can set up master account and sub-account functions to perform more flexible user rights management, manage sub-accounts under the master account, and manage authorization of microservice instances.

[0016] 2) Billing management: The billing management module provides functions such as user expense management and microservice instance purchase deduction and billing. It includes various billing methods such as monthly payment, coupon purchase, usage billing, etc., and provides user expense analysis and reports.

[0017] 3) Microservice instance management, providing functions such as creation (purchase), deletion, monitoring, permission control, component configuration, and resource configuration of microservice instances;

[0018] When activating a microservice engine instance, provide the specifications of the microservice engine, including the maximum number of microservice instances supported, whether to enable high availability, the number of replicas of the microservice engine, whether to install the gateway component, whether to install the distributed transaction component, and other component configurations;

[0019] 4) Unsubscribe function: Provides the function of deleting the microservice engine instance. When the user no longer needs the microservice engine service, the user can unsubscribe or delete the microservice engine instance on the management side, delete the microservice engine instance, and stop billing.

[0020] Furthermore, the microservice instance management provides microservice engine instance health status viewing, microservice engine instance resource usage monitoring, microservice engine instance request load monitoring, microservice engine instance namespace management, etc.; the microservice engine instance namespace is further explained here, and users can set up multiple namespaces according to business functions, register microservices of different businesses under their namespaces, and isolate microservice instances in different namespaces from each other to ensure their data and information security.

[0021] For the distributed transaction component, for a single service, each business is in the same service, and the communication between businesses adopts memory sharing. Transaction management can be implemented based on the transaction management capabilities of the database. However, for microservices, each service communicates through remote calls such as http or grpc, and each microservice uses a different database or data table. In the microservice scenario, it will be a pain point for developers to handle transactions on their own. The distributed transaction component can perfectly solve this problem. Developers only need to install this component and perform a small amount of configuration, and they can use transactions like using single services, without intrusion into business code.

[0022] Furthermore, the tenant-side system provides a Kubernetes container orchestration system, which contains multiple physical machines or virtual machines at the bottom layer. The physical machines or virtual machines form a tenant-side cluster to provide computing, storage, and network services. The number of nodes is determined according to the number of microservice engine instances. Based on the scalability of Kubernetes, when computing and storage resources are insufficient, it supports real-time rapid expansion and provides a stable infrastructure for microservice engine services.

[0023] Furthermore, after the user submits a request to open a tenant service instance in the management system, the management system issues a task to create an independent namespace in the tenant system cluster (the namespace here refers to the resources of the container platform Kubernetes), and installs all components of the tenant service instance in the namespace, including the database, registration center, configuration center, distributed transaction processing program, and monitoring program; each tenant instance is isolated from each other, and the database is exclusive to improve data security; at the same time, a unique instance ID is generated, and the management program manages the tenant instance through the instance ID;

[0024] After the tenant-side microservice engine instance is created, the microservice engine instance creation status is notified to the management-side system, and a unique ID is carried. The status is displayed to the user in the management-side system so that the user can perform subsequent operations.

[0025] Furthermore, in the user-side system, the user's business microservice refers to a business application developed by the user. This business application only needs to be simply configured to be registered in the microservice engine instance created by the tenant-side system. At this time, each microservice application has the ability to communicate with each other; the specific implementation is as follows:

[0026] 1) Develop business applications: Users can use Java or Python programming languages ​​to develop business applications and plan the calling relationships between microservices in advance. It is recommended to use the Spring Cloud framework for development and introduce the dependency files of the microservice engine into its code;

[0027] 2) Obtain the registration center address from the management side subsystem and configure it accordingly in the business application configuration file;

[0028] 3) Start the microservice business application. After it is successfully started, you can view the registered microservice instance in the management side subsystem.

[0029] Furthermore, the effective monitoring and operation of multi-tenant systems can be achieved through the integrated log management system and monitoring platform.

[0030] The log management system is used to collect and analyze the operation logs of each tenant to help quickly locate and solve problems; the monitoring platform uses indicator monitoring and alarm mechanisms to monitor the status and performance of each component of the system in real time to ensure the stability and availability of the service.

[0031] The present invention also claims protection for a multi-tenant implementation system of a microservice platform, including a management side subsystem, a tenant side subsystem and a user side subsystem.

[0032] Users purchase and activate microservice instances on the management side (microservice platform console);

[0033] After the purchase is successful, a tenant service instance is created in the tenant-side cluster. A unique ID is generated for each tenant service instance, and the tenant service instance information is stored in the management-side database.

[0034] The user's business microservice application is deployed or installed on the user side and registered with the service instance on the tenant side to implement the microservice automatic registration and automatic discovery mechanism;

[0035] The system specifically implements multi-tenant management of the microservice platform through the above method.

[0036] The present invention also claims protection for a device for implementing multi-tenancy of a microservice platform, comprising: at least one memory and at least one processor;

[0037] The at least one memory is used to store a machine-readable program;

[0038] The at least one processor is used to call the machine-readable program to implement the above method.

[0039] The present invention also claims protection for a computer-readable medium having computer instructions stored thereon, which implement the above method when executed by a processor.

[0040] Compared with the prior art, the method and system for implementing multi-tenancy of a microservice platform of the present invention have the following beneficial effects:

[0041] 1. Flexibility and scalability: Based on the microservice architecture design, the system is highly flexible and scalable, and can quickly adapt to multi-tenant environments of different scales and needs.

[0042] 2. High resource utilization: Through virtualization and containerization technology, the utilization of hardware resources is effectively improved and the system operation cost is reduced.

[0043] 3. Security and isolation: Multi-level security strategies and technical measures are introduced to ensure the security isolation and compliance of data between different tenants.

[0044] 4. Automated operation and maintenance: With the help of monitoring and operation and maintenance tools, the system can be automatically managed and continuously optimized, reducing manual intervention and fault recovery time. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 It is a schematic diagram of the architecture of a method for implementing multi-tenancy on a microservice platform provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0046] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.

[0047] The embodiment of the present invention provides a method for implementing multi-tenancy of a microservice platform, including management side, tenant side and user side systems.

[0048] Users purchase and activate microservice instances on the management side (microservice platform console);

[0049] After the purchase is successful, a tenant service instance is created in the tenant-side cluster. A unique ID is generated for each tenant service instance, and the tenant service instance information is stored in the management-side database.

[0050] The user's business microservice application is deployed or installed on the user side and registered with the service instance on the tenant side to implement the microservice automatic registration and automatic discovery mechanism.

[0051] Each tenant service instance is deployed independently to improve availability and stability. Each tenant service instance has its own database to improve data security. Each tenant service instance has its own registration center and configuration center to increase load capacity.

[0052] The management side system and management side program provide management functions such as activation, renewal, cancellation, and detail viewing of tenant instances;

[0053] The management-side system can be developed in languages ​​such as Java, Python, and Golang, and communicate with the tenant-side and user-side systems using the HTTP protocol.

[0054] The management side system is specifically implemented as follows:

[0055] (1) User management: It provides user registration, login, and logout functions. User information is stored in a separate database, which is physically isolated from the tenant-side and user-side systems to ensure user information security. At the same time, the main account and sub-account functions can be set to perform more flexible user authority management. Sub-accounts can be managed under the main account, thereby performing authorization management of microservice instances.

[0056] (2) Billing management: The billing management module provides functions such as user expense management and microservice instance purchase deduction and billing. It includes various billing methods such as monthly payment, coupon purchase, and usage billing, and provides user expense analysis and reports.

[0057] (3) Microservice instance management, which provides functions such as creation (purchase), deletion, monitoring, permission control, component configuration, and resource configuration of microservice instances.

[0058] When activating a microservice engine instance, provide the specifications of the microservice engine, such as the maximum number of microservice instances supported, whether to enable high availability, the number of replicas of the microservice engine, whether to install a gateway component, whether to install a distributed transaction component, and other component configurations.

[0059] The microservice engine instance management module provides microservice engine instance health status viewing, microservice engine instance resource usage monitoring, microservice engine instance request load monitoring, microservice engine instance namespace management, etc. Here is a further explanation of the microservice engine instance namespace. Users can set up multiple namespaces according to business functions and register microservices of different businesses in their namespaces. Microservice instances in different namespaces are isolated from each other to ensure their data and information security.

[0060] The distributed transaction management component is particularly important for microservices. Here is a further explanation: For a single service, each business is in the same service, and the communication between businesses is memory-sharing. Transaction management can be implemented based on the transaction management capabilities of the database. However, for microservices, each service communicates through remote calls such as http or grpc, and each microservice uses a different database or data table. In the microservice scenario, it will be a pain point for developers to handle transactions on their own. The distributed transaction component can perfectly solve this problem. Developers only need to install this component and perform a small amount of configuration, and they can use transactions like using a single service, without intrusion into the business code.

[0061] (4) Unsubscribe function: Provides the function of deleting the microservice engine instance. When the user no longer needs the microservice engine service, the user can unsubscribe or delete the microservice engine instance on the management side, delete the microservice engine instance, and stop billing.

[0062] The tenant side system is specifically implemented as follows:

[0063] Provides a kubernetes container orchestration system, which contains multiple physical machines or virtual machines at the bottom layer. Physical machines or virtual machines form a tenant-side cluster to provide computing, storage, and network services. The number of nodes is determined by the number of microservice engine instances. Based on the scalability of kubernetes, when computing and storage resources are insufficient, it supports real-time rapid expansion and provides a stable infrastructure for microservice engine services.

[0064] After the user submits a request to open a tenant service instance in the management system, the management system issues a task to create an independent namespace in the tenant system cluster (the namespace here refers to the resources of the container platform kubernetes, not the microservice engine namespace in the management system above), and installs all components of the tenant service instance in the namespace, including the database, registration center, configuration center, distributed transaction processing program, and monitoring program. Each tenant instance is isolated from each other, and the database is exclusive to improve data security; at the same time, a unique instance ID is generated, and the management program manages the tenant instance through the instance ID.

[0065] After the tenant-side microservice engine instance is created, the microservice engine instance creation status is notified to the management-side system, and a unique ID is carried. The status is displayed to the user in the management-side system so that the user can perform subsequent operations.

[0066] The user side system is specifically implemented as follows:

[0067] The user's business microservice refers to the business application developed by the user. This business application only needs simple configuration to be registered in the microservice engine instance created by the tenant-side system. At this time, each microservice application has the ability to communicate with each other; the specific implementation is as follows:

[0068] (1) Develop business applications: Users can use Java or Python programming languages ​​to develop business applications and plan the calling relationships between microservices in advance. It is recommended to use the Spring Cloud framework for development and introduce the dependency files of the microservice engine into its code.

[0069] (2) Obtain the registration center address from the management-side subsystem and configure it accordingly in the business application configuration file;

[0070] (3) Start the microservice business application. After it is successfully started, the registered microservice instance can be viewed in the management side subsystem.

[0071] The key technologies to implement this method include:

[0072] Tenant isolation and resource management: In the microservice architecture, each tenant is regarded as an independent entity with its own data storage, configuration, and operating environment. In order to achieve isolation between tenants, virtualization and containerization technologies are used. Specifically, each tenant's service instance is deployed in an independent container, which is managed and scheduled by the container orchestration tool Kubernetes to ensure resource isolation and security between tenants.

[0073] Service discovery and dynamic routing: In a multi-tenant environment, dynamic discovery and routing of services are key issues. By introducing the service registration and discovery mechanism nacos, each service instance registers its location information with the registration center. Through service mesh technology, fine-grained control and security management of inter-service communication can be achieved to ensure the security and efficiency of communication between tenants.

[0074] Elastic scaling and load balancing: An automated elastic scaling mechanism is implemented to meet the load characteristics and demand changes of different tenants. Based on monitoring and indicator collection, the system can dynamically adjust the number and configuration of tenant service instances to cope with sudden traffic and high load conditions. The load balancer is responsible for distributing traffic to each service instance to ensure high availability and stability of the service.

[0075] Security and permission management: In a multi-tenant system, security is one of the primary considerations. By adopting a multi-level security strategy, including identity authentication, authorization management, and data encryption, each tenant has an independent access control list (ACL). System administrators can finely configure permissions according to needs to ensure the security isolation and compliance of data between different tenants.

[0076] Monitoring and operation and maintenance:

[0077] In order to achieve effective monitoring and operation and maintenance of multi-tenant systems, a log management system and a monitoring platform are integrated. The log management system is used to collect and analyze the operation logs of each tenant to help quickly locate and solve problems. The monitoring platform uses indicator monitoring and alarm mechanisms to monitor the status and performance of each component of the system in real time to ensure the stability and availability of services.

[0078] The embodiment of the present invention also provides a multi-tenant implementation system for a microservice platform. According to business functions, the entire system is divided into three subsystems, and each business module is decoupled, so that the functional boundaries are clearer, the system architecture is more stable, and user data is more secure.

[0079] The system includes a management side subsystem, a tenant side subsystem and a user side subsystem.

[0080] Users purchase and activate microservice instances on the management side (microservice platform console);

[0081] After the purchase is successful, a tenant service instance is created in the tenant-side cluster. A unique ID is generated for each tenant service instance, and the tenant service instance information is stored in the management-side database.

[0082] The user's business microservice application is deployed or installed on the user side and registered with the service instance on the tenant side to implement the microservice automatic registration and automatic discovery mechanism;

[0083] The system specifically implements multi-tenant management of the microservice platform through the implementation method of multi-tenant of the microservice platform described in the above embodiment.

[0084] The management side subsystem and the management side program provide management functions such as activation, renewal, cancellation, and detail viewing of tenant instances.

[0085] The management-side subsystem can be developed in languages ​​such as java, python, golang, etc., and communicate with the tenant-side and user-side subsystems using the http protocol.

[0086] The following describes the functions of the management-side subsystem:

[0087] (1) User management: It provides user registration, login, and logout functions. User information is stored in a separate database, which is physically isolated from the tenant-side and user-side subsystems to ensure user information security. At the same time, you can set up master account and sub-account functions to perform more flexible user rights management, manage sub-accounts under the master account, and manage the authorization of microservice instances.

[0088] (2) Billing management: The billing management module provides functions such as user expense management and microservice instance purchase deduction and billing. It includes various billing methods such as monthly payment, coupon purchase, and usage billing, and provides user expense analysis and reports.

[0089] (3) Microservice instance management: The microservice instance management module provides functions such as creation (purchase), deletion, monitoring, permission control, component configuration, and resource configuration of microservice instances.

[0090] When activating a microservice engine instance, provide the specifications of the microservice engine, such as the maximum number of microservice instances supported, whether to enable high availability, the number of replicas of the microservice engine, whether to install a gateway component, whether to install a distributed transaction component, and other component configurations.

[0091] The microservice engine instance management module provides microservice engine instance health status viewing, microservice engine instance resource usage monitoring, microservice engine instance request load monitoring, microservice engine instance namespace management, etc. Here is a further explanation of the microservice engine instance namespace. Users can set up multiple namespaces according to business functions and register microservices of different businesses in their namespaces. Microservice instances in different namespaces are isolated from each other to ensure their data and information security.

[0092] The distributed transaction management component is particularly important for microservices. Here is a further explanation: For a single service, each business is in the same service, and the communication between businesses is memory-sharing. Transaction management can be implemented based on the transaction management capabilities of the database. However, for microservices, each service communicates through remote calls such as http or grpc, and each microservice uses a different database or data table. In the microservice scenario, it will be a pain point for developers to handle transactions on their own. The distributed transaction component can perfectly solve this problem. Developers only need to install this component and perform a small amount of configuration, and they can use transactions like using a single service, without intrusion into the business code.

[0093] (4) Unsubscribe function: The unsubscribe function provides the function of deleting the microservice engine instance. When the user no longer needs the microservice engine service, the user can unsubscribe or delete the microservice engine instance on the management side to delete the microservice engine instance and stop billing.

[0094] The tenant-side subsystem provides a Kubernetes container orchestration system, which contains multiple physical machines or virtual machines at the bottom layer. The physical machines or virtual machines form a tenant-side cluster to provide computing, storage, and network services. The number of nodes is determined according to the number of microservice engine instances. Based on the scalability of Kubernetes, when computing and storage resources are insufficient, it supports real-time rapid expansion and provides a stable infrastructure for microservice engine services.

[0095] After the user submits a request to open a tenant service instance in the management side subsystem, the management side subsystem issues a task to create an independent namespace in the tenant side subsystem cluster (the namespace here is the resource of the container platform kubernetes, not the microservice engine namespace mentioned above), and installs all components of the tenant service instance in the namespace, including the database, registration center, configuration center, distributed transaction processing program, and monitoring program. Each tenant instance is isolated from each other, and the database is exclusive to improve data security; at the same time, a unique instance ID is generated, and the management side program manages the tenant instance through the instance ID.

[0096] After the tenant-side microservice engine instance is created, the microservice engine instance creation status is notified to the management-side subsystem, and a unique ID is carried. The status is displayed to the user in the management-side subsystem for subsequent operations.

[0097] The user-side subsystem, the user's business microservice is installed in the user-side cluster and maintained by the user. The user's business microservice refers to the business application developed by the user. This business application only needs simple configuration to be registered in the microservice engine instance created by the tenant-side subsystem. At this time, each microservice application has the ability to communicate with each other. The functions are implemented as follows:

[0098] (1) Develop business applications. Users can use Java or Python programming languages ​​to develop business applications and plan the calling relationships between microservices in advance. It is recommended to use the Spring Cloud framework for development and introduce the dependency files of the microservice engine into its code.

[0099] (2) Obtain the registration center address from the management side subsystem and configure it accordingly in the business application configuration file.

[0100] (3) Start the microservice business application. After it is successfully started, the registered microservice instance can be viewed in the management side subsystem.

[0101] Effective monitoring and operation and maintenance of multi-tenant systems are achieved through the integration of log management systems and monitoring platforms. The log management system is used to collect and analyze the operation logs of each tenant to help quickly locate and solve problems; the monitoring platform uses indicator monitoring and alarm mechanisms to monitor the status and performance of each component of the system in real time to ensure the stability and availability of services.

[0102] An embodiment of the present invention further provides a device for implementing multi-tenancy of a microservice platform, comprising: at least one memory and at least one processor;

[0103] The at least one memory is used to store a machine-readable program;

[0104] The at least one processor is used to call the machine-readable program to implement the multi-tenant implementation method of the microservice platform described in the above embodiment.

[0105] The embodiment of the present invention also provides a computer-readable medium, on which computer instructions are stored, and when the computer instructions are executed by the processor, the method for implementing multi-tenancy of the microservice platform described in the above embodiment is implemented. Specifically, a system or device equipped with a storage medium can be provided, on which the software program code for implementing the functions of any of the above embodiments is stored, and the computer (or CPU or MPU) of the system or device reads and executes the program code stored in the storage medium.

[0106] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.

[0107] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.

[0108] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.

[0109] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or written to a memory provided in an expansion unit connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or the expansion unit is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.

[0110] The present invention is 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 code review methods 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 method for implementing multi-tenancy on a microservice platform, characterized in that: Including management side, tenant side and user side systems, Users purchase and activate microservice instances on the management side; After the purchase is successful, a tenant service instance is created in the tenant-side cluster. A unique ID is generated for each tenant service instance, and the tenant service instance information is stored in the management-side database. The user's business microservice application is deployed or installed on the user side and registered with the service instance on the tenant side to implement the microservice automatic registration and automatic discovery mechanism.

2. A method for implementing multi-tenancy on a microservice platform according to claim 1, characterized in that: The management side system and management side program provide management functions, including activation, renewal, cancellation, and detail viewing of tenant instances; The management side system is specifically implemented as follows: 1) User management, providing user registration, login, and logout functions. User information is stored in a separate database, which is physically isolated from the tenant-side and user-side systems to ensure user information security. The main account and sub-account functions can be selectively set, and the sub-accounts can be managed under the main account, thereby performing authorization management of microservice instances; 2) Billing management: The billing management module provides users with cost management and microservice instance purchase, deduction and billing functions; including monthly payment, coupon purchase, usage billing and other billing methods, and provides user cost analysis and reports; 3) Microservice instance management, providing microservice instance creation, deletion, monitoring, permission control, component configuration, and resource configuration functions; When activating a microservice engine instance, provide the specifications of the microservice engine, including the maximum number of microservice instances supported, whether to enable high availability, the number of replicas of the microservice engine, whether to install the gateway component, and whether to install the configuration of the distributed transaction component; 4) Unsubscribe function: Provides the function of deleting the microservice engine instance. When the user no longer needs the microservice engine service, the user can unsubscribe or delete the microservice engine instance on the management side, delete the microservice engine instance, and stop billing.

3. A method for implementing multi-tenancy on a microservice platform according to claim 2, characterized in that: The microservice instance management provides microservice engine instance health status checking, microservice engine instance resource usage monitoring, microservice engine instance request load monitoring, and microservice engine instance namespace management; Users can set up multiple namespaces according to business functions and register microservices of different businesses under their namespaces. Microservice instances in different namespaces are isolated from each other to ensure their data and information security.

4. The method for implementing multi-tenancy of a microservice platform according to claim 1, characterized in that: The tenant-side system provides a Kubernetes container orchestration system, which contains multiple physical machines or virtual machines at the bottom layer. The physical machines or virtual machines form a tenant-side cluster to provide computing, storage, and network services. The number of nodes is determined according to the number of microservice engine instances. Based on the scalability of Kubernetes, when computing and storage resources are insufficient, it supports real-time rapid expansion and provides a stable infrastructure for microservice engine services.

5. A method for implementing multi-tenancy on a microservice platform according to claim 1 or 4, characterized in that: After the user submits a request to open a tenant service instance in the management system, the management system issues a task to create an independent namespace in the tenant system cluster and install all components of the tenant service instance in the namespace, including the database, registration center, configuration center, distributed transaction processing program, and monitoring program. Each tenant instance is isolated from each other and has a dedicated database to improve data security. At the same time, a unique instance ID is generated, and the management program manages the tenant instance through the instance ID. After the tenant-side microservice engine instance is created, the microservice engine instance creation status is notified to the management-side system, and a unique ID is carried. The status is displayed to the user in the management-side system so that the user can perform subsequent operations.

6. A method for implementing multi-tenancy on a microservice platform according to claim 1, characterized in that: In the user-side system, the user's business microservice refers to the business application developed by the user. This business application only needs to be simply configured to be registered in the microservice engine instance created by the tenant-side system. At this time, each microservice application has the ability to communicate with each other; the specific implementation is as follows: 1) Develop business applications: Users use programming languages ​​to develop business applications and plan the calling relationships between microservices in advance; 2) Obtain the registration center address from the management side subsystem and configure it accordingly in the business application configuration file; 3) Start the microservice business application. After it is successfully started, you can view the registered microservice instance in the management side subsystem.

7. A method for implementing multi-tenancy on a microservice platform according to claim 1, characterized in that: Through the integrated log management system and monitoring platform, effective monitoring and operation of multi-tenant systems can be achieved. The log management system is used to collect and analyze the operation logs of each tenant to help quickly locate and solve problems; the monitoring platform uses indicator monitoring and alarm mechanisms to monitor the status and performance of each component of the system in real time to ensure the stability and availability of the service.

8. A multi-tenant implementation system for a microservice platform, characterized in that: Including management side subsystem, tenant side subsystem and user side subsystem, Users purchase and activate microservice instances on the management side; After the purchase is successful, a tenant service instance is created in the tenant-side cluster. A unique ID is generated for each tenant service instance, and the tenant service instance information is stored in the management-side database. The user's business microservice application is deployed or installed on the user side and registered with the service instance on the tenant side to implement the microservice automatic registration and automatic discovery mechanism; The system specifically implements multi-tenant management of a microservice platform through the method described in any one of claims 1 to 7.

9. A device for implementing multi-tenancy on a microservice platform, characterized in that: include: at least one memory and at least one processor; The at least one memory is used to store a machine-readable program; The at least one processor is used to call the machine-readable program to implement the method described in any one of claims 1 to 7.

10. A computer-readable medium, characterized in that The computer readable medium stores computer instructions, and when the computer instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Method for managing micro-service engine instance based on tenant side container cluster

    CN112769947A

  • Method and system for managing micro-service engine instance

    CN115562814A

  • Micro-service platform core component management method and device, equipment and storage medium

    CN116578305A

  • Multi-tenant management method and device of intelligent internet-of-things system, medium and equipment

    CN117992181A

  • Enterprise digital service platform of multi-tenant and micro-service architecture

    CN118784712A

Cited By

  • Multi-tenant external connection platform, use method and equipment

    CN120602546A