Service control system, gateway service method, service request forwarding method and device

文档序号:7342 发布日期:2021-09-17 浏览:21次 中文

1. A traffic control system, comprising: the system comprises load balancing equipment, a host cluster, a scalable cluster and a data processing gateway;

the host cluster and the scalable cluster are in communication connection with the load balancing device;

the load balancing device is used for receiving service request data and forwarding the service request data to the host cluster or the scalable cluster;

the host computer cluster comprises a plurality of host computers, and data processing gateways are integrated in the host computers;

the scalable cluster comprises one or more service processing units, and a data processing gateway is integrated in each service processing unit;

the data processing gateway integrated in the host and the data processing gateway integrated in the service processing unit can process the service request data; and the scalable cluster can adjust the number of the service processing units according to the self load monitoring data.

2. A gateway serving method, comprising:

acquiring load monitoring data of a scalable cluster;

determining the number of service processing units required to be included in the current scalable cluster according to the load monitoring data;

and adjusting the number of the service processing units in the scalable cluster according to the number of the service processing units to be included in the current scalable cluster.

3. The method of claim 2, wherein the load monitoring data comprises at least one of:

CPU occupation data, memory occupation data and network request volume data.

4. The method of claim 3, wherein the load monitoring data comprises CPU occupancy data, memory occupancy data, and network request volume data;

the CPU occupation data comprises the average CPU utilization rate in unit time, the memory occupation data comprises the memory utilization rate in unit time, and the network request data comprises the average query rate in unit time.

5. The method of claim 2,

determining the number of service processing units to be included in the current scalable cluster according to the load monitoring data includes:

and determining the number of the service processing units required to be included in the current scalable cluster according to the load monitoring data and the corresponding relation between the preset load monitoring data and the number of the service processing units.

6. A service request forwarding method is characterized by comprising the following steps:

receiving service request data;

acquiring the service state of the current host cluster and the service state of the scalable cluster;

forwarding the service request data to the host cluster or the scalable cluster based on a current service state of the host cluster and a service state of the scalable cluster.

7. The method of claim 6, wherein if the service status of the host cluster is currently available, the service status of the scalable cluster is unavailable;

forwarding, by the server, the service request data to the host cluster or the scalable cluster based on the current service state of the host cluster and the service state of the scalable cluster, including:

forwarding the service request data to the host cluster based on the current service state of the host cluster and the service state of the scalable cluster.

8. A gateway serving apparatus, comprising:

the monitoring data acquisition module is used for acquiring the load monitoring data of the scalable cluster;

the determining module is used for determining the number of the service processing units required to be included in the current scalable cluster according to the load monitoring data;

and the adjusting module is used for adjusting the number of the service processing units in the scalable cluster according to the number of the service processing units required to be included in the current scalable cluster.

9. A service request forwarding apparatus, comprising:

the receiving module is used for receiving the service request data;

a state obtaining module, configured to obtain a current service state of the host cluster and a current service state of the scalable cluster;

and the forwarding module is used for forwarding the service request data to the host cluster or the scalable cluster based on the current service state of the host cluster and the service state of the scalable cluster.

10. An electronic device, comprising: a processor and a memory;

the processor is adapted to perform the steps of the method of any one of claims 2 to 7 by calling a program or instructions stored in the memory.

11. A computer-readable storage medium, characterized in that it stores a program or instructions for causing a computer to carry out the steps of the method according to any one of claims 2 to 7.

Background

With the development of big data and AI technology, various industries are aware of the value of big data technology for their product service, big data applications and big data platforms become core technologies of various IT technology companies and internet companies, an IT company, especially an internet company, has a large amount of log data to be analyzed through the big data platform, data needs to be collected, transmitted and sent to the big data platform from a log-generated business machine, data flow between a customer business device and the big data platform is generally realized through a data gateway service, a common open source big data scheme is available through a message flow queue such as kafka/pulsar/rabbitmq, and common user business data needs to be packaged and format converted before being pushed into the message flow queue.

In the existing scheme, load balancing equipment is deployed in front of a message queue, a custom-developed data preprocessing program (data service gateway) is deployed between the load balancing equipment and the message queue, and the data service gateway program is deployed in a multi-machine mode by means of the load balancing equipment, so that flow balancing is achieved, and pressure of a single machine is reduced.

