Server cluster system supporting high concurrency, control method and control deviceTechnical Field
The invention relates to the technical field of communication, in particular to a server cluster system supporting high concurrency, a control method and a control device.
Background
In the field of internet communication, media servers play an important role in providing media resource functions required for implementing various services on an IP network.
With the development of mobile communication technology, the access number of mobile terminals is increased rapidly, and meanwhile, the number of online terminals is increased, so that the requirements on media servers are increased, the current server cluster is not ideal for supporting high concurrency, the load among the media servers is unbalanced, some media servers may run in an overload mode when high concurrency occurs, the downtime occurs, and the user experience is affected.
Disclosure of Invention
The invention aims to solve the problems that the existing server cluster is not ideal for high concurrency support and the load among media servers is unbalanced.
In order to solve the above technical problem, a first aspect of the present invention provides a server cluster system supporting high concurrency, including:
the media servers are used for processing the requests sent by the client;
the main proxy server is connected with the media servers, performs load balancing control on the media servers, and forwards the request sent by the client to one of the media servers according to the load states of the media servers;
a slave proxy server connected to the plurality of media servers as a backup server of the master proxy server;
and switching the route, connecting the master proxy server and the slave proxy server, performing health detection on the master proxy server and the slave proxy server, and forwarding the received request sent by the client to the master proxy server or the slave proxy server.
According to a preferred embodiment of the present invention, the health detection performed on the master proxy server and the slave proxy server specifically includes: and switching the route to continuously send health detection messages to the master proxy server and the slave proxy server, judging whether the master proxy server and the slave proxy server return health detection response messages within a specified time, and if the health detection response messages are not returned, determining that the health state of the proxy server is abnormal.
According to a preferred embodiment of the invention, the health detection is performed using a heartbeat protocol.
According to a preferred embodiment of the present invention, forwarding the received request sent by the client to the master proxy server or the slave proxy server specifically includes: when the health state of the master proxy server is normal, the switching route forwards the request sent by the client to the master proxy server, and when the health state of the master proxy server is abnormal, the switching route forwards the request sent by the client to the slave proxy server.
According to a preferred embodiment of the present invention, the switching route is provided with priorities of the master proxy server and the slave proxy server, the priority of the master proxy server is higher than that of the slave proxy server when the health status of the master proxy server is normal, and the priority of the master proxy server is lowered and the priority of the slave proxy server is raised when the health status of the master proxy server is abnormal.
According to a preferred embodiment of the present invention, the slave proxy server is plural.
According to a preferred embodiment of the invention, the master proxy server and the slave proxy servers are virtual servers.
The second aspect of the present invention provides a control method for a server cluster system supporting high concurrency, where the method includes:
receiving a request sent by a client;
carrying out health state detection on a master proxy server and a slave proxy server, and forwarding a request sent by the client according to the health state;
and the master proxy server or the slave proxy server forwards the request sent by the client to one of the media servers according to the load state of the media servers.
According to a preferred embodiment of the present invention, the detecting the health status of the master proxy server and the slave proxy server specifically comprises:
continuously sending health detection messages to the master proxy server and the slave proxy server, judging whether the master proxy server and the slave proxy server return health detection response messages within a specified time, and determining that the health state of the proxy server is abnormal if the health detection response messages are not returned.
According to a preferred embodiment of the invention, the health detection is performed using a heartbeat protocol.
According to a preferred embodiment of the present invention, forwarding the request sent by the client according to the health status specifically includes:
when the health state of the master proxy server is normal, the request sent by the client is forwarded to the master proxy server, and when the health state of the master proxy server is abnormal, the request sent by the client is forwarded to the slave proxy server.
According to a preferred embodiment of the present invention, the priority of the master proxy server and the priority of the slave proxy server are set, the priority of the master proxy server is higher than that of the slave proxy server when the health status of the master proxy server is normal, and the priority of the master proxy server is lowered and the priority of the slave proxy server is raised when the health status of the master proxy server is abnormal.
According to a preferred embodiment of the present invention, the slave proxy server is plural.
According to a preferred embodiment of the invention, the master proxy server and the slave proxy servers are virtual servers.
A third aspect of the present invention provides a control apparatus for a server cluster system supporting high concurrency, the apparatus including:
the receiving module is used for receiving a request sent by a client;
the forwarding module is used for detecting the health state of the master proxy server and the slave proxy server and forwarding the request sent by the client according to the health state;
and the master proxy server or the slave proxy server forwards the request sent by the client to one of the media servers according to the load state of the media servers.
According to a preferred embodiment of the present invention, the detecting the health status of the master proxy server and the slave proxy server specifically comprises:
continuously sending health detection messages to the master proxy server and the slave proxy server, judging whether the master proxy server and the slave proxy server return health detection response messages within a specified time, and determining that the health state of the proxy server is abnormal if the health detection response messages are not returned.
According to a preferred embodiment of the invention, the health detection is performed using a heartbeat protocol.
According to a preferred embodiment of the present invention, forwarding the request sent by the client according to the health status specifically includes:
when the health state of the master proxy server is normal, the request sent by the client is forwarded to the master proxy server, and when the health state of the master proxy server is abnormal, the request sent by the client is forwarded to the slave proxy server.
According to a preferred embodiment of the present invention, the priority of the master proxy server and the priority of the slave proxy server are set, the priority of the master proxy server is higher than that of the slave proxy server when the health status of the master proxy server is normal, and the priority of the master proxy server is lowered and the priority of the slave proxy server is raised when the health status of the master proxy server is abnormal.
According to a preferred embodiment of the present invention, the slave proxy server is plural.
According to a preferred embodiment of the invention, the master proxy server and the slave proxy servers are virtual servers.
A fourth aspect of the present invention provides a computer-readable medium for storing a computer-readable program for executing the control method of a server cluster system supporting high concurrency.
By adopting the technical scheme, the load balance of the media server is controlled through the proxy server, so that the server cluster supports high concurrency, and the stability of the system is ensured by controlling the switching of the proxy server through the switching route.
Drawings
In order to make the technical problems solved by the present invention, the technical means adopted and the technical effects obtained more clear, the following will describe in detail the embodiments of the present invention with reference to the accompanying drawings. It should be noted, however, that the drawings described below are only illustrations of exemplary embodiments of the invention, from which other embodiments can be derived by those skilled in the art without inventive step.
Fig. 1 is a schematic structural diagram of a server cluster system supporting high concurrency in an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a server cluster system supporting high concurrency according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an apparatus for asynchronously acquiring user attribute information from a third-party platform according to an embodiment of the present invention;
FIG. 4 is a block diagram of a structural framework of a system for asynchronously obtaining user attribute information from a third-party platform according to an embodiment of the present invention;
FIG. 5 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Fig. 6 is a schematic structural diagram of a computer-readable storage medium in an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will now be described more fully hereinafter with reference to the accompanying drawings, in which exemplary embodiments of the invention may be embodied in many specific forms, and should not be construed as limited to the embodiments set forth herein. Rather, these exemplary embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the invention to those skilled in the art.
The structures, properties, effects or other characteristics described in a certain embodiment may be combined in any suitable manner in one or more other embodiments, while still complying with the technical idea of the invention.
In describing particular embodiments, specific details of structures, properties, effects, or other features are set forth in order to provide a thorough understanding of the embodiments by one skilled in the art. However, it is not excluded that a person skilled in the art may implement the invention in a specific case without the above-described structures, performances, effects or other features.
The flow chart in the drawings is only an exemplary flow demonstration, and does not represent that all the contents, operations and steps in the flow chart are necessarily included in the scheme of the invention, nor does it represent that the execution is necessarily performed in the order shown in the drawings. For example, some operations/steps in the flowcharts may be divided, some operations/steps may be combined or partially combined, and the like, and the execution order shown in the flowcharts may be changed according to actual situations without departing from the gist of the present invention.
The block diagrams in the figures generally represent functional entities and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different network and/or processing unit devices and/or microcontroller devices.
The same reference numerals denote the same or similar elements, components, or parts throughout the drawings, and thus, a repetitive description thereof may be omitted hereinafter. It will be further understood that, although the terms first, second, third, etc. may be used herein to describe various elements, components, or sections, these elements, components, or sections should not be limited by these terms. That is, these phrases are used only to distinguish one from another. For example, a first device may also be referred to as a second device without departing from the spirit of the present invention. Furthermore, the term "and/or", "and/or" is intended to include all combinations of any one or more of the listed items.
Fig. 1 is a schematic structural diagram of a server cluster system supporting high concurrency according to the present invention, and as shown in fig. 1, a server cluster system 100 of the present invention includes:
a plurality ofmedia servers 101 for processing requests sent by theclient 105.
The media server supports various communication technology standards, including protocols such as SIP, h.323, IAX2, google talk, etc., can be conveniently interfaced with switch systems such as sipX, OpenPBX, bayone, YATE, or Asterisk, etc., and can provide routing and interconnection communication protocols for audio, video, text, or any other form of media.
Themedia server 101 handles media exchange (mainly voice stream exchange) during a call, and has the following functions:
supporting DTMF signal collection and decoding: receiving DTMF signals from a DTMF telephone according to the regulation of relevant operation parameters sent by the control equipment, and encapsulating the DTMF signals in a signaling to transmit the signaling to the control equipment;
sending of the canned notification: according to the requirement of the control equipment, playing a specified recording notice to the user by using specified voice;
conversion between different coding algorithms: the method supports various voice coding and decoding algorithms such as G.711, G.722, G.726, G.729 and the like, and can realize conversion among the coding and decoding algorithms;
automatic speech synthesis: concatenating several speech elements or fields to form a complete speech prompting notice (fixed or variable);
dynamic voice playing and recording: such as music hold, Follow-me voice service, etc.;
generating and transmitting a tone signal: basic signal tones such as dial tone, busy tone, ring back tone, waiting tone and null tone can be provided;
resource maintenance and management: the maintenance and management of media resources and the device itself, such as data configuration and fault management, are provided in a local mode and a remote mode.
And amaster proxy server 102 connected to the plurality ofmedia servers 101, configured to perform load balancing control on the plurality ofmedia servers 101, and forward a request sent by theclient 105 to one of the plurality ofmedia servers 101 according to a load state of the plurality ofmedia servers 101.
In this embodiment, themaster proxy server 102 is configured to perform load balancing control on the plurality ofmedia servers 101, so as to avoid a failure of one of themedia servers 101 due to an excessive load, thereby causing a loss of data traffic to the entire system. The load balancing control is carried out on the media server through the master proxy server or the slave proxy server, so that the server cluster can support high concurrent services.
In the present embodiment, themaster proxy server 102 periodically acquires the load states of the plurality ofmedia servers 101, and gives a priority value according to the load state of themedia server 101, and the priority value is higher as the load is smaller. Themain proxy server 102 preferably forwards the request sent by theclient 105 to the media server with the higher priority value.
Theslave proxy server 103 is connected to the plurality ofmedia servers 101 and serves as a backup server for themaster proxy server 102.
In the present embodiment, in order to improve the security of the system, avoid a failure of themaster proxy server 102, and prevent load balancing control of the plurality ofmedia servers 101, theslave proxy server 103 is provided, and if themaster proxy server 102 fails, theslave proxy server 103 performs load control of the plurality ofmedia servers 101.
On the basis of the above technical solution, there are a plurality ofslave proxy servers 103.
And ahandover router 104, connected to themaster proxy server 102 and theslave proxy server 103, for performing health detection on themaster proxy server 102 and theslave proxy server 103, and forwarding the received request sent by theclient 105 to themaster proxy server 102 or theslave proxy server 103.
On the basis of the above technical solution, further, the health detection performed on themaster proxy server 102 and theslave proxy server 103 specifically includes: theswitch router 104 continuously sends a health detection message to themaster proxy server 102 and theslave proxy server 103, determines whether themaster proxy server 102 and theslave proxy server 103 return a health detection response message within a specified time, and determines that the health status of the proxy server is abnormal if the health detection response message is not returned.
In this embodiment, theswitch route 104 periodically sends a health detection message to themaster proxy server 102 and theslave proxy server 103, and themaster proxy server 102 and theslave proxy server 103 return a health detection response message to theswitch route 104 after receiving the health detection message, where the health detection response message includes information such as operating duration, processor, memory, and hard disk usage, inbound traffic, and outbound traffic. Theswitch route 104 determines the health status of themaster proxy server 102 and theslave proxy server 103 from the health detection response message. If no health detection response message is returned within the specified time, the health state is abnormal.
In other embodiments, in order to ensure the stability of the system, thresholds of indexes such as the operating time, the use condition of the processor, the memory, the hard disk, the inbound traffic, the outbound traffic, and the like may be set respectively, and when the threshold is exceeded, the health state of the proxy server is likely to be abnormal, and theswitch router 104 determines in advance that the health state of the proxy server responding is abnormal.
On the basis of the technical scheme, further, the health detection adopts a heartbeat protocol for detection.
Theswitch route 104 may also detect the health of themaster proxy server 102 and theslave proxy server 103 using a heartbeat protocol. Theswitch route 104 maintains the heartbeat with themaster proxy server 102 and theslave proxy server 103, and if a plurality of heartbeat packets are not received continuously, the health status is abnormal.
On the basis of the above technical solution, further, forwarding the received request sent by theclient 105 to themaster proxy server 102 or theslave proxy server 103 specifically includes: when the health status of themaster proxy server 102 is normal, theswitch router 104 forwards the request sent by theclient 105 to themaster proxy server 102, and when the health status of themaster proxy server 102 is abnormal, forwards the request sent by theclient 105 to theslave proxy server 103.
In the present embodiment, when the health status of themaster proxy server 102 is determined to be abnormal, theswitch route 104 forwards the request transmitted by theclient 105 to theslave proxy server 103. If there are a plurality ofslave proxy servers 103, the request sent by theclient 105 is forwarded to one of theslave proxy servers 103 whose health state is normal.
On the basis of the above technical solution, the switchingroute 104 is further configured with priorities of themaster proxy server 102 and theslave proxy server 103, when the health status of themaster proxy server 102 is normal, the priority of themaster proxy server 102 is higher than that of theslave proxy server 103, and when the health status of themaster proxy server 102 is abnormal, the priority of themaster proxy server 102 is lowered, and the priority of theslave proxy server 103 is raised.
In the present embodiment, the priority of themaster proxy server 102 is set to 9 and the priority of theslave proxy server 103 is set to 6 in thehandover route 104. When the health state of themaster proxy server 102 is abnormal, the priority of themaster proxy server 102 is adjusted to 5, and the priority of theslave proxy server 103 is adjusted to 9. Thehandover route 104, upon receiving a request sent from theclient 105, forwards the request to themaster proxy server 102 or theslave proxy server 103 having a high priority.
On the basis of the above technical solution, further, themaster proxy server 102 and theslave proxy server 103 are virtual servers.
In the present embodiment, in order to reduce maintenance cost and hardware resources, themaster proxy server 102 and theslave proxy server 103 employ virtual servers. In another embodiment, a cloud server may be used to improve the security and stability of the entire system.
As shown in fig. 2, in this embodiment, a control method for a server cluster system supporting high concurrency is further provided, where the method includes:
s201, receiving a request sent by a client.
S202, the health state detection is carried out on the master proxy server and the slave proxy server, and the request sent by the client side is forwarded according to the health state.
On the basis of the above technical solution, further, the detecting the health status of the master proxy server and the slave proxy server specifically includes: continuously sending health detection messages to the master proxy server and the slave proxy server, judging whether the master proxy server and the slave proxy server return health detection response messages within a specified time, and determining that the health state of the proxy server is abnormal if the health detection response messages are not returned.
In this embodiment, the switch route periodically sends a health detection message to the master proxy server and the slave proxy server, and the master proxy server and the slave proxy server return a health detection response message to the switch route after receiving the health detection message, where the health detection response message includes information such as operating time, processor, memory, hard disk usage, inbound traffic, outbound traffic, and the like. And the switching route judges the health states of the master proxy server and the slave proxy server according to the health detection response message. If no health detection response message is returned within the specified time, the health state is abnormal.
In other embodiments, in order to ensure the stability of the system, thresholds of indexes such as operating time, processor, memory, hard disk usage, inbound traffic, outbound traffic, and the like may be set, and when the thresholds are exceeded, the health state of the proxy server is likely to be abnormal, and the switch route determines in advance that the health state of the proxy server responding to the switch route is abnormal.
On the basis of the technical scheme, further, the health detection adopts a heartbeat protocol for detection.
On the basis of the above technical solution, further, forwarding the request sent by the client according to the health status specifically includes: when the health state of the master proxy server is normal, the request sent by the client is forwarded to the master proxy server, and when the health state of the master proxy server is abnormal, the request sent by the client is forwarded to the slave proxy server.
On the basis of the technical scheme, the priority of the master proxy server and the priority of the slave proxy server are further set, when the health state of the master proxy server is normal, the priority of the master proxy server is higher than that of the slave proxy server, and when the health state of the master proxy server is abnormal, the priority of the master proxy server is reduced, and the priority of the slave proxy server is improved.
On the basis of the technical scheme, the number of the slave proxy servers is further multiple.
On the basis of the technical scheme, the master proxy server and the slave proxy servers are virtual servers.
S203, the main proxy server or the slave proxy server forwards the request sent by the client to one of the media servers according to the load state of the media servers.
In this embodiment, the master proxy server is configured to perform load balancing control on a plurality of media servers, so as to avoid a failure of one of the media servers due to an excessive load, thereby causing a loss of data traffic to the entire system.
In this embodiment, the master proxy server periodically acquires the load states of the plurality of media servers, and gives a priority value according to the load states of the media servers, and the priority value is higher when the load is smaller. The main proxy server preferentially forwards the request sent by the client to the media server with high priority value.
In the present embodiment, in order to improve the security of the system, avoid a failure of the master proxy server and prevent load balancing control from being performed on the plurality of media servers, a slave proxy server is provided, and if the master proxy server fails, the slave proxy server performs load control on the plurality of media servers.
The first embodiment is as follows:
the above method is further explained below by an embodiment, as shown in fig. 3, the method comprising:
s301, the client sends a request to a switching route;
s302, switching the route and presetting the priority of a master proxy server as 9 and the priority of a slave proxy server as 6, judging the health states of the master proxy server and the slave proxy server, executing a step S303 if the health state of the master proxy server is normal, and executing a step S304 if the health state of the master proxy server is abnormal;
s303, the priority of the main proxy server is unchanged, the switching route forwards the request sent by the client to the main proxy server, and the main proxy server acquires the load state of the media server and sends the request sent by the client to the media server with the lightest load;
s304, the priority of the master proxy server is adjusted to 5, the priority of the slave proxy server is adjusted to 9, the switching route forwards the request sent by the client to the slave proxy server, the slave proxy server acquires the load state of the media server, and the request sent by the client is sent to the media server with the lightest load;
s305, the media server processes the request sent by the client.
As shown in fig. 4, in this embodiment, acontrol apparatus 400 for supporting a high-concurrency server cluster system is further provided, and includes:
areceiving module 401, configured to receive a request sent by a client.
Aforwarding module 402, configured to perform health status detection on the master proxy server and the slave proxy server, and forward the request sent by the client according to the health status.
On the basis of the above technical solution, further, the detecting the health status of the master proxy server and the slave proxy server specifically includes: continuously sending health detection messages to the master proxy server and the slave proxy server, judging whether the master proxy server and the slave proxy server return health detection response messages within a specified time, and determining that the health state of the proxy server is abnormal if the health detection response messages are not returned.
In this embodiment, the switch route periodically sends a health detection message to the master proxy server and the slave proxy server, and the master proxy server and the slave proxy server return a health detection response message to the switch route after receiving the health detection message, where the health detection response message includes information such as operating time, processor, memory, hard disk usage, inbound traffic, outbound traffic, and the like. And the switching route judges the health states of the master proxy server and the slave proxy server according to the health detection response message. If no health detection response message is returned within the specified time, the health state is abnormal.
In other embodiments, in order to ensure the stability of the system, thresholds of indexes such as operating time, processor, memory, hard disk usage, inbound traffic, outbound traffic, and the like may be set, and when the thresholds are exceeded, the health state of the proxy server is likely to be abnormal, and the switch route determines in advance that the health state of the proxy server responding to the switch route is abnormal.
On the basis of the technical scheme, further, the health detection adopts a heartbeat protocol for detection.
On the basis of the above technical solution, further, forwarding the request sent by the client according to the health status specifically includes: when the health state of the master proxy server is normal, the request sent by the client is forwarded to the master proxy server, and when the health state of the master proxy server is abnormal, the request sent by the client is forwarded to the slave proxy server.
On the basis of the technical scheme, the priority of the master proxy server and the priority of the slave proxy server are further set, when the health state of the master proxy server is normal, the priority of the master proxy server is higher than that of the slave proxy server, and when the health state of the master proxy server is abnormal, the priority of the master proxy server is reduced, and the priority of the slave proxy server is improved.
On the basis of the technical scheme, the number of the slave proxy servers is further multiple.
On the basis of the technical scheme, the master proxy server and the slave proxy servers are virtual servers.
And aload balancing module 403, where the master proxy server or the slave proxy server forwards the request sent by the client to one of the media servers according to the load status of the media servers.
In this embodiment, the master proxy server is configured to perform load balancing control on a plurality of media servers, so as to avoid a failure of one of the media servers due to an excessive load, thereby causing a loss of data traffic to the entire system.
In this embodiment, the master proxy server periodically acquires the load states of the plurality of media servers, and gives a priority value according to the load states of the media servers, and the priority value is higher when the load is smaller. The main proxy server preferentially forwards the request sent by the client to the media server with high priority value.
In the present embodiment, in order to improve the security of the system, avoid a failure of the master proxy server and prevent load balancing control from being performed on the plurality of media servers, a slave proxy server is provided, and if the master proxy server fails, the slave proxy server performs load control on the plurality of media servers.
As shown in fig. 5, in an embodiment of the present invention, a control system supporting a high-concurrency server cluster is further disclosed, and the control system supporting a high-concurrency server cluster shown in fig. 5 is merely an example, and should not bring any limitation to the function and the use range of the embodiment of the present invention.
Acontrol system 500 supporting high concurrency server clusters includes astorage unit 520 for storing computer executable programs; aprocessing unit 510 for reading the computer executable program in the storage unit to perform the steps of various embodiments of the present invention.
Thecontrol system 500 supporting a highly concurrent server cluster in this embodiment further includes abus 530 connecting different system components (including thestorage unit 520 and the processing unit 510), adisplay unit 540, and the like.
Thestorage unit 520 stores a computer readable program, which may be a code of a source program or a read-only program. The program may be executed by theprocessing unit 510 such that theprocessing unit 510 performs the steps of various embodiments of the present invention. For example, theprocessing unit 510 may perform the steps as shown in fig. 2.
Thememory unit 520 may include a readable medium in the form of a volatile memory unit, such as a random access memory unit (RAM)5201 and/or acache memory unit 5202, and may further include a read only memory unit (ROM) 5203. Thememory unit 520 may also include a program/utility 5204 having a set (at least one) ofprogram modules 5205,such program modules 5205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 530 may be one or more of any of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
Thecontrol system 500 supporting highly concurrent server clusters may also communicate with one or more external devices 570 (e.g., keyboard, display, network device, bluetooth device, etc.) such that a user may interact with theprocessing unit 510 via the input/output (I/O) interfaces 550 via theseexternal devices 570, and may also interact with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via thenetwork adapter 560. Thenetwork adapter 560 may communicate with other modules of thecontrol system 500 that support highly concurrent server clusters over thebus 530. It should be appreciated that, although not shown in the figures, other hardware and/or software modules may be used in thecontrol system 500 that supports highly concurrent server clusters, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
FIG. 6 is a schematic diagram of one computer-readable medium embodiment of the present invention. As shown in fig. 6, the computer program may be stored on one or more computer readable media. The computer readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory unit (RAM), a read-only memory unit (ROM), an erasable programmable read-only memory unit (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory unit (CD-ROM), an optical storage unit, a magnetic storage unit, or any suitable combination of the foregoing. The computer program, when executed by one or more data processing devices, enables the computer-readable medium to implement the above-described method of the invention, namely:
s201, receiving a request sent by a client;
s202, carrying out health state detection on a master proxy server and a slave proxy server, and forwarding a request sent by the client according to the health state;
s203, the main proxy server or the slave proxy server forwards the request sent by the client to one of the media servers according to the load state of the media servers.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments of the present invention described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to make a data processing device (which can be a personal computer, a server, or a network device, etc.) execute the above-mentioned method according to the present invention.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
In summary, the present invention can be implemented as a method, an apparatus, an electronic device, or a computer-readable medium executing a computer program. Some or all of the functions of the present invention may be implemented in practice using general purpose data processing equipment such as a micro-processing unit or a digital signal processing unit (DSP).
While the foregoing embodiments have described the objects, aspects and advantages of the present invention in further detail, it should be understood that the present invention is not inherently related to any particular computer, virtual machine or electronic device, and various general-purpose machines may be used to implement the present invention. The invention is not to be considered as limited to the specific embodiments thereof, but is to be understood as being modified in all respects, all changes and equivalents that come within the spirit and scope of the invention.