Communication system, communication device, and communication method
By maintaining HTTP sessions with keep-alive signals, the communication system addresses bandwidth strain issues in REST communication systems, enhancing efficiency and load balancing.
Patent Information
- Application Number
- JP2024507452
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-03-18
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2042-03-18
AI Technical Summary
The frequent establishment and disconnection of HTTP sessions in REST communication systems lead to a significant consumption of network bandwidth, straining the communication bandwidth between devices and servers.
A communication system that maintains HTTP sessions after initial REST communication with a client, using keep-alive signals to manage these sessions, thereby reducing the need for repeated session establishment and disconnection.
This approach significantly reduces the processing time and packet usage required for HTTP session management, alleviating network bandwidth strain and enabling efficient load balancing across servers.
Smart Images

Figure 0007708304000001 
Figure 0007708304000002 
Figure 0007708304000003
Abstract
Description
Technical Field
[0001] The present disclosure relates to a communication system, a communication device, a communication method, and a program.
Background Art
[0002] Patent Document 1 discloses a configuration in which, in communication between a client and a server, REST (Representational State Transfer) - style communication (hereinafter referred to as "REST communication") is performed via HTTP (Hypertext Transfer Protocol).
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] REST refers to a design concept used as a lightweight and simple Web interface using XML (Extensible Markup Language) or HTTP. As a feature of REST communication, the server and the communication device that relays between the client and the server do not hold the client's session information or processing results, and the output is uniquely determined by the content of the input. As a result, the server does not need to hold and reflect previous session information, so the systems of the server and the communication device can be simplified.
[0005] In addition, since the request from the client includes all the information necessary for processing, the request can be processed in the same way even on a server different from the server that has been used for communication so far. Therefore, since it is not necessary to synchronize the client's information between servers, it is easy to add servers.
[0006] A communication device that relays communication between a client and a server establishes an HTTP session between the communication device and the server at the timing of sending a request from the client to the server. Then, it sends a response from the server to the client, disconnects the HTTP session with the server, and repeats these operations.
[0007] The communication device establishes and disconnects an HTTP session for each request from the client. For this reason, a large number of packets for establishing and disconnecting the HTTP session are used, which compresses the network bandwidth between the communication device and the server.
[0008] In view of the above, an object of the present disclosure is to provide a communication system capable of reducing the usage amount of network bandwidth.
Means for Solving the Problem
[0009] The communication system according to the present disclosure includes a server and a communication device that performs REST communication using an HTTP session established between the communication device and the server. After the REST communication started based on an incoming call signal received from a client device ends, the communication device sends a keep - alive signal to the server and transmits a response signal to the incoming call signal to the client device while maintaining the HTTP session.
[0010] The communication device according to the present disclosure includes a communication unit that performs REST communication using an HTTP session established with a server, and a session control unit that sends a keep - alive signal to the server via the communication unit and maintains the HTTP session after the REST communication started based on an incoming call signal received from a client device ends. The communication unit transmits a response signal to the incoming call signal to the client device while the HTTP session is maintained.
[0011] The communication method according to the present disclosure starts REST communication using an HTTP session established with a server based on an incoming call signal received from a client device, and after the REST communication ends, in order to maintain the HTTP session, a keep-alive signal is sent to the server, and a response signal to the incoming call signal is sent to the client device while the HTTP session is maintained.
[0012] The program according to the present disclosure causes a computer to start REST communication using an HTTP session established with a server based on an incoming call signal received from a client device, and after the REST communication ends, in order to maintain the HTTP session, a keep-alive signal is sent to the server, and a response signal to the incoming call signal is sent to the client device while the HTTP session is maintained.
Effects of the Invention
[0013] The present disclosure can provide a communication system capable of reducing the usage amount of network bandwidth.
Brief Description of the Drawings
[0014]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Embodiments for Carrying Out the Invention
[0015] <Embodiment 1> Hereinafter, embodiments of the present disclosure will be described with reference to the drawings. FIG. 1 shows an example of a communication system when the communication method of the present disclosure is not applied.
[0016] The communication system according to this embodiment includes a communication device 101 and three servers 102, 103, and 104. The communication device 101 is configured to establish a total of six HTTP sessions, two with each server. However, the number of servers and HTTP sessions is not limited to this.
[0017] The communication device 101 shown in the first row of FIG. 1 is activated by receiving an incoming call signal for REST communication transmitted from a client. The activated communication device 101 establishes an HTTP session with each of the servers 102, 103, and 104 (see the second row of FIG. 1).
[0018] After establishing the HTTP session, the communication device 101 transmits a request based on the incoming call signal (hereinafter referred to as a "REST request") to the servers 102, 103, and 104. The servers 102, 103, and 104 that receive the REST request transmit a response based on the REST request (hereinafter referred to as a "REST response") to the communication device 101 (see the third row of FIG. 1).
[0019] The communication device 101 that receives the REST response disconnects the HTTP sessions with the servers 102, 103, and 104 (see the fourth row of FIG. 1) and transmits a response signal to the client for the incoming call signal of the REST communication (see the fifth row of FIG. 1).
[0020] To establish an HTTP session between a communication device and a server, an exchange of three signals, SYN / SYNACK / ACK, is required. To terminate the HTTP session, an exchange of four signals, FINACK / ACK / FINACK / ACK, is required. That is, the establishment and termination of an HTTP session between the communication device and the server require seven packets per round.
[0021] As the number of requests from the client increases, the number of incoming call signals received by the communication device also increases. Therefore, the processing time and the number of packets required for the establishment and termination of the HTTP session increase by the number of incoming call signals. As a result, the network bandwidth between the communication device and the server is strained by operations other than the exchange of information.
[0022] Next, an embodiment of the communication system when applying the communication system and communication method according to the present disclosure will be described with reference to FIGS. 2, 3, and 4.
[0023] The communication device 101 shown in the first row of FIG. 2 is activated before receiving an incoming call signal for REST communication from the client, and establishes an HTTP session in advance with each of the servers 102, 103, and 104. Thereafter, the communication device 101 receives an incoming call signal transmitted from the client.
[0024] The communication device 101 transmits a REST request to the servers 102, 103, and 104 in order to start REST communication. The servers 102, 103, and 104 transmit a REST response to the communication device 101 (see the second row of FIG. 2). The REST communication between the communication device 101 and the servers 102, 103, and 104 ends when the communication device 101 receives the REST response.
[0025] Thereafter, the communication device 101 that has received the REST response transmits a response signal to the client for the incoming call signal for REST communication while maintaining the HTTP session with the servers 102, 103, and 104 (see the third row of FIG. 2).
[0026] The maintenance of the HTTP session is performed by transmitting a keep-alive signal from the communication device 101 to the servers 102, 103, and 104.
[0027] The processing of the communication system according to the present disclosure will be described with reference to the sequence diagram of FIG. 3. For simplicity, only the server 102 among the three servers 102, 103, and 104 is shown in FIG. 3. The operations of the servers 103 and 104 are the same as those of the server 102.
[0028] After startup (S101), the communication device 101 transmits a SYN signal requesting the establishment of an HTTP session to the server 102 (S102). The server 102 that has received the SYN signal transmits a SYNACK signal permitting the establishment of the HTTP session to the communication device 101 (S103). The communication device 101 that has received the SYNACK signal transmits an ACK signal starting the establishment of the HTTP session to the server 102, and establishes an HTTP session with the server 102 (S104). The communication device 101 repeats these steps for the number of HTTP sessions.
[0029] The communication device 101 that has established an HTTP session receives an incoming call signal from the client device 105 (S105) and transmits a REST request to the server 102 (S106). The server 102 that has received the REST request transmits a REST response to the communication device 101 (S107).
[0030] The communication device 101 that has received the REST response transmits a keep-alive signal to the server 102, and the server 102 that has received the keep-alive signal transmits a response signal to the keep-alive signal to the communication device 101 to maintain the HTTP session (S108). Thereafter, the communication device 101 transmits a response signal to the incoming call signal to the client device 105 (S109).
[0031] While maintaining the HTTP session with the server 102, the communication device 101 receives the next incoming call signal from the client device 105 (S110), and performs transmission and reception of the next REST request and REST response with the server 102 (S111 and S112).
[0032] After that, the communication device 101 that has performed REST communication for a predetermined amount does not transmit a keep-alive signal to the server 102, and transmits a response signal to the incoming call signal to the client device 105 (S113).
[0033] Next, the communication method of the communication system according to the present disclosure will be described using the flowchart of FIG. 4.
[0034] Based on the incoming call signal received from the client device 105, the communication device 101 starts REST communication using the HTTP session established with the server 102 (S201). After the REST communication ends, in order to maintain the HTTP session between the communication device 101 and the server 102, the communication device 101 transmits a keep-alive signal to the server 102 (S202). In a state where the HTTP session is maintained, the communication device 101 transmits a response signal to the incoming call signal to the client device 105 (S203).
[0035] In this way, by maintaining the HTTP session between the communication device 101 and the server 102, it is possible to omit the steps of establishing and disconnecting the HTTP session every time an incoming call signal is received.
[0036] Therefore, even if the requests from the client increase and the number of incoming call signals received by the communication device increases, it is possible to save the processing time and the number of packets required for establishing and disconnecting the HTTP session. As a result, it is possible to relieve the pressure on the network bandwidth between the communication device and the server.
[0037] Here, as an effect obtained by the communication system and communication method according to the present disclosure, the processing time and the number of packets required for establishing and disconnecting an HTTP session in REST communication are calculated.
[0038] Assume a case where an HTTP session is maintained for 1 hour (3600 seconds), with the number of call signals that a communication device can process per second (tps: Transaction Per Second) being 940 and the number of HTTP sessions established when the communication device starts up being 100. Also, since 7 packets are used for each establishment and disconnection of an HTTP session, here the time required to process 7 packets is set to 2 ms.
[0039] When the communication method of the present disclosure is not applied, the processing time per hour is 940 (tps) × 2 (ms) × 3600 (s) = 6,768,000 (ms), and the number of packets per hour is 940 (tps) × 7 (packets) × 3600 (s) = 23,688,000 (packets).
[0040] On the other hand, when the communication method of the present disclosure is applied, after establishing 100 HTTP sessions at startup, in order to maintain the HTTP sessions, subsequent processing for establishing and disconnecting the HTTP sessions becomes unnecessary. Therefore, the processing time per hour is 100 (sessions) × 2 (ms) = 200 (ms), and the number of packets per hour is 100 (sessions) × 7 (packets) = 700 (packets).
[0041] In this way, by applying the communication method according to the present disclosure, it becomes possible to reduce the processing time and the number of packets required for establishing and disconnecting an HTTP session. Therefore, it is possible to provide a communication system capable of reducing the usage amount of network bandwidth.
[0042] <Embodiment 2> In this embodiment, in the communication system according to Embodiment 1, the processing when a failure occurs in the server will be described.
[0043] In order to ensure processing performance in a communication system, it is important to maintain the number of HTTP sessions. Therefore, when a failure occurs in a server, it is desirable for the communication device to redistribute the HTTP sessions established with the failed server to other servers.
[0044] FIG. 5 shows a state when a failure occurs in a server in the communication system according to Embodiment 1. The communication system according to this embodiment includes a communication device 101 and three servers 102, 103, and 104, as in Embodiment 1. The communication device 101 is configured to establish a total of six HTTP sessions, two with each server. However, the number of servers and HTTP sessions is not limited to this.
[0045] When a failure occurs in the server 102 shown in the first row of FIG. 5, the communication device 101 establishes the two HTTP sessions established with the server 102 between the servers 103 and 104 in order to maintain the number of HTTP sessions. Therefore, the communication device 101 establishes three HTTP sessions each between the servers 103 and 104.
[0046] The communication method according to Embodiment 1 reduces the processing time and the number of packets required for establishing and disconnecting HTTP sessions by maintaining the HTTP sessions. However, since the communication device 101 does not establish an HTTP session with the server 102 even after the recovery of the server 102, the load remains biased towards the servers 103 and 104 (see the second row of FIG. 5). Therefore, as the server 102 recovers, it is necessary for the communication device 101 to newly provide an opportunity to re - establish an HTTP session with the server 102.
[0047] The communication system and the communication method according to this embodiment enable rapid smoothing of the load of HTTP sessions after the recovery of the server.
[0048] The communication system and communication method according to this embodiment will be described with reference to FIG. 6. When a failure occurs in the server 102 shown in the first row of FIG. 6, the communication device 101 establishes two HTTP sessions that were established with the server 102 between the servers 103 and 104. Therefore, the communication device 101 has established three HTTP sessions each with the servers 103 and 104.
[0049] Here, the communication device 101 selects one from the six HTTP sessions established between the servers 103 and 104, excludes it from the transmission targets of the keep-alive signals, and disconnects the selected HTTP session (see the second row of FIG. 6). After that, the communication device 101 re-establishes the disconnected HTTP session. These series of steps are periodically repeated when the server 102 has not recovered.
[0050] When the server 102 has not recovered when the communication device 101 re-establishes the HTTP session, an HTTP session is established between the server 103 or the server 104. When the server 102 has recovered when the communication device 101 re-establishes the HTTP session, an HTTP session is established with the server 102.
[0051] In this way, by providing an opportunity to establish an HTTP session with the recovered server 102, it is possible to quickly smooth the load of the HTTP session after the recovery of the server 102 (see the third row of FIG. 6).
[0052] Next, the interior of the communication device in the communication systems according to Embodiments 1 and 2 will be described. FIG. 7 is a configuration diagram of the communication device according to the present embodiment. The communication device 101 includes a communication unit 106 and a session control unit 107. The communication unit 106 establishes an HTTP session with the server 102 and performs REST communication with the client device 105. The session control unit 107 transmits a keep-alive signal to the server 102 via the communication unit 106 and maintains the HTTP session after the REST communication started based on the call signal received from the client device 105 ends.
[0053] By configuring the communication device 101 in such a manner, it becomes possible to efficiently execute the communication method according to the present disclosure.
[0054] In the above example, when the program is loaded into a computer, it includes a set of instructions (or software code) for causing the computer to perform one or more functions described in the embodiment. The program may be stored in a non-transitory computer-readable medium or a tangible storage medium. By way of example and not limitation, the computer-readable medium or tangible storage medium includes random-access memory (RAM), read-only memory (ROM), flash memory, solid-state drive (SSD), or other memory technologies, CD-ROM, digital versatile disc (DVD), Blu-ray (registered trademark) disc, or other optical disc storage, magnetic cassette, magnetic tape, magnetic disk storage, or other magnetic storage devices. The program may be transmitted on a transient computer-readable medium or a communication medium. By way of example and not limitation, the transient computer-readable medium or communication medium includes electrical, optical, acoustic, or other forms of propagated signals.
[0055] Note that the present disclosure is not limited to the above-described embodiments and can be appropriately modified without departing from the gist. Also, the present disclosure may be implemented by appropriately combining the respective embodiments.
[0056] Some or all of the above embodiments may also be described as follows, but are not limited thereto. (Appendix 1) A server and a communication device that performs REST (Representational State Transfer) communication using an HTTP (Hypertext Transfer Protocol) session established with the server, wherein the communication device after the REST communication started based on an incoming call signal received from a client device ends, sends a keep-alive signal to the server, and in a state where the HTTP session is maintained, sends a response signal to the incoming call signal to the client device. (Appendix 2) The server sends a REST response signal to the communication device in response to a REST request signal received from the communication device, wherein the communication device sends the keep-alive signal to the server when receiving the REST response signal, the communication system according to Appendix 1. (Appendix 3) The communication device establishes the HTTP session with the server at startup, the communication system according to Appendix 1 or 2. (Appendix 4) The communication device establishes the HTTP session with a plurality of the servers, and when a failure occurs in a first server included in the plurality of servers, establishes the HTTP session established between a server other than the first server included in the plurality of servers and the first server, the communication system according to any one of Appendices 1 to 3. (Appendix 5) The communication device The communication system according to Supplementary Note 4, which distributes the HTTP session established with the first server so that the loads of the servers other than the first server included in the plurality of servers approach equality. (Supplementary Note 6) The communication device When a failure occurs in the first server, the communication system according to Supplementary Note 4 selects a second server included in the plurality of servers, excludes the second server from the targets for transmitting keep-alive signals after the REST communication with the second server ends, and disconnects the HTTP session established with the second server. (Supplementary Note 7) The communication device When the first server has not recovered from the failure, the communication system according to Supplementary Note 6 establishes an HTTP session between a server other than the first server among the plurality of servers and the disconnected second server, and when the first server recovers from the failure, establishes an HTTP session between the first server and the disconnected second server. (Supplementary Note 8) A communication unit that performs REST (Representational State Transfer) communication using an HTTP (Hypertext Transfer Protocol) session established with a server; A session control unit that transmits a keep-alive signal to the server via the communication unit after the REST communication started based on an incoming call signal received from a client device ends, and maintains the HTTP session. The communication unit A communication device that transmits a response signal to the incoming call signal to the client device while the HTTP session is maintained. (Supplementary Note 9) The communication unit Based on the call signal received from the client device, send a REST request signal to the server, and when receiving a REST response signal from the server as a response to the REST request signal, send the keep - alive signal to the server, the communication device according to Appendix 8. (Appendix 10) Based on the call signal received from the client device, start REST (Representational State Transfer) communication using the HTTP (Hypertext Transfer Protocol) session established with the server. After the REST communication ends, send a keep - alive signal to the server to maintain the HTTP session. A communication method of sending a response signal to the call signal to the client device in a state where the HTTP session is maintained. (Appendix 11) Based on the call signal received from the client device, start REST (Representational State Transfer) communication using the HTTP (Hypertext Transfer Protocol) session established with the server. After the REST communication ends, send a keep - alive signal to the server to maintain the HTTP session. A non - temporary computer - readable medium storing a program that causes a computer to perform the steps of sending a response signal to the call signal to the client device in a state where the HTTP session is maintained.
Explanation of Signs
[0057] 101 Communication device 102 Server 103 Server 104 Server 105 Client device 106 Communication unit 107 Session control unit
Claims
1. A server and a communication device that performs REST (Representational State Transfer) communication using an HTTP (Hypertext Transfer Protocol) session established with the server, comprising: The communication device: After the REST communication started based on an incoming call signal received from a client device ends, a keep-alive signal is sent to the server, and a response signal to the incoming call signal is sent to the client device while maintaining the HTTP session. Establish the HTTP session with a plurality of the servers, and when a failure occurs in a first server included in the plurality of servers, establish the HTTP session that was established between a server other than the first server included in the plurality of servers and the first server. A communication system.
2. The server: Sends a REST response signal to the communication device in response to a REST request signal received from the communication device. The communication device: Sends the keep-alive signal to the server when the REST response signal is received. The communication system according to claim 1.
3. The communication device: Establishes the HTTP session with the server at startup. The communication system according to claim 1 or 2.
4. The communication device: Allocates the HTTP session established with the first server so that the loads of servers other than the first server included in the plurality of servers approach equality. The communication system according to claim 1.
5. The communication device: When a failure occurs in the first server, selects a second server included in the plurality of servers, excludes the second server from the targets for sending the keep-alive signal after the REST communication with the second server ends, and disconnects the HTTP session established with the second server. The communication system according to claim 1.
6. The communication device: When the first server has not recovered from the failure, establishes the HTTP session between the second server that was disconnected and a server other than the first server among the plurality of servers, and when the first server recovers from the failure, establishes the HTTP session between the second server that was disconnected and the first server. The communication system according to claim 5.
7. A communication unit that performs REST (Representational State Transfer) communication using an HTTP (Hypertext Transfer Protocol) session established with a server, A session control unit that transmits a keep-alive signal to the server via the communication unit and maintains the HTTP session after the REST communication started based on an incoming call signal received from a client device ends, The communication unit is In a state where the HTTP session is maintained, transmits a response signal to the incoming call signal to the client device, Establishes the HTTP session with a plurality of the servers, and when a failure occurs in a first server included in the plurality of servers, establishes the HTTP session established between a server other than the first server included in the plurality of servers and the first server, Communication device.
8. The communication unit is Transmits a REST request signal to the server based on the incoming call signal, and transmits the keep-alive signal to the server when receiving a REST response signal from the server as a response to the REST request signal, The communication device according to claim 7.
9. Based on an incoming call signal received from a client device, start REST (Representational State Transfer) communication using an HTTP (Hypertext Transfer Protocol) session established with a server, After the REST communication ends, transmit a keep-alive signal to the server to maintain the HTTP session, In a state where the HTTP session is maintained, transmit a response signal to the incoming call signal to the client device, Establish the HTTP session with a plurality of the servers, and when a failure occurs in a first server included in the plurality of servers, establish the HTTP session established between a server other than the first server included in the plurality of servers and the first server, Communication method.
Citation Information
Patent Citations
Slicing persistent connections
JP2002335268A
Database connection management method and computer system
JP2007226398A
System and method for scalable video cloud service
JP2016534607A
Services in reverse proxy server
JP2017538179A