However, with the above scheme, the request volume of the service gateway stand-alone service has an upper limit bottleneck, which cannot meet the requirement of improving the system throughput in real time when the service traffic of the client suddenly increases. Therefore, the data service gateway in the prior art has poor stability and weak dynamic lateral expansion capability.

Disclosure of Invention

In order to solve the technical problem or at least partially solve the technical problem, the present disclosure provides a service control system, a gateway service method, a service request forwarding method and an apparatus.

In a first aspect, the present disclosure provides a service control system, including: the system comprises load balancing equipment, a host cluster, a scalable cluster and a data processing gateway;

the host cluster and the scalable cluster are in communication connection with the load balancing device;

the load balancing device is used for receiving service request data and forwarding the service request data to the host cluster or the scalable cluster;

the host computer cluster comprises a plurality of host computers, and data processing gateways are integrated in the host computers;

the scalable cluster comprises one or more service processing units, and a data processing gateway is integrated in each service processing unit;

the data processing gateway integrated in the host and the data processing gateway integrated in the service processing unit can process the service request data; and the scalable cluster can adjust the number of the service processing units according to the self load monitoring data.

In a second aspect, the present disclosure further provides a gateway service method, where the gateway service method includes:

acquiring load monitoring data of a scalable cluster;

determining the number of service processing units required to be included in the current scalable cluster according to the load monitoring data;

and adjusting the number of the service processing units in the scalable cluster according to the number of the service processing units to be included in the current scalable cluster.

In a third aspect, the present disclosure further provides a service request forwarding method, where the service request forwarding method includes:

receiving service request data;

acquiring the service state of the current host cluster and the service state of the scalable cluster;

forwarding the service request data to the host cluster or the scalable cluster based on a current service state of the host cluster and a service state of the scalable cluster.

In a fourth aspect, the present disclosure further provides a gateway service apparatus, including:

the monitoring data acquisition module is used for acquiring the load monitoring data of the scalable cluster;

the determining module is used for determining the number of the service processing units required to be included in the current scalable cluster according to the load monitoring data;

and the adjusting module is used for adjusting the number of the service processing units in the scalable cluster according to the number of the service processing units required to be included in the current scalable cluster.

In a fifth aspect, the present disclosure further provides a service request forwarding apparatus, where the service request forwarding apparatus includes:

the receiving module is used for receiving the service request data;

a state obtaining module, configured to obtain a current service state of the host cluster and a current service state of the scalable cluster;

and the forwarding module is used for forwarding the service request data to the host cluster or the scalable cluster based on the current service state of the host cluster and the service state of the scalable cluster.

In a sixth aspect, the present disclosure also provides an electronic device, including: a processor and a memory;

the processor is configured to perform the steps of any of the methods described above by calling a program or instructions stored in the memory.

In a seventh aspect, the present disclosure also provides a computer-readable storage medium storing a program or instructions for causing a computer to perform the steps of any of the above methods.

Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages:

according to the technical scheme provided by the embodiment of the disclosure, the service control system comprises the scalable cluster, the scalable cluster can automatically expand or reduce the capacity according to the load monitoring data of the scalable cluster, and the real-time dynamic capacity expansion bearing service can be realized when the service load rises; when the service load is reduced, the capacity can be reduced in real time, and the cost is reduced. In addition, in the whole capacity expansion or capacity reduction process, operation and maintenance personnel are not needed to participate, and the workload of the operation and maintenance personnel can be reduced.

In addition, in the technical scheme provided by the embodiment of the disclosure, the deployment of the host cluster and the deployment of the scalable cluster can adopt cross-machine-room and cross-region deployment, so as to achieve the purposes of multiple places, double activity and high availability. And the service processing unit has a relatively excellent abnormal recovery mechanism, so that the stability of the whole service control system can be ensured.

Drawings

The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.

In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.

Fig. 1 is a block diagram of a service control system according to an embodiment of the present disclosure;

fig. 2 is a block diagram of another scalable cluster according to an embodiment of the present disclosure;

fig. 3 is a flowchart of a gateway service method provided by an embodiment of the present disclosure;

fig. 4 is a flowchart of a service request forwarding method according to an embodiment of the present disclosure;

fig. 5 is a schematic structural diagram of a gateway service apparatus according to an embodiment of the present disclosure;

fig. 6 is a schematic structural diagram of a service request forwarding apparatus according to an embodiment of the present disclosure;

fig. 7 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present disclosure.

Detailed Description

In order that the above objects, features and advantages of the present disclosure may be more clearly understood, aspects of the present disclosure will be further described below. It should be noted that the embodiments and features of the embodiments of the present disclosure may be combined with each other without conflict.

In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced in other ways than those described herein; it is to be understood that the embodiments disclosed in the specification are only a few embodiments of the present disclosure, and not all embodiments.

Fig. 1 is a block diagram of a service control system according to an embodiment of the present disclosure. Referring to fig. 1, the traffic control system includes: the system comprises a load balancing device 1, a host cluster 2, a scalable cluster 3 and a data processing gateway; the host cluster 2 and the scalable cluster 3 are both in communication connection with the load balancing device 1; the load balancing device 1 is used for receiving the service request data and forwarding the service request data to the host cluster 2 or the scalable cluster 3; the host cluster 2 comprises a plurality of hosts, and a data processing gateway is integrated in the hosts; the scalable cluster 3 comprises one or more service processing units 311, and a data processing gateway is integrated in the service processing unit 311; the data processing gateway integrated in the host and the data processing gateway integrated in the service processing unit 311 can both process the service request data; and, the scalable cluster can adjust the number of the service processing units 311 included therein according to its own load monitoring data.

The scalable cluster can be deployed in an hpa mode based on kubernets. Illustratively, with continued reference to fig. 1, the scalable cluster includes a capacity expansion/reduction module and a monitoring module 32. The capacity expansion/reduction module 31 includes one or more service processing units 311 for processing service request data. The service processing unit 311, namely Pod, is the smallest unit of kubernets. There is one pause container and several service containers in one pod. The pod binds the containers together and manages them as a unit. Each service processing unit can provide gateway service, namely, process service request data. The monitoring module 32 is configured to monitor the overall load condition of the capacity expansion/reduction module 31, further obtain load monitoring data, and send the load monitoring data to the capacity expansion/reduction module 31. After receiving the load monitoring data, the capacity expansion/reduction module 31 determines the number of the service processing units that it needs to include based on the load monitoring data, and according to the number of the service processing units that it needs to include, newly builds a service processing unit or deletes redundant existing service processing units, so as to achieve the purpose of capacity expansion or reduction.

Fig. 2 is a block diagram of another scalable cluster structure provided in the embodiment of the present disclosure. In contrast to fig. 1, the scalable cluster in fig. 2 further comprises an adaptation module. Specifically, referring to fig. 2, the monitoring module is configured to monitor an overall load condition of the capacity expansion/capacity reduction module, so as to obtain load monitoring data, and send the load monitoring data to the adaptation module, and the adaptation module is configured to convert the load monitoring data into data recognizable by the capacity expansion/capacity reduction module according to a preset protocol conversion rule, and send the converted data to the capacity expansion/capacity reduction module. And meanwhile, the adaptation module also feeds back feedback information that the load monitoring data is successfully received to the monitoring module. After receiving the converted data, the capacity expansion/reduction module determines the number of the service processing units required to be included based on the converted data, and according to the number of the service processing units required to be included, newly builds a service processing unit or deletes redundant existing service processing units to achieve the purpose of capacity expansion or reduction.

According to the technical scheme, the data processing gateway comprises the scalable cluster, the scalable cluster can adjust the number of the service processing units according to the load monitoring data, automatic capacity expansion or capacity reduction is carried out according to the load monitoring data, and real-time dynamic capacity expansion bearing service can be realized when the service load rises; when the service load is reduced, the capacity can be reduced in real time, and the cost is reduced. In addition, in the whole capacity expansion or capacity reduction process, operation and maintenance personnel are not needed to participate, and the workload of the operation and maintenance personnel can be reduced.

In addition, in the technical scheme, the deployment of the host cluster and the deployment of the scalable cluster can adopt a cross-machine-room and cross-region deployment strategy, so that the purposes of multiple places, double activity and high availability are achieved. And because the service processing unit has a relatively excellent exception recovery mechanism, the stability of the whole data processing gateway can be ensured.

It should be further noted that, in the above technical solution, the host cluster may be a host cluster manually expanded by an operation and maintenance person, or may be a host cluster not manually expanded by the operation and maintenance person. This is not limited by the present application.

Further, if the operation and maintenance personnel are required to manually expand the host cluster according to the service requirement, the expansion method is that the operation and maintenance personnel manually deploy the data processing gateway process on the new machine device (such as the host 5 and the host 6 in fig. 1), and the address after the data processing gateway process is started is configured on the load balancing device on the upper layer to receive data forwarding.

It should be noted that, the present application does not limit the deployment scale of the host cluster and the deployment scale of the scalable cluster in the data processing gateway.

Fig. 3 is a flowchart of a gateway service method provided by an embodiment of the present disclosure, where the gateway service method is applied to the aforementioned service control system. The method is performed by a scalable cluster. Specifically, referring to fig. 3, the method includes:

and S110, acquiring load monitoring data of the scalable cluster.

Optionally, the load monitoring data comprises at least one of: CPU occupation data, memory occupation data and network request volume data.

It should be emphasized that in the load monitoring data, the network request amount data refers to network request amount data of the scalable cluster, which is obtained by monitoring the scalable cluster, rather than monitoring the load balancing device. This is because when the service control system provided in the present application is used for service request processing, a part of the service request data will be forwarded to the host cluster, and another part of the service request data will be forwarded to the scalable cluster. Obviously, the data of the network request amount obtained by monitoring the scalable cluster is often smaller than the data of the network request amount obtained by monitoring the load balancing device. The setting can ensure that the quantity of the service processing units required to be included in the current scalable cluster obtained subsequently is accurate.

In practice, there are various parameters that can be used as CPU occupancy data, and the CPU occupancy data may include, for example, the CPU instantaneous utilization, the CPU average utilization per unit time, and the like. Similarly, there are various parameters that can be used as memory footprint data and as network request volume data, which is not limited in this application.

Optionally, if the load monitoring data includes CPU occupation data, memory occupation data, and network request amount data; the CPU occupation data comprises the average CPU utilization rate in unit time, the memory occupation data comprises the memory utilization rate in unit time, and the network request data comprises the average query rate in unit time. The specific time length of the unit time is taken as a value, and the application is not limited. In practice, it can be set by a worker, for example, it can be set that the unit time is equal to 1 minute. By setting in this way, the number of the finally determined service processing units which need to be included in the current scalable cluster can be more reasonable by using the plurality of indexes as load monitoring data, which is beneficial to improving the stability of the whole data processing gateway. In addition, by using the average utilization rate of the CPU in unit time, the memory utilization rate in unit time and the average query rate in unit time as load monitoring data, the problem of heavy system burden caused by frequent expansion or contraction of a scalable cluster when the business flow of a client is suddenly increased can be solved.

And S120, determining the number of the service processing units required to be included in the current scalable cluster according to the load monitoring data.

There are various ways to implement this step, which should not be limited in this application. Exemplarily, the number of the service processing units to be included in the current scalable cluster is determined according to the load monitoring data and the preset corresponding relationship between the load monitoring data and the capacity expansion/capacity reduction ratio.

For example, the maximum load of the average query rate in 1 minute of the entire scalable cluster may be preset to 2000, and the average utilization rate of the CPU in 1 minute reaches 90% or more, and the capacity is expanded by 30%. Assuming that in the actual use process, at a certain time, the load monitoring data indicates that the maximum load of the average query rate in 1 minute of the current scalable cluster is greater than 2000, and the average utilization rate of the CPU reaches 91% in 1 minute, and the current scalable cluster includes 10 service processing units, then newly creating 3 service processing units.

Optionally, the implementation method in this step may further include pre-constructing a functional relationship with the load monitoring data as an independent variable and the number of the service processing units as a dependent variable. And determining the number of the service processing units required to be included in the current scalable cluster according to the load monitoring data and the functional relation.

S130, adjusting the number of the service processing units in the scalable cluster according to the number of the service processing units required to be included in the current scalable cluster.

Optionally, when executing this step, the number of service processing units already included in the current scalable cluster is determined, and new creation or deletion of the service processing units is performed according to the number of service processing units already included in the current scalable cluster and the number of service processing units that need to be included in the current scalable cluster.

Specifically, if the number n1 of the service processing units included in the current scalable cluster is greater than the number n2 of the service processing units that need to be included in the current scalable cluster, the difference n1-n2 between the two is calculated, and n1-n2 service processing units are deleted, so that the purpose of capacity reduction is achieved. If the number n1 of the service processing units included in the current scalable cluster is smaller than the number n2 of the service processing units required to be included in the current scalable cluster, calculating the difference n2-n1 between the two, and adding n2-n1 service processing units newly to achieve the purpose of capacity expansion. And if the number n1 of the service processing units included in the current scalable cluster is equal to the number n2 of the service processing units required to be included in the current scalable cluster, no new creation or deletion of the service processing units is performed.

The technical scheme determines the number of the service processing units required to be included in the current scalable cluster according to the load monitoring data; the number of the service processing units in the scalable cluster is adjusted according to the number of the service processing units required to be included in the current scalable cluster, so that real-time dynamic capacity expansion bearing service can be realized when the service load is increased; when the service load is reduced, the capacity can be reduced in real time, and the cost is reduced. In addition, in the whole capacity expansion or capacity reduction process, operation and maintenance personnel are not needed to participate, and the workload of the operation and maintenance personnel can be reduced.

Fig. 4 is a flowchart of a service request forwarding method according to an embodiment of the present disclosure. The service request forwarding method is suitable for the aforementioned service control system. The method is performed by a load balancing device. Illustratively, referring to fig. 4, the method includes:

s210, receiving service request data.

S220, acquiring the service state of the current host cluster and the service state of the scalable cluster.

Wherein the service state of the current host cluster comprises available state and unavailable state. "available" indicates that the current host cluster may provide gateway services, and "unavailable" indicates that the current host cluster may not provide gateway services, such as a failure of the current host cluster.

Similarly, the service state of the current scalable cluster includes both available and not available states. "available" indicates that the current scalable cluster may provide gateway services, and "unavailable" indicates that the current scalable cluster may not provide gateway services, such as a failure of the current scalable cluster.

And S230, forwarding the service request data to the host cluster or the scalable cluster based on the service state of the current host cluster and the service state of the scalable cluster.

Optionally, if the service state of the current host cluster is available, the service state of the scalable cluster is unavailable; forwarding the service request data to the host cluster; if the service state of the current host cluster is unavailable, the service state of the scalable cluster is available; forwarding the service request data to the scalable cluster; if the service state of the current host cluster is available and the service state of the scalable cluster is available, the service request data can be forwarded to the host cluster, and the service request data can also be forwarded to the scalable cluster.

Further, for the case that the service state of the current host cluster is available and the service state of the scalable cluster is available, a preset service request data distribution rule may be further used, and when forwarding the service request data, whether the service request data is forwarded to the host cluster or the scalable cluster is determined according to the service request data distribution rule.

The essence of the technical scheme is that the load balancing device can sense the service state of the host cluster and the service state of the scalable cluster, the host cluster and the scalable cluster are backup, and the service request data is forwarded to the host cluster or the scalable cluster according to the service state of the current host cluster and the service state of the scalable cluster, so that the whole data processing gateway can be ensured to process the service request data in time all the time, and the stability of the whole data processing gateway can be improved.

It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.

Fig. 5 is a schematic structural diagram of a gateway service apparatus provided in the embodiment of the present disclosure, and as shown in fig. 5, the gateway service apparatus is suitable for a service control system provided in the embodiment of the present disclosure; the device includes:

a monitoring data obtaining module 310, configured to obtain load monitoring data of the scalable cluster;

a determining module 320, configured to determine, according to the load monitoring data, the number of service processing units that need to be included in the current scalable cluster;

