CN118018552B - Cluster service deployment method and device based on middleware and computer equipment - Google Patents
Cluster service deployment method and device based on middleware and computer equipment Download PDFInfo
- Publication number
- CN118018552B CN118018552B CN202410414062.0A CN202410414062A CN118018552B CN 118018552 B CN118018552 B CN 118018552B CN 202410414062 A CN202410414062 A CN 202410414062A CN 118018552 B CN118018552 B CN 118018552B
- Authority
- CN
- China
- Prior art keywords
- business service
- service
- server
- business
- cluster
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/505—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5061—Partitioning or combining of resources
- G06F9/5066—Algorithms for mapping a plurality of inter-dependent sub-tasks onto a plurality of physical CPUs
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5061—Partitioning or combining of resources
- G06F9/5077—Logical partitioning of resources; Management or configuration of virtualized resources
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5083—Techniques for rebalancing the load in a distributed system
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/288—Distributed intermediate devices, i.e. intermediate devices for interaction with other intermediate devices on the same level
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/30—Profiles
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application relates to a middleware-based cluster service deployment method, a middleware-based cluster service deployment device, a computer device, a storage medium and a computer program product. The method comprises the following steps: acquiring business service data of business service to be deployed and acquiring a cluster server; the cluster server comprises at least one independent server; the business service data comprises business service information and business service deployment data packets; according to the service deployment data packet, deploying the service to the cluster server; distributing virtual connection addresses of all business services deployed to the cluster server according to the business service information; and determining the address mapping relation between each virtual connection address and the independent server, and determining the service calling relation between each virtual connection address and the corresponding business service. The method can improve the resource utilization rate of the cluster server.
Description
Technical Field
The present application relates to the field of cluster service technologies, and in particular, to a middleware-based cluster service deployment method, apparatus, computer device, storage medium, and computer program product.
Background
When the product relates to a plurality of services, in order to verify functions, deployment verification of clusters of the services is required.
However, conventional cluster deployment needs to be deployed on independent resources, which is a great requirement for resources and is difficult for small and medium teams or teams with limited resources.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a middleware-based cluster service deployment method, apparatus, computer device, computer readable storage medium, and computer program product that can improve resource utilization.
In a first aspect, the present application provides a middleware-based cluster service deployment method, including:
Acquiring business service data of business service to be deployed and acquiring a cluster server; the cluster server comprises at least one independent server; the business service data comprises business service information and business service deployment data packets;
Deploying the business service to the cluster server according to the business service deployment data packet;
Distributing virtual connection addresses of the business services deployed to the cluster servers according to the business service information;
And determining the address mapping relation between each virtual connection address and the independent server, and determining the service calling relation between each virtual connection address and the corresponding business service.
In one embodiment, after obtaining the cluster server, the method further includes:
Acquiring server information of each independent server;
and determining the calling weight of each independent server according to the server information.
In one embodiment, the deploying the business service to the cluster server according to the business service deployment data packet includes:
for any business service, determining a server requirement required by the any business service according to business service information of the any business service;
according to the server demand, determining a target independent server from independent servers of the cluster servers;
and deploying the business service to the target independent server according to the business service deployment data packet.
In one embodiment, after determining the service call relationship between each virtual connection address and the corresponding business service, the method further includes:
Responding to the access requirement of the virtual connection address, and determining a target business service corresponding to the virtual connection address according to the service calling relation;
Determining a target independent server corresponding to the target business service according to the address mapping relation;
and determining one target independent server from the target independent servers according to the calling weight, and forwarding the access information of the access requirement to the one target independent server so that the one target independent server provides target business service according to the access information.
In one embodiment, the acquiring the service data of the service to be deployed includes:
Acquiring verification information of business services to be deployed;
According to a preset verification mode, carrying out safety verification on the verification information;
And under the condition that the safety check passes, acquiring business service data of business service to be deployed.
In one embodiment, the acquiring the service data of the service to be deployed includes:
According to a preset period, periodically acquiring business service data of all business services from a preset business service library;
determining the business service to be deployed according to the business service data of all the business services;
And acquiring business service data of the business service to be deployed from a preset business service library.
In a second aspect, the present application further provides a middleware-based cluster service deployment device, including:
The data acquisition module is used for acquiring business service data of business services to be deployed and acquiring a cluster server; the cluster server comprises at least one independent server; the business service data comprises business service information and business service deployment data packets;
the service deployment module is used for deploying the business service to the cluster server according to the business service deployment data packet;
The address allocation module is used for allocating virtual connection addresses of the business services deployed to the cluster servers according to the business service information;
and the relation determining module is used for determining the address mapping relation between each virtual connection address and the independent server and determining the service calling relation between each virtual connection address and the corresponding business service.
In a third aspect, the present application also provides a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
Acquiring business service data of business service to be deployed and acquiring a cluster server; the cluster server comprises at least one independent server; the business service data comprises business service information and business service deployment data packets;
Deploying the business service to the cluster server according to the business service deployment data packet;
Distributing virtual connection addresses of the business services deployed to the cluster servers according to the business service information;
And determining the address mapping relation between each virtual connection address and the independent server, and determining the service calling relation between each virtual connection address and the corresponding business service.
In a fourth aspect, the present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
Acquiring business service data of business service to be deployed and acquiring a cluster server; the cluster server comprises at least one independent server; the business service data comprises business service information and business service deployment data packets;
Deploying the business service to the cluster server according to the business service deployment data packet;
Distributing virtual connection addresses of the business services deployed to the cluster servers according to the business service information;
And determining the address mapping relation between each virtual connection address and the independent server, and determining the service calling relation between each virtual connection address and the corresponding business service.
In a fifth aspect, the application also provides a computer program product comprising a computer program which, when executed by a processor, performs the steps of:
Acquiring business service data of business service to be deployed and acquiring a cluster server; the cluster server comprises at least one independent server; the business service data comprises business service information and business service deployment data packets;
Deploying the business service to the cluster server according to the business service deployment data packet;
Distributing virtual connection addresses of the business services deployed to the cluster servers according to the business service information;
And determining the address mapping relation between each virtual connection address and the independent server, and determining the service calling relation between each virtual connection address and the corresponding business service.
The method, the device, the computer equipment, the storage medium and the computer program product for deploying the cluster service based on the middleware comprise the steps of firstly, acquiring business service data of business service to be deployed and acquiring a cluster server, wherein the cluster server comprises at least one independent server, the business service data comprises business service information and business service deployment data packets, and the detail information of the business service to be deployed and the available cluster server can be known by acquiring the necessary information of the business service and the cluster server; then, according to the business service deployment data packet, the business service is deployed into the cluster server, and by deploying a plurality of business services on at least one independent server, the resource utilization rate is improved, and meanwhile, the efficient deployment of the business service is realized; then, according to the business service information, distributing virtual connection addresses of all business services deployed in the cluster server, so that external access to each business service is completed through the corresponding virtual connection address instead of being directly connected to the cluster server, and providing preposed access distribution processing for load balancing of the cluster server, thereby improving the resource utilization rate of the cluster server; and finally, determining the address mapping relation between each virtual connection address and the independent server, and determining the service calling relation between each virtual connection address and the corresponding business service, and ensuring that the access request to the business service can be correctly routed to the corresponding cluster server by determining the address mapping relation and the service calling relation so as to improve the utilization rate and the load balancing effect of the cluster server. In the method, the resource utilization rate of the cluster server is effectively improved by deploying a plurality of business services on at least one independent server. Then, by distributing virtual connection addresses, establishing address mapping relationships and determining service calling relationships, the overall load balancing effect is optimized, and the requests can be correctly distributed to different business services.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related art, the drawings that are required to be used in the embodiments or the related technical descriptions will be briefly described, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to the drawings without inventive effort for those skilled in the art.
FIG. 1 is an application environment diagram of a middleware-based clustered service deployment method in one embodiment;
FIG. 2 is a flow diagram of a middleware-based clustered service deployment method in one embodiment;
FIG. 3 is a flowchart of a middleware-based clustered service deployment method according to another embodiment;
FIG. 4 is a block diagram of a middleware-based clustered service deployment apparatus in one embodiment;
fig. 5 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The middleware-based cluster service deployment method provided by the embodiment of the application can be applied to an application environment shown in figure 1. Wherein the middleware 102 communicates with the cluster server 104 via a network. The data storage system may store data that the cluster server 104 needs to process. The data storage system may be integrated on the cluster server 104 or may be located on a cloud or other network server. The middleware 102 acquires service data of service to be deployed and acquires a cluster server 104, wherein the cluster server comprises at least one independent server, and the service data comprises service information and service deployment data packets; then, the middleware 102 deploys the business service to the cluster server 104 according to the business service deployment data packet; the middleware 102 distributes virtual connection addresses of all business services deployed to the cluster server 104 according to the business service information; the middleware 102 determines address mapping relations between each virtual connection address and the independent servers, and determines service calling relations between each virtual connection address and the corresponding business service. The middleware 102 may be a terminal or a server, and the terminal may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, etc., and the server may be implemented by a separate server or a server cluster formed by a plurality of servers.
In an exemplary embodiment, as shown in fig. 2, a middleware-based cluster service deployment method is provided, and the method is applied to the middleware 102 in fig. 1 for illustration, and the method includes the following steps:
step S201, acquiring service data of a service to be deployed, and acquiring a cluster server.
Wherein the cluster server comprises at least one independent server; the business service data includes business service information and business service deployment data packets.
Illustratively, the middleware 102 obtains basic information about the business service to be deployed by reading a configuration file, metadata, or from a version control system, including business service information including a service name, a version number, a dependency relationship, and the like, and a business service deployment data packet including a startup script, a configuration file, a dependency library, and the like. Then, the middleware 102 obtains basic information of the cluster server 104, including server addresses, operating systems, available resources, and the like, from information preconfigured by the user. And establishes a communication connection with the cluster server 104 via the server address. The business services may include services provided by different business software, and different functions of the business software.
Step S202, according to the business service deployment data packet, the business service is deployed to the cluster server.
Illustratively, the middleware 102 decompresses the business service deployment data package to a designated directory of the cluster server 104, ready for deployment of the required files and directory structures. The middleware 102 configures the environment of the cluster server 104 according to the operation requirements of the business service, including setting environment variables, installing a dependency library, adjusting system configuration, and the like. The middleware 102 then initiates the business services that have been configured on the cluster servers 104, ensuring that the services are operating properly. Subsequently, the middleware 102 monitors the running condition of the business service in real time, ensures that the business service is in a healthy state after deployment, and performs fault tolerance processing when an abnormal situation is found.
Step S203, virtual connection addresses of all business services deployed to the cluster server are allocated according to the business service information.
Illustratively, the middleware 102 obtains a virtual connection address allocation range preset by the user, and then the middleware 102 allocates a corresponding virtual connection address, including a virtual IP address and a port number, to each deployed business service. By the combination of the virtual IP address and the port number, a unique corresponding traffic service can be determined together. The subsequent external environment can access the corresponding business service through the virtual connection address.
Step S204, determining the address mapping relation between each virtual connection address and the independent server, and determining the service calling relation between each virtual connection address and the corresponding business service.
Illustratively, the middleware 102 establishes a mapping relationship table between virtual connection addresses and independent server addresses, so as to ensure that each virtual connection address has a corresponding physical server, and specifically can be managed by a configuration file, a service registry, and the like. The middleware 102 also establishes a service call relationship table of virtual connection addresses and corresponding business services, ensuring that each virtual connection address points correctly to a corresponding business service. So that the middleware 102 can allocate access requirements to business services according to the real-time state of the cluster server at runtime.
In the middleware-based cluster service deployment method, firstly, service data of service to be deployed is acquired, and cluster servers are acquired, wherein the cluster servers comprise at least one independent server, the service data comprise service information and service deployment data packets, and detailed information of the service to be deployed and available cluster servers can be known by acquiring necessary information of the service services and the cluster servers; then, according to the business service deployment data packet, the business service is deployed into the cluster server, and by deploying a plurality of business services on at least one independent server, the resource utilization rate is improved, and meanwhile, the efficient deployment of the business service is realized; then, according to the business service information, distributing virtual connection addresses of all business services deployed in the cluster server, so that external access to each business service is completed through the corresponding virtual connection address instead of being directly connected to the cluster server, and providing preposed access distribution processing for load balancing of the cluster server, thereby improving the resource utilization rate of the cluster server; and finally, determining the address mapping relation between each virtual connection address and the independent server, and determining the service calling relation between each virtual connection address and the corresponding business service, and ensuring that the access request to the business service can be correctly routed to the corresponding cluster server by determining the address mapping relation and the service calling relation so as to improve the utilization rate and the load balancing effect of the cluster server. In the method, the resource utilization rate of the cluster server is effectively improved by deploying a plurality of business services on at least one independent server. Then, by distributing virtual connection addresses, establishing address mapping relationships and determining service calling relationships, the overall load balancing effect is optimized, and the requests can be correctly distributed to different business services.
In an exemplary embodiment, after the cluster server is acquired in step S201, the method further includes: acquiring server information of each independent server; and determining the calling weight of each independent server according to the server information.
Illustratively, the middleware further acquires detailed information of each independent server based on the acquisition of the cluster server, and specifically includes hardware configuration, available resources and the like of the server. And then, the middleware determines the calling weight of each independent server according to the acquired server information so as to reflect the performance and load condition of the server, and can specifically formulate a weight calculation rule and determine the calling weight based on the percentage of hardware indexes, the response time of the server and the like. The subsequent middleware can dynamically allocate based on the calling weight when the subsequent middleware allocates the independent servers to the business service.
In this embodiment, by acquiring detailed server information, the hardware configuration and available resources of each independent server can be comprehensively known, and the call weight of each independent server can be further determined, so that the load balancing process can be optimized according to the performance of the server, and the stability and availability of the cluster server under different loads can be improved.
In an exemplary embodiment, the step S202 deploys the business service to the cluster server according to the business service deployment packet, and further includes: for any business service, determining a server requirement required by any business service according to business service information of any business service; according to the server demand, determining a target independent server from independent servers of the cluster servers; and deploying the business service to the target independent server according to the business service deployment data packet.
Illustratively, for any business service, the middleware determines the server resources required by the middleware according to the business service information of the business service, including but not limited to a CPU, a memory, a storage and the like. The service requirement of the service on the server resource can be determined by analyzing the configuration items in the service information to form a server requirement specification, or the number of independent servers deployed by each service can be directly preset by a user. And then, the middleware selects a target independent server which meets the conditions from the independent servers of the cluster servers according to the server requirements of the business service so as to ensure that the performance and the resource requirements of the business service are met. And then, the middleware deploys the business service to the target independent server determined before according to the business service deployment data packet, ensures the correct operation of the business service in the cluster, and starts the business service.
In this embodiment, by determining the server requirement of the service, the target independent server can be more accurately matched, the service can be better allocated, the resource utilization rate is optimized, and the load balancing effect and performance are improved.
In an exemplary embodiment, after determining the service call relationship between each virtual connection address and the corresponding business service in step S204, the method further includes: responding to the access requirement of the virtual connection address, and determining a target business service corresponding to the virtual connection address according to the service calling relation; determining a target independent server corresponding to the target business service according to the address mapping relation; and determining a target independent server from the target independent servers according to the calling weight, and forwarding the access information of the access requirement to the target independent server, so that the target independent server provides target business service according to the access information.
The middleware responds to the access requirement of the user terminal to the virtual connection address, and determines the target business service corresponding to the virtual connection address according to the service calling relationship, namely, finds the specific business service required to process the request. And then, the middleware determines a target independent server corresponding to the target business service, namely a physical node where the business service is located, by utilizing the address mapping relation. And finally, selecting a proper server from the target independent servers according to the calling weight of the independent servers by the middleware, and forwarding the access information of the access requirement to the server. After the target independent server receives the access requirement, the target business service required by the target independent server is determined according to the access information, and the corresponding target business service is provided. Illustrating the use of call weights: each business service is deployed in all independent servers, including an independent server 1, an independent server 2 and an independent server 3, and the calling weights among the three independent servers are 1,2 and 3 respectively; the frequency with which the middleware forwards any access requirements to each individual server should then be weighted accordingly, i.e. 1 time to individual server 1,2 times to individual server 2,3 times to individual server 3, for every 6 access requirements.
In this embodiment, through the address mapping relationship and the service calling relationship, it is ensured that the request can be accurately routed to the correct target business service and the independent server. By taking the call weight into consideration, the request load can be more reasonably distributed, and the effect and performance of load balancing are improved, so that the overall service availability is improved, and the stable operation of business service is ensured.
In an exemplary embodiment, the step S201 acquires business service data of the business service to be deployed, and further includes: acquiring verification information of business services to be deployed; according to a preset verification mode, carrying out safety verification on verification information; and under the condition that the safety check is passed, acquiring business service data of the business service to be deployed.
Illustratively, when uploading service data, the user also uploads verification information for the service data. The middleware acquires the business service data and simultaneously acquires the verification information of the business service, wherein the verification information comprises information used for verifying the integrity of the configuration file, such as a digital signature, a hash value and the like. The middleware performs security verification on the acquired verification information according to a preset verification mode or a preset secret key so as to verify the integrity and security of business service data. Only if the security check passes, the middleware continues to acquire the detailed data of the business service.
In the embodiment, the integrity of the service data to be deployed in the transmission process can be ensured by acquiring the verification information and carrying out the safety verification, the data file of the service is ensured not to be tampered, and the safety and the reliability of the service are improved.
In an exemplary embodiment, the step S201 acquires business service data of the business service to be deployed, and further includes: according to a preset period, periodically acquiring business service data of all business services from a preset business service library; determining the business service to be deployed according to the business service data of all the business services; and acquiring business service data of the business service to be deployed from a preset business service library.
Illustratively, the middleware periodically obtains the latest data of all business services from a preset business service library according to a preset periodic task. And then, screening out service services conforming to deployment conditions, namely undeployed service services, according to the acquired latest data of all the service services. After determining the business services to be deployed, the middleware acquires the detailed data of the business services to be deployed from a preset business service library again.
In this embodiment, by periodically acquiring the latest data of all the business services, the data in the business service library can be updated in time, so that timeliness and accuracy of the acquired data are ensured. By determining the business service to be deployed according to the latest data, the sensitivity to business service change is improved, and the change can be responded and processed in time.
In another exemplary embodiment, as shown in fig. 3, the present application further provides another middleware-based cluster service deployment method, which includes the following steps:
Step S301, periodically acquiring business service data of all business services from a preset business service library according to a preset period.
The business service data comprises business service information and business service deployment data packets.
Step S302, according to the business service data of all business services, determining the business service to be deployed.
Step S303, obtaining the verification information of the business service to be deployed from a preset business service library, and carrying out safety verification on the verification information according to a preset verification mode.
Step S304, under the condition that the safety check is passed, acquiring business service data of business service to be deployed from a preset business service library.
In step S305, server information of the cluster server and each independent server is acquired.
Wherein the cluster server comprises at least one independent server.
Step S306, determining the calling weight of each independent server according to the server information.
Step S307, for any service, determines a server requirement required by any service according to the service information of any service.
Step S308, determining a target independent server from independent servers of the cluster servers according to the server demand.
Step S309, according to the business service deployment data packet, the business service is deployed to the target independent server.
Step S310, distributing virtual connection addresses of all business services deployed to the cluster server according to the business service information.
Step S311, determining an address mapping relationship between each virtual connection address and the independent server, and determining a service call relationship between each virtual connection address and the corresponding business service.
In step S312, in response to the access requirement for the virtual connection address, the target business service corresponding to the virtual connection address is determined according to the service call relationship.
Step S313, according to the address mapping relation, determining the target independent server corresponding to the target business service.
Step S314, determining a target independent server from the target independent servers according to the calling weight, and forwarding the access information of the access requirement to the target independent server, so that the target independent server provides the target business service according to the access information.
In the embodiment, a plurality of business services can be deployed in any resource scene, particularly in the development scene of limited resources, so that the hardware resource consumption of one business service corresponding to one server in the traditional mode is reduced, the deployment and release of the business services can be rapidly and safely automatically performed, and the time for establishing a cluster is saved.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a middleware-based cluster service deployment device for realizing the middleware-based cluster service deployment method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the one or more middleware-based cluster service deployment devices provided below may be referred to the limitation of the middleware-based cluster service deployment method hereinabove, and will not be repeated herein.
In an exemplary embodiment, as shown in fig. 4, there is provided a middleware-based cluster service deployment apparatus, including: a data acquisition module 401, a service deployment module 402, an address allocation module 403, and a relationship determination module 404, wherein:
a data acquisition module 401, configured to acquire service data of a service to be deployed, and acquire a cluster server; the cluster server comprises at least one independent server; the business service data comprises business service information and business service deployment data packets;
A service deployment module 402, configured to deploy a service to a cluster server according to the service deployment packet;
An address allocation module 403, configured to allocate virtual connection addresses of each service deployed to the cluster server according to the service information;
the relationship determining module 404 is configured to determine an address mapping relationship between each virtual connection address and an independent server, and determine a service call relationship between each virtual connection address and a corresponding business service.
In one embodiment, the middleware-based cluster service deployment device further includes a weight determining module, configured to obtain server information of each independent server; and determining the calling weight of each independent server according to the server information.
In one embodiment, the service deployment module 402 is further configured to determine, for any service, a server requirement required by any service according to service information of the any service; according to the server demand, determining a target independent server from independent servers of the cluster servers; and deploying the business service to the target independent server according to the business service deployment data packet.
In one embodiment, the middleware-based cluster service deployment device further includes a demand response module, configured to determine, according to a service call relationship, a target business service corresponding to the virtual connection address in response to an access demand for the virtual connection address; determining a target independent server corresponding to the target business service according to the address mapping relation; and determining a target independent server from the target independent servers according to the calling weight, and forwarding the access information of the access requirement to the target independent server, so that the target independent server provides target business service according to the access information.
In one embodiment, the data obtaining module 401 is further configured to obtain verification information of a business service to be deployed; according to a preset verification mode, carrying out safety verification on verification information; and under the condition that the safety check is passed, acquiring business service data of the business service to be deployed.
In one embodiment, the data obtaining module 401 is further configured to periodically obtain service data of all service services from a preset service library according to a preset period; determining the business service to be deployed according to the business service data of all the business services; and acquiring business service data of the business service to be deployed from a preset business service library.
The above-described modules in the middleware-based clustered service deployment apparatus may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one exemplary embodiment, a computer device is provided, which may be a terminal, and an internal structure diagram thereof may be as shown in fig. 5. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program, when executed by a processor, implements a middleware-based cluster service deployment method. The display unit of the computer device is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in FIG. 5 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In an embodiment, there is also provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are both information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data are required to meet the related regulations.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magneto-resistive random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (PHASE CHANGE Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in various forms such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.
Claims (10)
1. A middleware-based cluster service deployment method, the method comprising:
Acquiring business service data of business service to be deployed and acquiring a cluster server; the cluster server comprises at least one independent server; the business service data comprises business service information and business service deployment data packets;
Deploying the business service to the cluster server according to the business service deployment data packet;
Distributing virtual connection addresses of the business services deployed to the cluster servers according to the business service information;
And determining the address mapping relation between each virtual connection address and the independent server, and determining the service calling relation between each virtual connection address and the corresponding business service.
2. The method of claim 1, further comprising, after acquiring the cluster server:
Acquiring server information of each independent server;
and determining the calling weight of each independent server according to the server information.
3. The method according to claim 2, wherein the deploying the business service into the cluster server according to the business service deployment data packet comprises:
for any business service, determining a server requirement required by the any business service according to business service information of the any business service;
according to the server demand, determining a target independent server from independent servers of the cluster servers;
and deploying the business service to the target independent server according to the business service deployment data packet.
4. A method according to claim 3, further comprising, after determining the service invocation relation of each virtual connection address with the corresponding traffic service:
Responding to the access requirement of the virtual connection address, and determining a target business service corresponding to the virtual connection address according to the service calling relation;
Determining a target independent server corresponding to the target business service according to the address mapping relation;
and determining one target independent server from the target independent servers according to the calling weight, and forwarding the access information of the access requirement to the one target independent server so that the one target independent server provides target business service according to the access information.
5. The method of claim 1, wherein the obtaining business service data of the business service to be deployed comprises:
Acquiring verification information of business services to be deployed;
According to a preset verification mode, carrying out safety verification on the verification information;
And under the condition that the safety check passes, acquiring business service data of business service to be deployed.
6. The method of claim 1, wherein the obtaining business service data of the business service to be deployed comprises:
According to a preset period, periodically acquiring business service data of all business services from a preset business service library;
determining the business service to be deployed according to the business service data of all the business services;
And acquiring business service data of the business service to be deployed from a preset business service library.
7. A middleware-based cluster service deployment apparatus, the apparatus comprising:
The data acquisition module is used for acquiring business service data of business services to be deployed and acquiring a cluster server; the cluster server comprises at least one independent server; the business service data comprises business service information and business service deployment data packets;
the service deployment module is used for deploying the business service to the cluster server according to the business service deployment data packet;
The address allocation module is used for allocating virtual connection addresses of the business services deployed to the cluster servers according to the business service information;
and the relation determining module is used for determining the address mapping relation between each virtual connection address and the independent server and determining the service calling relation between each virtual connection address and the corresponding business service.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410414062.0A CN118018552B (en) | 2024-04-08 | 2024-04-08 | Cluster service deployment method and device based on middleware and computer equipment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410414062.0A CN118018552B (en) | 2024-04-08 | 2024-04-08 | Cluster service deployment method and device based on middleware and computer equipment |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN118018552A CN118018552A (en) | 2024-05-10 |
| CN118018552B true CN118018552B (en) | 2024-06-11 |
Family
ID=90943279
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202410414062.0A Active CN118018552B (en) | 2024-04-08 | 2024-04-08 | Cluster service deployment method and device based on middleware and computer equipment |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN118018552B (en) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111190837A (en) * | 2019-08-13 | 2020-05-22 | 腾讯科技(深圳)有限公司 | Information communication method, device and computer readable storage medium |
| CN114896621A (en) * | 2022-07-15 | 2022-08-12 | 深圳竹云科技股份有限公司 | Application service acquisition method, encryption method, device and computer equipment |
| CN115484232A (en) * | 2022-07-29 | 2022-12-16 | 天翼云科技有限公司 | Deployment method, device, equipment and storage medium of DHCP server |
| CN117155934A (en) * | 2023-10-31 | 2023-12-01 | 北京比格大数据有限公司 | Cross-cluster communication method and device, equipment and storage medium |
-
2024
- 2024-04-08 CN CN202410414062.0A patent/CN118018552B/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111190837A (en) * | 2019-08-13 | 2020-05-22 | 腾讯科技(深圳)有限公司 | Information communication method, device and computer readable storage medium |
| CN114896621A (en) * | 2022-07-15 | 2022-08-12 | 深圳竹云科技股份有限公司 | Application service acquisition method, encryption method, device and computer equipment |
| CN115484232A (en) * | 2022-07-29 | 2022-12-16 | 天翼云科技有限公司 | Deployment method, device, equipment and storage medium of DHCP server |
| CN117155934A (en) * | 2023-10-31 | 2023-12-01 | 北京比格大数据有限公司 | Cross-cluster communication method and device, equipment and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN118018552A (en) | 2024-05-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11196755B2 (en) | Cross-blockchain interaction systems | |
| CN108399101B (en) | Method, apparatus and system for resource scheduling | |
| CN114401187B (en) | Gray scale issuing method, device, computer equipment and storage medium | |
| CN112748879A (en) | Data acquisition method, system, device, computer equipment and storage medium | |
| CN111737104A (en) | Blockchain network service platform and its test case sharing method and storage medium | |
| CN113553178A (en) | Task processing method, device and electronic device | |
| CN118764339B (en) | Network communication methods, devices, equipment, and storage media based on hybrid networking | |
| CN114924888A (en) | Resource allocation method, data processing method, apparatus, device and storage medium | |
| CN113485830A (en) | Micro-service automatic capacity expansion method for power grid monitoring system | |
| CN116541142A (en) | Task scheduling method, device, equipment, storage medium and computer program product | |
| CN118051344A (en) | Method and device for distributing hardware resources and hardware resource management system | |
| CN114363254A (en) | Tenant isolation method and device and electronic equipment | |
| CN117435129A (en) | Storage cluster expansion method and device, computer equipment and storage medium | |
| CN116301658A (en) | Multi-copy storage method and related device | |
| CN118018552B (en) | Cluster service deployment method and device based on middleware and computer equipment | |
| CN114785798A (en) | Node calling method and device, computer equipment and storage medium | |
| CN113051297A (en) | Transaction data query method and device, computer equipment and storage medium | |
| US20250260735A1 (en) | Container image streaming among peers in a dynamically scalable p2p cluster | |
| CN119201468A (en) | GPU resource load balancing method, device and computer equipment | |
| CN115016738B (en) | A method, device, system, electronic device and medium for data migration | |
| CN117082143A (en) | Resource scheduling method, device, computer equipment and storage medium | |
| CN118260031A (en) | Node resource determination method, container scheduling method, device and storage medium | |
| CN119496788B (en) | Object storage method, apparatus, device, readable storage medium, and program product | |
| CN115729576A (en) | Application deployment method and device, computer equipment and storage medium | |
| CN113067720B (en) | A service chain remapping method, electronic device and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |