CN109981459B - Information sending method, client and computer readable storage medium - Google Patents

Information sending method, client and computer readable storage medium Download PDF

Info

Publication number
CN109981459B
CN109981459B CN201910152843.6A CN201910152843A CN109981459B CN 109981459 B CN109981459 B CN 109981459B CN 201910152843 A CN201910152843 A CN 201910152843A CN 109981459 B CN109981459 B CN 109981459B
Authority
CN
China
Prior art keywords
sent
data container
data packet
container
data
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
Application number
CN201910152843.6A
Other languages
Chinese (zh)
Other versions
CN109981459A (en
Inventor
吴娟
刘峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201910152843.6A priority Critical patent/CN109981459B/en
Publication of CN109981459A publication Critical patent/CN109981459A/en
Application granted granted Critical
Publication of CN109981459B publication Critical patent/CN109981459B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/302Route determination based on requested QoS
    • H04L45/306Route determination based on the nature of the carried application
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 
    • H04L67/1048Departure or maintenance mechanisms

Abstract

The embodiment of the invention discloses an information sending method, which comprises the following steps: receiving a sending request for sending a data packet to be sent to a server; wherein, the sending request carries the address of the target data container of the data packet to be sent; the server comprises at least two data containers; based on the sending request, sending the data packet to be sent to a target data container corresponding to the address of the target data container; determining the state of the target data container based on the data packet to be sent; and generating a routing strategy based on the state of the target data container, and processing the data packet to be sent according to the routing strategy. The embodiment of the invention also discloses a client and a computer readable storage medium.

Description

Information sending method, client and computer readable storage medium
Technical Field
The present invention relates to an information transmission technology in the field of communications, and in particular, to an information transmission method, a client, and a computer-readable storage medium.
Background
In the container cluster network management scheme, a cluster network agent is responsible for managing the route forwarding of external and internal service flows of a cluster to a data container; the general cluster network agent converts the mapping relation between the cluster service and the data container into a routing rule and sends the routing rule to the IP information packet filtering system, and the IP information packet filtering system realizes fast and efficient routing forwarding.
However, since the IP packet filtering system itself does not support the retry mechanism, it cannot sense the status of the data container in the remote server; once a certain data container in the server goes down or an application does not respond, the data sent by the client is still forwarded to the container end point by the IP packet filtering system according to the preset routing rule, so that the data packet is lost and the service is interrupted, thereby causing the service quality to be reduced.
Disclosure of Invention
In order to solve the above technical problems, embodiments of the present invention desirably provide an information sending method, a client, and a computer-readable storage medium, so as to solve the problem that, in the related art, when a certain data container in a server is down or an application does not respond, an IP packet filtering system cannot sense that data is still sent to the container node, thereby avoiding the problems of data packet loss and service interruption, and improving service quality.
The technical scheme of the invention is realized as follows:
an information sending method, the method comprising:
receiving a sending request for sending a data packet to be sent to a server; wherein, the sending request carries the address of the target data container of the data packet to be sent; the server comprises at least two data containers;
based on the sending request, sending the data packet to be sent to a target data container corresponding to the address of the target data container;
determining the state of the target data container based on the data packet to be sent;
and generating a routing strategy based on the state of the target data container, and processing the data packet to be sent according to the routing strategy.
Optionally, the determining the state of the target data container based on the data packet to be sent includes:
acquiring response information generated by a target data container aiming at the data packet to be sent based on the data packet to be sent;
determining whether the target data container is in an operational state based on the response information.
Optionally, the determining whether the target data container is in the working state based on the response information includes:
determining a first time for transmitting the data packet to be transmitted;
if the response information sent by the target data container is received, determining a second moment when the response information is received;
and if the interval time between the first time and the second time is within the preset time threshold range, determining that the target data container is in a working state.
Optionally, the method further includes:
and if the interval time between the first time and the second time is not within the preset time threshold range, determining that the target container is in a non-working state.
Optionally, the determining the state of the target data container based on the data packet to be sent includes:
and if the response information sent by the target data container is not received within a preset time interval from the first time of sending the data packet to be sent, determining that the target data container is in a non-working state.
Optionally, the generating a routing policy based on the state of the target data container and processing the packet to be processed according to the routing policy includes:
if the target data container is determined to be in a non-working state, setting the routing strategy as forwarding the data packet to be sent;
forwarding the data packet to be sent to a first data container according to the routing strategy; the target data container and the first data container belong to the same server, and the first data container and the service corresponding to the data packet to be sent have an association relationship;
generating a specific identification, and marking the target data container as the specific identification; the specific identifier is used for indicating that a data container is an initial data container corresponding to the data packet to be sent.
Optionally, if the target data container is in a non-working state, forwarding the data packet to be sent to a first data container, including:
if the target data container is in a non-working state, detecting whether the first data container has the specific identifier;
if the first data container does not have the specific identifier, forwarding the data packet to be sent to the first data container;
and if the first data container has the specific identifier, discarding the data packet to be sent.
Optionally, if the first data container does not have the specific identifier, forwarding the data packet to be sent to the first data container, including:
if the first data container does not have the specific identification, determining the state of the first data container;
if the first data container is in a working state, forwarding the data packet to be sent to the first data container;
if the first data container is in a non-working state, forwarding the data packet to be sent to a second data container until the data packet to be sent is forwarded to a data container in the service end in a working state, or discarding the data packet to be sent; the target data container and the second data container belong to the same server, and the second data container has an association relation with a service corresponding to the data packet to be sent.
A client, the client comprising: a processor, a memory, and a communication bus;
the communication bus is used for realizing communication connection between the processor and the memory;
the processor is used for executing the information sending program stored in the memory so as to realize the following steps:
receiving a sending request for sending a data packet to be sent to a server; wherein, the sending request carries the address of the target data container of the data packet to be sent; the server comprises at least two data containers;
based on the sending request, sending the to-be-sent data packet to a target data container corresponding to the address of the target data container;
determining the state of the target data container based on the data packet to be sent;
and generating a routing strategy based on the state of the target data container, and processing the to-be-processed data packet according to the routing strategy.
A computer-readable storage medium storing one or more programs, which are executable by one or more processors, to implement the steps of the information transmission method described above.
The information sending method, the client and the computer readable storage medium provided by the embodiments of the present invention receive a sending request for sending a data packet to be sent to a server and an address of a target data container carrying the data packet to be sent, where the server includes at least two data containers, send the data packet to be sent to the target data container corresponding to the address of the target data container based on the sending request, determine a state of the target data container based on the data packet to be sent, and finally generate a routing policy based on the state of the target data container and process the data packet according to the routing policy, so that when the client sends the data packet to be sent to the data container, the client determines the state of the target data container and generates the routing policy according to the state of the target data container, and then processes the data packet to be sent according to the routing policy instead of directly sending the data packet to be sent according to the original routing policy, the problems that in the relative technology, when a certain data container in a server is down or an application does not respond and the like, the IP information packet filtering system cannot sense and still send data to the container node are solved, the data packet loss and the service interruption are avoided, and the service quality is improved.
Drawings
Fig. 1 is a flowchart illustrating a method for sending information according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating another information sending method according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a further method for sending information according to an embodiment of the present invention;
fig. 4 is a schematic diagram of an interface for sending information according to an embodiment of the present invention;
fig. 5 is a schematic view of another information transmission interface according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a client according to an embodiment of the present invention.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
An embodiment of the present invention provides an information sending method, which is shown in fig. 1 and includes the following steps:
step 101, receiving a sending request for sending a data packet to be sent to a server.
Wherein, the sending request carries the address of the target data container of the data packet to be sent; the server comprises at least two data containers.
It should be noted that, the step 101 of receiving the sending request for sending the data packet to be sent to the server may be implemented by the client.
And 102, sending the data packet to be sent to a target data container corresponding to the address of the target data container based on the sending request.
Step 102, based on the sending request, sending the data packet to be sent to the target data container corresponding to the address of the target data container, which may be implemented by the client; after receiving a request sent by a user for sending a data packet to be sent to a data container, a client responds to the request and sends the data packet to be sent to a corresponding target data container.
Step 103, determining the state of the target data container based on the data packet to be sent.
Step 103, determining the state of the target data container based on the data packet to be sent, wherein the state can be implemented by the client; the client can determine the state of the target data container according to the response information returned for the data packet to be sent; in one possible implementation, the status of the target data container may be determined according to the time when the response information is received or whether the response information is received within a specific time.
And 104, generating a routing strategy based on the state of the target data container, and processing the data packet to be transmitted according to the routing strategy.
Step 104, generating a routing policy based on the state of the target data container, and processing the data packet to be sent according to the routing policy, which can be implemented by the client; whether to send the data packet to be sent to the target data container or whether to forward the data packet to be sent to other data containers of the target data container at the same server can be determined according to the state of the target data container.
The information sending method provided by the embodiment of the invention receives a sending request for sending a data packet to be sent to a server and carrying an address of a target data container of the data packet to be sent, the server comprises at least two data containers, the data packet to be sent is sent to the target data container corresponding to the address of the target data container based on the sending request, the state of the target data container is determined based on the data packet to be sent, finally, a routing strategy is generated based on the state of the target data container, and the data packet to be sent is processed according to the routing strategy, so that when the data packet to be sent is sent to the data container, a client can process the data packet to be sent according to the routing strategy generated according to the state of the target data container instead of directly sending the data packet to be sent according to the original routing strategy, and the problems that a certain data container in the server is down or the application does not respond in the relative technology are solved, the IP information packet filtering system can not sense that the data is still sent to the container node, thereby avoiding the problems of data packet loss and service interruption and improving the service quality.
Based on the foregoing embodiments, an embodiment of the present invention provides a data sending method, which is shown in fig. 2 and includes the following steps:
step 201, the client receives a sending request for sending a data packet to be sent to the server.
Wherein, the sending request carries the address of the target data container of the data packet to be sent; the server comprises at least two data containers.
Step 202, the client sends the data packet to be sent to the target data container corresponding to the address of the target data container based on the sending request.
Step 203, the client acquires response information generated by the target data container for the data packet to be sent based on the data packet to be sent.
And the response information is information returned by the target data container of the server aiming at the data packet to be sent.
And step 204, the client determines whether the target data container is in a working state or not based on the response information.
Step 205, if it is determined that the target data container is in the non-working state, the client sets a routing policy to forward the data packet to be sent.
If the target data container is determined to be in a non-working state, which indicates that the target data container is currently in a failure that cannot work normally, such as down, the client needs to forward the data packet to be sent to other data containers that are located at the same server as the target data container and can work normally; if the target data container is in a working state, the client side can set a reason policy to continue sending the data packet to be sent to the target data container.
It should be noted that step 205 may be implemented by:
in step 205a, if it is determined that the target data container is in the non-working state, the client detects whether the first data container has a specific identifier.
The specific identifier may be an initial data container capable of identifying the data container as the data packet to be sent.
Step 205b, if the first data container does not have the specific identifier, the client sets the routing policy to forward the data packet to be sent.
If the first data container does not have the specific identifier, it indicates that the first data container is not the initial data container corresponding to the data packet to be sent, and thus it is proved that the data packet to be sent can be forwarded to the first data container, and at this time, forwarding processing of the data packet to be sent can be performed according to whether the first data container is in a working state.
Step 205c, if the first data container has the specific identifier, the client discards the data packet to be sent.
If the first data container has the specific identifier, which indicates that the data containers included in the server have been polled once, all the data containers in the server do not have the capability of receiving the data packet to be sent, and at this time, only the data packet to be sent can be discarded.
Step 206, the client forwards the data packet to be sent to the first data container according to the routing strategy.
The target data container and the first data container belong to the same server, and the first data container and the service corresponding to the data packet to be sent have an association relationship.
Step 207, the client generates a specific identifier, and marks the target data container as the specific identifier.
The specific identifier is used for indicating that the data container is an initial data container corresponding to the data packet to be sent.
In other embodiments of the present invention, when determining that the target data container is in the non-working state, the client forwards the data packet to be sent to the first data container; since the target data container is the initial data container corresponding to the data packet to be sent, a specific identifier needs to be generated at this time, so as to identify that the target data container is the initial data container corresponding to the data packet to be sent.
It should be noted that, for the descriptions of the same steps and the same contents in this embodiment as those in other embodiments, reference may be made to the descriptions in other embodiments, which are not described herein again.
According to the information sending method provided by the embodiment of the invention, when the client side sends the data packet to be sent to the data container, the data packet to be sent is processed according to the routing strategy generated according to the state of the target data container, instead of directly sending the data packet to be sent according to the original routing strategy, so that the problem that an IP information packet filtering system cannot sense and still send data to a container node when a certain data container in a server side is down or application does not respond in the relative technology is solved, the problems of data packet loss and service interruption are avoided, and the service quality is improved.
Based on the foregoing embodiments, an embodiment of the present invention provides a data sending method, which is shown in fig. 3 and includes the following steps:
step 301, the client receives a sending request for sending a data packet to be sent to the server.
Wherein, the sending request carries the address of the target data container of the data packet to be sent; the server comprises at least two data containers.
Step 302, the client sends the data packet to be sent to the target data container corresponding to the address of the target data container based on the sending request.
Step 303, the client acquires response information generated by the target data container for the data packet to be sent based on the data packet to be sent.
Step 304, the client determines a first time for sending the data packet to be sent.
Step 305, if the response message sent by the target data container is received, the client determines a second time when the response message is received.
And step 306, if the interval time between the first time and the second time is within the preset time threshold range, determining that the target data container is in a working state.
The preset time threshold may be a normal time from sending a data packet to receiving information returned for the data packet when the data container is in a normal working state; of course, the preset time threshold may be determined based on historical usage data. If the time interval between the moment of sending the data packet to be sent and the moment of receiving the response information returned aiming at the data packet to be sent is within the preset time threshold value range, the target data container is in a normal working state.
And 307, if the interval time between the first time and the second time is not within the preset time threshold range, the client determines that the target container is in a non-working state.
Of course, if the time interval between the time of sending the data packet to be sent and the time of receiving the response information returned for the data packet to be sent exceeds the preset time threshold range, it indicates that the target data container is in a non-working state.
Step 308, if the client does not receive the response information sent by the target data container within the preset time interval from the first time of sending the data packet to be sent, determining that the target data container is in the non-working state.
The preset time may refer to a time required normally from sending a data packet to receiving information returned for the data packet when the data container is in a normal working state; if response information is received within the preset time interval from the time of sending the data packet to be sent, the target data container is in a normal working state; and if the response information is still not received after the interval exceeds the preset time from the moment of sending the data packet to be sent, indicating that the target data container is in a non-working state.
Step 309, if it is determined that the target data container is in the non-working state, the client detects whether the first data container has a specific identifier.
The target data container and the first data container belong to the same server, and the first data container and the service corresponding to the data packet to be sent have an association relationship.
It should be noted that, after step 309, steps 310 to 314 or step 315 may be optionally executed;
and step 310, if the first data container does not have the specific identifier, the client sets a routing strategy to forward the data packet to be sent.
Step 311, the client determines the state of the first data container.
Step 312, if the first data container is in the working state, the client forwards the data packet to be sent to the first data container.
If the first data container is not the initial data container corresponding to the data packet to be sent and the first data container is in a normal working state, the client may forward the data packet to be sent to the first data container.
Step 313, if the first data container is in the non-working state, the client forwards the data packet to be sent to the second data container until the data packet to be sent is forwarded to the data container in the working state of the server, or discards the data packet to be sent.
The target data container and the second data container belong to the same server, and the second data container has an association relation with a service corresponding to the data packet to be sent.
It should be noted that, if the second data container is in a normal working state, the forwarding still sends the data packet to be sent to the second data container; of course, if the second data container is in a non-working state and/or has a specific identifier, the data packet to be sent may be forwarded to a third data container in the server at this time; if the third data container is in a non-working state and/or has a specific identifier, the data packet to be sent can be forwarded to other data containers in the server until the data packet is forwarded to the data containers; or, if all other data containers in the server are in an inactive state and/or have a specific identifier, the data packet to be sent is discarded.
Step 314, the client generates a specific identifier and marks the target data container as the specific identifier.
Step 315, if the first data container has the specific identifier, the client discards the data packet to be sent.
In other embodiments of the present invention, if three data containers are included in the server: container1, Container2, and Container 3; as shown in fig. 4, if the Container1 fails and the Container2 and Container3 are normal, the service 1 forwarded to the Container1 is interrupted; the service 2 and the service 3 forwarded to the Container2 and the Container3 can be normally transmitted; after the information sending method provided in the embodiment of the present invention is adopted, if the Container1 fails, the Container2 and the Container3 are normal, as shown in fig. 5, at this time, the service 1 originally sent to the Container1 may be forwarded to the Container2, so as to ensure normal transmission of the service 1.
It should be noted that, for the descriptions of the same steps and the same contents in this embodiment as those in other embodiments, reference may be made to the descriptions in other embodiments, which are not described herein again.
According to the information sending method provided by the embodiment of the invention, when the client side sends the data packet to be sent to the data container, the data packet to be sent is processed according to the routing strategy generated according to the state of the target data container, instead of directly sending the data packet to be sent according to the original routing strategy, so that the problem that an IP information packet filtering system cannot sense and still send data to a container node when a certain data container in a server side is down or application does not respond in the relative technology is solved, the problems of data packet loss and service interruption are avoided, and the service quality is improved.
Based on the foregoing embodiments, an embodiment of the present invention provides a client, which may be applied to the information sending method provided in the embodiments corresponding to fig. 1 to 3, and as shown in fig. 6, the client may include: a processor 41, a memory 42 and a communication bus 43;
the communication bus 43 is used for realizing communication connection between the processor 41 and the memory 42;
the processor 41 is configured to execute the information transmission program stored in the memory 42 to implement the following steps:
receiving a sending request for sending a data packet to be sent to a server;
wherein, the sending request carries the address of the target data container of the data packet to be sent; the server comprises at least two data containers;
based on the sending request, sending a data packet to be sent to a target data container corresponding to the address of the target data container;
determining the state of a target data container based on a data packet to be sent;
and generating a routing strategy based on the state of the target data container, and processing the data packet to be sent according to the routing strategy.
In other embodiments of the present invention, processor 41 is configured to execute the following steps in the information sending program stored in memory 42 to determine the status of the target data container based on the data packet to be sent:
acquiring response information generated by a target data container aiming at a data packet to be sent based on the data packet to be sent;
determining whether the target data container is in an operational state based on the response information.
In other embodiments of the present invention, processor 41 is configured to execute the response information-based determination in the information sending program stored in memory 42 to determine whether the target data container is in the working state, and may implement the following steps:
determining a first time for transmitting a data packet to be transmitted;
if response information sent by the target data container is received, determining a second moment when the response information is received;
and if the interval time between the first time and the second time is within the preset time threshold range, determining that the target data container is in a working state.
In other embodiments of the present invention, processor 41 is configured to execute the information transmission program stored in memory 42, and may further implement the following steps:
and if the interval time between the first time and the second time is not within the preset time threshold range, determining that the target container is in a non-working state.
In other embodiments of the present invention, processor 41, for executing the information sending program stored in memory 42, determines the status of the target data container based on the data packet to be sent, and may implement the following steps:
and if the response information sent by the target data container is not received within the preset time interval from the first time of sending the data packet to be sent, determining that the target data container is in a non-working state.
In other embodiments of the present invention, the processor 41 is configured to execute the information sending program stored in the memory 42, generate a routing policy based on the state of the target data container, and process the data packet to be sent according to the routing policy, and may implement the following steps:
if the target data container is determined to be in a non-working state, setting a routing strategy to forward a data packet to be sent;
forwarding a data packet to be sent to a first data container according to a routing strategy;
the target data container and the first data container belong to the same server, and the first data container and a service corresponding to a data packet to be sent have an association relation;
generating a specific identifier, and marking the target data container as the specific identifier;
the specific identifier is used for indicating that the data container is an initial data container corresponding to the data packet to be sent.
In another embodiment of the present invention, if the processor 41 is configured to execute the information sending program stored in the memory 42 and determine that the target data container is in the non-working state, and set the routing policy to forward the data packet to be sent, the following steps may be implemented:
if the target data container is determined to be in a non-working state, detecting whether the first data container has a specific identifier;
if the first data container does not have the specific identifier, setting a routing strategy as forwarding processing of a data packet to be sent;
and if the first data container has the specific identifier, discarding the data packet to be sent.
In other embodiments of the present invention, the processor 41 is configured to execute the information sending program stored in the memory 42 to forward the data packet to be sent to the first data container according to the routing policy, and may implement the following steps:
if the first data container does not have the specific identifier, determining the state of the first data container;
if the first data container is in a working state, forwarding a data packet to be sent to the first data container;
if the first data container is in a non-working state, forwarding the data packet to be sent to a second data container until the data packet to be sent is forwarded to the data container in the service end in the working state, or discarding the data packet to be sent;
the target data container and the second data container belong to the same server, and the second data container has an association relation with a service corresponding to the data packet to be sent.
It should be noted that, in the embodiment, a specific implementation process of the step executed by the processor may refer to an implementation process in the information sending method provided in the embodiment corresponding to fig. 1 to 3, and details are not described here.
When the client provided by the embodiment of the invention sends the data packet to be sent to the data container, the data packet to be sent is processed according to the routing strategy generated according to the state of the target data container, rather than the data packet to be sent is directly sent according to the original routing strategy, so that the problem that an IP information packet filtering system cannot sense that the data packet is still sent to a container node when a certain data container in a server is down or the application does not respond in the relative technology is solved, the problems of data packet loss and service interruption are avoided, and the service quality is improved.
Based on the foregoing embodiments, embodiments of the invention provide a computer-readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the steps of:
receiving a sending request for sending a data packet to be sent to a server;
wherein, the sending request carries the address of the target data container of the data packet to be sent; the server comprises at least two data containers;
based on the sending request, sending a data packet to be sent to a target data container corresponding to the address of the target data container;
determining the state of a target data container based on a data packet to be sent;
and generating a routing strategy based on the state of the target data container, and processing the data packet to be sent according to the routing strategy.
In other embodiments of the invention, the one or more programs are executable by the one or more processors to perform the steps of:
acquiring response information generated by a target data container aiming at a data packet to be sent based on the data packet to be sent;
determining whether the target data container is in an operational state based on the response information.
In other embodiments of the invention, the one or more programs are executable by the one or more processors to perform the steps of:
determining a first time for transmitting a data packet to be transmitted;
if response information sent by the target data container is received, determining a second moment when the response information is received;
and if the interval time between the first time and the second time is within the preset time threshold range, determining that the target data container is in a working state.
In other embodiments of the invention, the one or more programs are executable by the one or more processors to perform the steps of:
and if the interval time between the first time and the second time is not within the preset time threshold range, determining that the target container is in a non-working state.
In other embodiments of the invention, the one or more programs are executable by the one or more processors to perform the steps of:
and if the response information sent by the target data container is not received within the preset time interval from the first time of sending the data packet to be sent, determining that the target data container is in a non-working state.
In other embodiments of the invention, the one or more programs are executable by the one or more processors to perform the steps of:
if the target data container is determined to be in a non-working state, setting a routing strategy to forward a data packet to be sent;
forwarding a data packet to be sent to a first data container according to a routing strategy;
the target data container and the first data container belong to the same server, and the first data container and a service corresponding to a data packet to be sent have an association relation;
generating a specific identifier, and marking the target data container as the specific identifier;
the specific identifier is used for indicating that the data container is an initial data container corresponding to the data packet to be sent.
In other embodiments of the invention, the one or more programs are executable by the one or more processors to perform the steps of:
if the target data container is determined to be in a non-working state, detecting whether the first data container has a specific identifier;
if the first data container does not have the specific identifier, setting a routing strategy as forwarding processing of a data packet to be sent;
and if the first data container has the specific identifier, discarding the data packet to be sent.
In other embodiments of the invention, the one or more programs are executable by the one or more processors to perform the steps of:
if the first data container does not have the specific identifier, determining the state of the first data container;
if the first data container is in a working state, forwarding a data packet to be sent to the first data container;
if the first data container is in a non-working state, forwarding the data packet to be sent to a second data container until the data packet to be sent is forwarded to the data container in the service end in the working state, or discarding the data packet to be sent;
the target data container and the second data container belong to the same server, and the second data container has an association relation with a service corresponding to the data packet to be sent.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.

Claims (8)

1. An information sending method, the method comprising:
receiving a sending request for sending a data packet to be sent to a server; wherein, the sending request carries the address of the target data container of the data packet to be sent; the server comprises at least two data containers;
based on the sending request, sending the data packet to be sent to a target data container corresponding to the address of the target data container;
determining the state of the target data container based on the data packet to be sent;
if the target data container is determined to be in a non-working state, detecting whether a first data container has a specific identifier;
if the first data container does not have the specific identifier, setting a routing policy to forward the data packet to be sent;
if the first data container has the specific identifier, discarding the data packet to be sent;
forwarding the data packet to be sent to the first data container according to the routing strategy; the target data container and the first data container belong to the same server, and the first data container and the service corresponding to the data packet to be sent have an association relationship;
generating the specific identification and marking the target data container as the specific identification; the specific identifier is used for indicating that a data container is an initial data container corresponding to the data packet to be sent.
2. The method of claim 1, wherein determining the status of the target data container based on the data packet to be sent comprises:
acquiring response information generated by a target data container aiming at the data packet to be sent based on the data packet to be sent;
determining whether the target data container is in an operational state based on the response information.
3. The method of claim 2, wherein the determining whether the target data container is in an operational state based on the response information comprises:
determining a first time for transmitting the data packet to be transmitted;
if the response information sent by the target data container is received, determining a second moment when the response information is received;
and if the interval time between the first time and the second time is within a preset time threshold range, determining that the target data container is in a working state.
4. The method of claim 3, further comprising:
and if the interval time between the first time and the second time is not within the preset time threshold range, determining that the target data container is in a non-working state.
5. The method of claim 2, wherein determining the status of the target data container based on the data packet to be sent comprises:
and if the response information sent by the target data container is not received within a preset time interval from the first time of sending the data packet to be sent, determining that the target data container is in a non-working state.
6. The method of claim 1, wherein forwarding the data packet to be sent to a first data container according to the routing policy comprises:
if the first data container does not have the specific identification, determining the state of the first data container;
if the first data container is in a working state, forwarding the data packet to be sent to the first data container;
if the first data container is in a non-working state, forwarding the data packet to be sent to a second data container until the data packet to be sent is forwarded to a data container in the service end in a working state, or discarding the data packet to be sent; the target data container and the second data container belong to the same server, and the second data container has an association relation with a service corresponding to the data packet to be sent.
7. A client, the client comprising: a processor, a memory, and a communication bus;
the communication bus is used for realizing communication connection between the processor and the memory;
the processor is used for executing the information sending program stored in the memory so as to realize the following steps:
receiving a sending request for sending a data packet to be sent to a server; wherein, the sending request carries the address of the target data container of the data packet to be sent; the server comprises at least two data containers;
based on the sending request, sending the data packet to be sent to a target data container corresponding to the address of the target data container;
determining the state of the target data container based on the data packet to be sent;
if the target data container is determined to be in a non-working state, detecting whether a first data container has a specific identifier;
if the first data container does not have the specific identifier, setting a routing policy to forward the data packet to be sent;
if the first data container has the specific identifier, discarding the data packet to be sent;
forwarding the data packet to be sent to the first data container according to the routing strategy; the target data container and the first data container belong to the same server, and the first data container and the service corresponding to the data packet to be sent have an association relationship;
generating the specific identification and marking the target data container as the specific identification; the specific identifier is used for indicating that a data container is an initial data container corresponding to the data packet to be sent.
8. A computer-readable storage medium, characterized in that the computer-readable storage medium stores one or more programs which are executable by one or more processors to implement the steps of the information transmission method according to any one of claims 1 to 6.
CN201910152843.6A 2019-02-28 2019-02-28 Information sending method, client and computer readable storage medium Active CN109981459B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910152843.6A CN109981459B (en) 2019-02-28 2019-02-28 Information sending method, client and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910152843.6A CN109981459B (en) 2019-02-28 2019-02-28 Information sending method, client and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109981459A CN109981459A (en) 2019-07-05
CN109981459B true CN109981459B (en) 2021-02-19

Family

ID=67077559

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910152843.6A Active CN109981459B (en) 2019-02-28 2019-02-28 Information sending method, client and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109981459B (en)

Family Cites Families (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5029685B2 (en) * 2007-02-28 2012-09-19 富士通株式会社 Backup device
ATE554585T1 (en) * 2008-06-12 2012-05-15 Ericsson Telefon Ab L M MAINTENANCE OF OVERLAY NETWORKS
CN103023938B (en) * 2011-09-26 2015-11-25 阿里巴巴集团控股有限公司 A kind of service capability control method of server cluster and system
JP5982842B2 (en) * 2012-02-03 2016-08-31 富士通株式会社 Computer fault monitoring program, method, and apparatus
CN103516744A (en) * 2012-06-20 2014-01-15 阿里巴巴集团控股有限公司 A data processing method, an application server and an application server cluster
CN103905526A (en) * 2014-03-05 2014-07-02 深圳市同洲电子股份有限公司 Dispatching method and server
CN105573996A (en) * 2014-10-09 2016-05-11 阿里巴巴集团控股有限公司 Database processing method, database processing device and database processing system
US20160125059A1 (en) * 2014-11-04 2016-05-05 Rubrik, Inc. Hybrid cloud data management system
CN106034138B (en) * 2015-03-09 2019-08-09 阿里巴巴集团控股有限公司 A kind of remote service calling method and device
CN104898435B (en) * 2015-04-13 2019-01-15 惠州Tcl移动通信有限公司 Home services system and its fault handling method, household appliance, server
CN105338086B (en) * 2015-11-04 2019-06-25 浪潮软件股份有限公司 A kind of distributed message forwarding method
CN105631028B (en) * 2015-12-30 2020-09-18 中国农业银行股份有限公司 Database cluster function implementation method and system
US10116745B2 (en) * 2016-03-28 2018-10-30 Samsung Electronics Co., Ltd. Automatic client-server role detection among data storage systems in a distributed data store
CN105897507B (en) * 2016-03-31 2019-09-17 杭州数梦工场科技有限公司 The condition detection method and device of node device
CN107395387A (en) * 2016-05-17 2017-11-24 中兴通讯股份有限公司 The methods, devices and systems of two-shipper business recovery
CN106126652B (en) * 2016-06-24 2019-03-15 武汉斗鱼网络科技有限公司 Mishap Database switching method and system for distributed experiment & measurement system
CN106301938A (en) * 2016-08-25 2017-01-04 成都索贝数码科技股份有限公司 A kind of high availability and the data base cluster system of strong consistency and node administration method thereof
CN108076098B (en) * 2016-11-16 2021-01-26 北京京东尚科信息技术有限公司 Service processing method and system
CN106686102B (en) * 2017-01-03 2020-04-14 北京奇虎科技有限公司 Service node switching method and device
CN106790289A (en) * 2017-03-07 2017-05-31 北京搜狐新媒体信息技术有限公司 A kind of dynamic load processing method and system based on Nginx servers
CN108667872B (en) * 2017-03-31 2021-04-30 北京京东尚科信息技术有限公司 Archiving method and device for scheduling server
CN107171885B (en) * 2017-03-31 2019-11-15 北京奇艺世纪科技有限公司 A kind of methods, devices and systems of detection service device operating status
CN107105050B (en) * 2017-05-11 2020-01-31 北京奇艺世纪科技有限公司 Storage and downloading method and system for service objects
CN107315672B (en) * 2017-06-22 2020-08-21 北京星选科技有限公司 Method and device for monitoring server
CN108011929B (en) * 2017-11-14 2020-08-25 平安科技(深圳)有限公司 Data request processing method and device, computer equipment and storage medium
CN108337314B (en) * 2018-02-07 2019-07-09 北京百度网讯科技有限公司 Distributed system, information processing method and device for primary server

Also Published As

Publication number Publication date
CN109981459A (en) 2019-07-05

Similar Documents

Publication Publication Date Title
CN108965204B (en) Method and device for automatically realizing IOAM packaging
CN107786450B (en) Data message transmission method and device and machine-readable storage medium
CN112532704A (en) Data transmission method and device, electronic equipment and storage medium
CN110912805B (en) Message reading state synchronization method, terminal, server and system
US10680930B2 (en) Method and apparatus for communication in virtual network
EP3171565B1 (en) Methods, devices and system for netconf hello packets interaction
EP3425850B1 (en) Method and device for processing communication path
CN109981459B (en) Information sending method, client and computer readable storage medium
CN113507431A (en) Message management method, device, equipment and machine readable storage medium
CN112039835B (en) Adaptive polling time estimation method, device, equipment and storage medium
CN108390828B (en) Message forwarding method and device
EP3346671B1 (en) Service processing method and equipment
EP3065445A1 (en) Method, cse, and system for transmitting m2m application request
EP2464139B1 (en) Route determination method and device
KR101855265B1 (en) Communication monitoring device, method of monitoring communication and storage media of middle-box operating system implementing the same
CN109462497B (en) Method, device, equipment and storage medium for transmitting management data
US9077700B2 (en) Authentication server, authentication method and computer program
US9800672B2 (en) Computer work distribution system and method
CN110086502B (en) Vehicle-mounted relay device, relay device and method, information processing device and system
US20150200813A1 (en) Server connection apparatus and server connection method
CN107995016B (en) Network fault processing method, device and system
CN112911630A (en) Session processing method, device, system, terminal and readable storage medium
JP4741410B2 (en) Mobile communication system, exchange, base station apparatus, and downlink communication data transmission method
US9699090B2 (en) Transfer device, control device, and transfer method
CN104869153B (en) Message transmission method and device for Internet of things

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