the adjusting module 330 is configured to adjust the number of the service processing units in the scalable cluster according to the number of the service processing units that need to be included in the current scalable cluster.

Further, the load monitoring data comprises at least one of:

CPU occupation data, memory occupation data and network request volume data.

Further, the load monitoring data comprises CPU occupation data, memory occupation data and network request data;

the CPU occupation data comprises the average CPU utilization rate in unit time, the memory occupation data comprises the memory utilization rate in unit time, and the network request data comprises the average query rate in unit time.

Further, the determining module 320 is configured to determine the number of the service processing units that need to be included in the current scalable cluster according to the load monitoring data and the corresponding relationship between the preset load monitoring data and the number of the service processing units.

The device disclosed in the above embodiment can implement the flow of the gateway service method disclosed in the above method embodiments, and has the same or corresponding beneficial effects. To avoid repetition, further description is omitted here.

Fig. 6 is a schematic structural diagram of a service request forwarding device provided in the embodiment of the present disclosure, and as shown in fig. 6, the service request forwarding device is suitable for a service control system provided in the embodiment of the present disclosure; the device includes:

the service request forwarding device comprises:

a receiving module 410, configured to receive service request data;

a state obtaining module 420, configured to obtain a service state of the current host cluster and a service state of the scalable cluster;

a forwarding module 430, configured to forward the service request data to the host cluster or the scalable cluster based on the current service state of the host cluster and the service state of the scalable cluster.

Further, if the service state of the host cluster is available, the service state of the scalable cluster is unavailable;

a forwarding module 430, configured to forward the service request data to the host cluster based on the current service state of the host cluster and the service state of the scalable cluster.

The device disclosed in the above embodiments can implement the flow of the service request forwarding method disclosed in the above method embodiments, and has the same or corresponding beneficial effects. To avoid repetition, further description is omitted here.

Fig. 7 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present disclosure, and as shown in fig. 7, the electronic device includes:

one or more processors 301, one processor 301 being exemplified in fig. 7;

a memory 302;

the electronic device may further include: an input device 303 and an output device 304.

The processor 301, the memory 302, the input device 303 and the output device 304 in the electronic device may be connected by a bus or other means, and fig. 7 illustrates an example of connection by a bus.

The memory 302, which is a non-transitory computer-readable storage medium, may be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the gateway service method and/or the service request forwarding method in the embodiments of the present disclosure. The processor 301 executes various functional applications of the server and data processing, namely, a gateway service method and/or a service request forwarding method of the above-described method embodiments, by executing software programs, instructions and modules stored in the memory 302.

The memory 302 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the electronic device, and the like. Further, the memory 302 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 302 optionally includes memory located remotely from processor 301, which may be connected to a terminal device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.

The input device 303 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic apparatus. The output means 304 may comprise a display device such as a display screen.

Embodiments of the present disclosure also provide a computer-readable storage medium containing a program or instructions for causing a computer to perform a gateway service method when the program or instructions are executed, the method comprising:

acquiring load monitoring data of a scalable cluster;

determining the number of service processing units required to be included in the current scalable cluster according to the load monitoring data;

and adjusting the number of the service processing units in the scalable cluster according to the number of the service processing units to be included in the current scalable cluster.

The disclosed embodiments also provide a computer-readable storage medium, which stores a program or an instruction, where the program or the instruction is used to cause a computer to execute a service request forwarding method, where the method includes:

receiving service request data;

acquiring the service state of the current host cluster and the service state of the scalable cluster;

forwarding the service request data to the host cluster or the scalable cluster based on a current service state of the host cluster and a service state of the scalable cluster.

Optionally, the computer-executable instructions, when executed by a computer processor, may also be used to implement the technical solution of the gateway service method and/or the service request forwarding method provided in any embodiment of the present disclosure.

From the above description of the embodiments, it is obvious for a person skilled in the art that the present disclosure can be implemented by software and necessary general hardware, and certainly can be implemented by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present disclosure may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present disclosure.

It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

The foregoing are merely exemplary embodiments of the present disclosure, which enable those skilled in the art to understand or practice the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:一种基于分布式负载均衡的负载对象同步方法及装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!