Abstract

Reducing buffer usage for a TCP proxy session between a client and a server by a service gateway includes: determining a first round trip time (RTT) for a server side TCP session and determining a second RTT for a client side TCP session; comparing the first RTT with the second RTT; determining whether the second RTT exceeds the first RTT beyond a threshold; if so, then calculating a desired RTT based on the second RTT; and setting a timer according to the calculated desired RTT, where a TCP acknowledgment for the server side TCP session is delayed until the timer expires. The desired RTT may be calculated as a percentage of the second RTT or as the second RTT minus a predetermined value. The service gateway waits until the timer has expired before sending a TCP acknowledgment data packet to the server.

Description

[0001 ] 本发明总地涉及数据通信，更具体地涉及服务网关。 Generally [0001] The present invention relates to data communications, and more particularly, to a serving gateway.

背景技术 Background technique

[0002] 诸如防火墙和服务器负载平衡器之类的许多服务网关一段时间提供传输控制协议(TCP)代理功能。 [0002] provide Transmission Control Protocol (TCP) functions such as proxy for some time many services gateway firewall and server load balancer and the like.TCP代理的典型服务应用包括网络分析、安全和由于非对称客户机和服务器状态的通信量适应。 Typical applications TCP proxy services include network analysis, traffic safety and due to the asymmetric client and server states adapt.TCP代理服务器一般分配一定量的存储器缓存以应付客户机设备和服务器之间的TCP代理会话的数据分组缓存。 Usually TCP proxy assigned a certain amount of cache memory to deal with the data packet buffer TCP proxy session between the client device and the server.存储器缓存被用来应付客户机侧会话和服务器侧会话的数据分组缓存。 The memory cache is used to deal with the data packet buffer client-side and server-side session session.客户机侧会话发送和接收缓存及服务器侧会话发送和接收缓存间的存储器空间分配通常不将性能考虑在内。 The client-side session between the transmission and reception buffer memory space of the server-side session and send and receive buffers allocated performance is not usually taken into account.TCP代理服务器从服务器侧会话接收数据分组，根据需要的服务应用处理数据分组，并将结果数据分组发送至客户机侧会话。 Proxy server side TCP packet data received from the session, processing the data packet according to the service needs of the application, the resultant data packet sent to the client-side session.在理想的场景下，这些步骤是在来自服务器侧会话的下一数据分组被传递至TCP代理服务器之前完成的。 In an ideal scenario, these steps are to be transmitted in the next packet data session from the server-side TCP proxy prior to completion.然而，在许多部署的情况下，客户机设备通过移动宽带接入或剩余因特网接入来接入服务，这种接入具有由于长距广域网引起的较长传输时间以及基于订户接入服务的较慢传输带宽。 However, in many cases deployed, the client device to access the service through the remaining mobile broadband access or Internet access, such access has a long transmission time due to the long distance and a wide area network caused more subscriber access and services based on slow transmission bandwidth.然而，一个或多个TCP代理服务器位于同一数据中心内并享有短传输时间和高容量带宽。 However, one or more TCP proxy server is located in the same data center and Related transmission time is short and a high capacity bandwidth.在该部署场景中，当TCP代理服务器从服务器侧会话接收数据分组时，所接收的数据分组被放置在服务器侧会话接收缓存中，并等待由服务应用处理的时机，进而等待客户机侧会话以释放客户机侧会话发送缓存，由于之前发送的数据分组的缓慢传输，该客户机侧会话发送缓存被填充以早前处理的待决数据分组，进而等待它们传输的时机。 In this deployment scenario, when TCP proxy packet server-side session receives data from the received data packet is placed in the server side session receive buffer, and wait time by the service application processing, and then wait for the client-side session to the client-side session release of the transmission buffer, because of the slow transmission of data packets previously transmitted, the client-side session the transmission buffer is filled with data pending earlier packet processing, and thus they are waiting for an opportunity to transmit.

[0003] 在典型情况下，一旦成功地从服务器接收到适当量的TCP数据，TCP代理服务器根据TCP协议发送TCP确认。 [0003] In a typical case, upon successfully received from the server to the appropriate amount of TCP data, TCP proxy sends a TCP acknowledgment according to the TCP protocol.当服务器接收到之前发送的TCP数据的TCP确认时，服务器将附加的TCP数据分组发送至TCP代理服务器。 When a TCP server before sending the data received by TCP acknowledgment, an additional server TCP data packet is sent to the TCP proxy.TCP代理服务器应当进一步增加服务器侧会话接收缓存的存储器空间以存储附加的TCP数据分组，同时等待之前的TCP数据被处理并被发送至客户机。 TCP proxy should further increase the reception buffer memory space of the server-side TCP session to store additional data packets while waiting until TCP data is processed and sent to the client.这种级联效应使TCP代理服务器消耗大量的存储器空间，用于容纳服务器侧会话的接收的TCP数据分组所需的服务器侧会话接收缓存。 This cascading effect that the TCP proxy consume a lot of memory space for receiving the received TCP data packets required for the server-side session server-side session reception buffer.所使用的缓存空间越大，可供TCP代理服务器使用以应付附加TCP代理会话的存储器资源越少；尽管TCP代理服务器可能具有其它丰裕的资源以应付附加负载。 The larger the buffer space used, available TCP proxy server uses TCP proxy session to cope with the additional memory resources of the less; although other TCP proxy server may have abundant resources to cope with the additional load.

发明内容 SUMMARY

[0004] 根据本发明的一个实施例，一种减少客户机和服务器之间的传输控制协议(TCP)代理会话的缓存使用的方法，包括:(a)确定服务网关和服务器之间的TCP代理会话的服务器侧TCP会话的第一往返时间(RTT)，并确定服务网关和客户机之间的TCP代理会话的客户机侧TCP会话的第二RTT ； (b)通过服务网关将第一RTT与第二RTT进行比较；(c)确定第二RTT是否超出第一RTT ； (d)响应于确定第二RTT超出第一RTT，基于第二RTT通过服务网关计算要求的RTT ;以及(e)根据计算出的要求RTT通过服务网关设定定时器，其中服务器侧TCP会话的TCP确认被延迟直到定时器到期为止。 [0004] According to one embodiment of the present invention, a method of reducing the buffers used (TCP) session transmission control protocol proxy between the client and the server, comprising: (a) determining a TCP proxy between the serving gateway and the server a first round-trip time of the TCP session server-side session (RTT), and determining a second RTT of the TCP session client side TCP proxy session between the client and the serving gateway; (b) via a first serving gateway and the RTT second comparing RTT; (c) determining whether the second exceeds the first RTT RTT; (D) in response to determining that the second exceeds the first RTT RTT, RTT is calculated based on the requirements of the second serving gateway by RTT; and (e) the RTT calculated requested through the service gateway sets a timer, TCP session in which a server side TCP acknowledgment is delayed until the timer expires.[0005] 在本发明的一个方面，确定(C)和计算(d)包括:cl)确定第二RTT是否超出第一RTT 一预定阈值；以及dl)响应于确定第二RTT超出第一RTT该预定阈值，基于第二RTT通过服务网关计算要求的RTT。 [0005] In one aspect of the present invention, the determining (C), and calculating (d) comprises: cl) determining a second RTT RTT exceeds a first predetermined threshold; and dl) in response to determining that the second RTT RTT exceeds a first a predetermined threshold value, based on the requirements of the second serving gateway RTT calculated by the RTT.

[0006] 在本发明的一个方面，计算(d)包括:dl)通过服务网关将要求的RTT计算为第二RTT的百分比。 [0006] In one aspect of the present invention, is calculated (d) comprises: RTT calculation dl) required by the service gateway as a second percentage of the RTT.

[0007] 在本发明的一个方面，计算(d)包括:(dl)通过网关服务器将要求的RTT计算为 [0007] In one aspect of the present invention, is calculated (d) comprises: (dl) is calculated by the gateway server RTT required

第二RTT减去一预定值。 Subtracting a second predetermined value RTT.

[0008] 在本发明的一个方面，设定(e)包括:(el)通过服务网关在服务器侧TCP会话上从服务器接收数据分组；(e2)通过服务网关确定将TCP确认发送至服务器的需要；(e3)通过服务网关将定时器设定至要求的RTT;以及(e4)响应于定时器的到期，通过服务网关将TCP确认发送至服务器。 [0008] In one aspect of the present invention is set (e) comprises: (el) receives data packets from the server via the server side service gateway on the TCP session; (E2) determines that a TCP acknowledgment is sent to the server via the service gateway ; (E3) by the service gateway to the RTT timer setting requirements; and (E4) in response to the expiration of the timer, the serving gateway through a TCP acknowledgment is sent to the server.

[0009] 对应于前面总结的方法的系统和计算机可读介质也在这里被描述和要求保护。 [0009] corresponding to the front of the computer system and the method summarized readable medium is also described and claimed herein.

附图说明 BRIEF DESCRIPTION

[0010] 图1示出根据本发明一实施例为客户机设备和服务器之间的TCP代理会话提供服务的服务网关。 [0010] FIG. 1 shows an embodiment of the present invention, the service gateway is a TCP proxy Example session between the client and server devices and services in accordance with.

[0011] 图1a示出根据本发明一实施例的服务网关的组件。 [0011] Figure 1a shows components of a service gateway according to an embodiment of the present invention.

[0012] 图2示出根据本发明一实施例的延迟发送TCP ACK分组的过程。 [0012] FIG. 2 shows a process delay of an embodiment of the present invention transmits a TCP ACK packet according to the.

具体实施方式 Detailed ways

[0013] 本发明能采用完全硬件实施例、完全软件实施例或包含硬件和软件部件两者的实施例的形式。 [0013] The present invention can employ an entirely hardware embodiment, an entirely software embodiment or an embodiment containing both hardware and software components.在一优选实施例中，本发明以软件实现，该软件包括但不限于固件、驻留软件、微代码等。 In a preferred embodiment, the present invention is implemented in software, which includes but is not limited to firmware, resident software, microcode, etc.

[0014] 此外，本发明能采用可从计算机可用或计算机可读介质访问的计算机程序产品的形式，该计算机程序产品提供由计算机或任何指令执行系统使用或与之联系地使用的程序代码。 [0014] Further, the present invention can take the form of a computer program product readable medium may be accessible from a computer-usable or computer, the computer program product providing program code by a computer or any instruction execution system or in connection therewith used.出于说明的目的，计算机可用或计算机可读介质可以是包含、存储、通信、传播和传输程序的任何装置，以由指令执行系统、装置或设备使用或与之联系地使用。 For purposes of description, a computer-usable or computer-readable medium can comprise any storage device, communicate, propagate, and transmitting the program to the instruction execution system, apparatus, or device, or used in connection therewith.

[0015] 介质可以是电子、磁、光、电磁、红外或半导体系统(或装置或设备)或传播介质。 [0015] The medium can be an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system (or apparatus or device) or a propagation medium.计算机可读介质的例子包括半导体或固态存储器、磁带、可移动计算机磁盘、随机存取存储器(RAM)、只读存储器(ROM)、硬磁盘和光盘。 Examples of the computer-readable medium include a semiconductor or solid state memory, magnetic tape, a removable computer diskette, a random access memory (RAM), a read only memory (ROM), a rigid magnetic disk and an optical disk.光盘的当前例子包括紧致盘-只读存储器(CD-ROM)、紧致盘-读/ 写(CD-R/W)和DVD。 Current examples of optical disks include compact disk - read only memory (CD-ROM), compact disk - read / write (CD-R / W), and DVD.

[0016] 适于存储和/或执行程序代码的数据处理系统将包括通过系统总线直接或间接耦合至存储器元件的至少一个处理器。 [0016] suitable for storing and / or executing program code will include a data processing system through a system bus coupled directly or indirectly to memory elements of the at least one processor.存储器元件可包括在实际执行程序代码期间利用的本地存储器、大容量存储以及高速缓存存储器，这些存储器提供至少一些程序代码的临时存储以减少在执行过程中必须从大容量存储中检索代码的次数。 The memory elements can include during actual execution of program code by using a local memory, mass storage, and cache memories which provide at least temporary storage some program code in order to reduce the number of times during execution must be from bulk storage to retrieve the code.

[0017] 输入/输出或I/O设备(包括但不限于键盘、显示器、定点设备等)可直接或通过中间I/o控制器耦合至系统。 [0017] Input / output or I / O devices (including but not limited to keyboards, displays, pointing devices, etc.) can be coupled to the system controller o directly or through intervening I /.

[0018] 网络适配器也可耦合至系统以允许数据处理系统通过中间私用网或公用网耦合至其它数据处理系统或远程打印机或存储设备。 [0018] Network adapters may also be coupled to the system to enable the data processing system is coupled with a network or public networks to other data processing systems or remote printers or storage devices through intervening private.调制解调器、线缆调制解调器和以太网卡只是当前可用类型的网络适配器中的一些。 Modems, cable modem and Ethernet cards are just a few of the currently available types of network adapters.

[0019] 附图中的流程图和框图示出根据本发明各实施例的系统、方法和计算机程序产品的可能实现的架构、功能和操作。 [0019] accompanying drawings illustrating block diagrams and flowchart system according to embodiments of the present invention, the architecture of possible implementations of methods and computer program products, functionality, and operation.在这方面，流程图或框图中的每个方框可代表模块、区段或代码的一部分，其包括一个或多个可执行指令以实现规定的本地功能。 In this regard, the flowchart or block diagrams may represent each block, segment, or portion of code which includes one or more executable instructions to implement a predetermined function locally.也应当注意，在一些替代实现中，框内记录的功能可按附图中记录的顺序之外的顺序发生。 It should also be noted that in some alternative implementations, the functions of frame recording order than the order of occurrence of the figures can be recorded.例如，连续示出的两个框实际上可基本同时地执行，或者某些框有时可按相反顺序执行，这依赖于所涉及的功能。 For example, two blocks shown in succession may in fact be executed substantially concurrently, or some blocks may sometimes be executed in the reverse order, depending upon the functionality involved.还要注意框图和/或流程图的每个框以及框图和/或流程图中的这些框的组合可通过实现特定功能或动作的基于专用硬件的系统或专用硬件和计算机指令的结合来实现。 Note also that the block diagrams and / or combinations of each block of the block diagrams and / or flowchart blocks of these flowcharts may be implemented by special purpose hardware-based binding system or a dedicated hardware and computer instructions for specific functions or acts.

[0020] 本文中使用的术语仅是为了描述具体实施例而不旨在对发明构成限制。 The term [0020] used herein is for the purpose of describing particular embodiments of the invention and is not intended to be limiting.本文中使用的单数形式“一”、“一个”和“该”旨在也包括复数形式，除非上下文中清楚指明了相反情形。 As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.要进一步理解，术语“包括”和/或“包含”，当在本说明书中使用时，规定了所声称的特征、整体、步骤、操作、要素和/或组件的存在，但不排除一个或多个其它特征、整体、步骤、操作、要素、组件和/或它们的组的存在或附加。 To be further understood that the terms "comprises" and / or "comprising," when used in this specification, specifies the stated features, integers, steps, operations, elements and / or components, but do not preclude a more or or the presence of additional other features, integers, steps, operations, elements, components, and / or groups thereof.

[0021] 本发明的实施例，如下文所述，调整了服务侧会话传输时间以减少缓存使用，这进而增加了TCP代理服务器的TCP代理会话的能力。 [0021] Example embodiments of the present invention, as described below, to adjust the transmission time for the session of the service to reduce the use of cache, which in turn increases the ability of the TCP session TCP proxy proxy server.根据本发明的实施例，TCP代理服务器延迟服务器发送附加的TCP数据，其中该延迟允许TCP代理服务器在服务器侧会话接收缓存中处理和发送拟被处理和发送至客户机的当前TCP数据。 According to an embodiment of the present invention, TCP proxy server transmits the additional delay of TCP data, wherein the processing delay allows the TCP proxy and the current TCP transmitting data intended to be sent to the client process and the server-side session in the receive buffer.当服务器在延迟后发送附加TCP数据时，TCP代理服务器在服务器侧会话接收缓存中将具有足够的空间以接收附加的TCP数据。 When adding the TCP server transmitting data after a delay, TCP proxy has received the TCP data sufficient additional space in a server-side session reception buffer.该延迟延长了该服务器和TCP代理服务器之间的服务器侧会话的传输时间。 The transmission delay time of the server-side extended session between the server and the TCP proxy.

[0023] 在一个实施例中，数据网络153包括网际协议(IP)网络、团体数据网络、区域团体数据网络、因特网服务提供者网络、住户数据网络、诸如以太网的有线网络、诸如WiFi网络的无线网络或蜂窝网络。 [0023] In one embodiment, data network 153 comprises an Internet Protocol (IP) network, a data network groups, community data area network, the Internet service provider network, a data network household, such as a wired Ethernet network, such as a WiFi network wireless or cellular networks.在一个实施例中，数据网络153位于数据中心内，或连接至一网络或应用网络云。 In one embodiment, the data network 153 is located within the data center, or to a network application or network cloud.

[0026] 在一个实施例中，客户机设备100包括宽带远程接入服务器(BRAS)、数字订户线接入多路复用器(DSLAM)、线缆调制解调器终端系统(CMTS)或服务提供者接入网关。 [0026] In one embodiment, client device 100 includes a broadband remote access server (the BRAS), a digital subscriber line access multiplexer (the DSLAM), a cable modem termination system (CMTS) or the service provider access into the gateway.

[0027] 在一个实施例中，客户机设备100包括诸如网关GPRS支持节点(GGSN)、家庭代理(HA)或PDN网关(PGW)之类的移动宽带接入网关。 [0027] In one embodiment, device 100 includes a client, such as a gateway GPRS support node (the GGSN), a mobile broadband access gateway home agent (HA) or a PDN Gateway (PGW) or the like.

[0029] 在一个实施例中，客户机设备100是类似于服务网关300的设备。 [0029] In one embodiment, the client device 100 is similar to the serving gateway apparatus 300.[0030] 客户机设备100经由服务网关300向服务器200发起TCP会话400。 [0030] The client device 100 300 400 initiates a TCP session via a service gateway to the server 200.

[0031] 服务器200是一般耦合至处理器和存储计算机可读程序代码的计算机可读介质的计算设备。 [0031] The server computing device 200 is typically a computer readable medium coupled to the processor and storing computer readable program code.具有处理器和计算机可读程序代码的服务器200实现Web服务器、文件服务器、视频服务器、数据库服务器、应用服务器、语音系统、会议服务器、媒体网关、媒体中心、应用服务器或网络服务器的功能，这些服务器使用TCP会话400向客户机设备100提供基于TCP的服务或应用服务。 A server having a processor and computer readable program code 200 implements the Web servers, file servers, video servers, database servers, application servers, voice system, the conference server, a media gateway, the media center function, application or network server, which the server 400 TCP session using TCP-based service or application service to the client device 100.

[0032] 在一个实施例中，服务器200是类似于服务器网关300的设备。 [0032] In one embodiment, the server apparatus 200 is similar to gateway server 300.

[0034] 图1a所示的服务网关300可操作地耦合至处理器310、存储器模块320、网络接口模块330以及计算机可读介质340。 Service gateway shown in [0034] FIG. 1a 300 operably coupled to processor 310, memory module 320, network interface module 330 and computer readable media 340.计算机可读介质340存储计算机可读程序代码，该计算机可读程序代码当由使用存储器模块320的处理器310执行时，实现如本文所述的本发明的各实施例。 The computer-readable medium 340 stores computer-readable program code, the computer readable program code when executed by the processor 310 using a memory module 320, implemented as various embodiments of the present invention according to embodiments described herein.在一些实施例中，服务网关300被实现为服务器负载平衡器、应用传递控制器、服务传递平台、通信量管理器、安全网关、防火墙系统的组件、虚拟个人网络(VPN)的组件、视频服务器的负载平衡器、将负载分配至一个或多个服务器的网关、Web或HTTP服务器、网络地址转换(NAT)网关或TCP代理服务器。 In some embodiments, the service gateway 300 is implemented as a server load balancer, the component application delivery controller assembly, service delivery platform, the traffic manager, the security gateway, firewall system, virtual private network (VPN), the video server load balancer, the load distribution to one or more gateway servers, Web or HTTP server, network address Translation (NAT) gateway or proxy server TCP.

[0035] 在一个实施例中，计算机可读介质340包括服务应用350的指令，并且处理器310执行服务应用350。 [0035] In one embodiment, a computer-readable medium 340 includes a service application instructions 350, 310 and the processor 350 performs the service application.

[0037] 回到图1，在向客户机设备100和服务器200之间的TCP代理会话400提供服务的一个实施例中，服务网关300建立与客户机设备100的客户机侧TCP会话420以及与服务器200的服务器侧TCP会话470。 [0037] Returning to Figure 1, in one embodiment, the TCP proxy service session between the client 100 and the server 200 in the device 400, the serving gateway 300 and the client device to establish a client-side 100 and a TCP session 420 server session server side TCP 200 470.

[0038] 在一个实施例中，服务网关300为服务器侧TCP会话470分配一接收缓存474。 [0038] In one embodiment, the service gateway 300 to a server side TCP session 470 allocates a receive buffer 474.在一个实施例中，接收缓存474驻留在存储器模块320中。 In one embodiment, the reception buffer 474 residing in the memory module 320.

[0039] 在一个实施例中，服务网关300使用TCP会话470的往返时间(RTT) 497监测TCP会话470的性能。 [0039] In one embodiment, the service gateway 300 uses the TCP session performance round trip time (the RTT) 470 497 470 monitor TCP session.服务网关300测量或估计TCP会话470的RTT497。 Services Gateway 300 measuring or estimating the TCP session 470 RTT497.在一个示例实施例中，服务网关300基于服务网关300向服务器200发送TCP会话470的数据分组的时间与服务网关300接收到对发送数据分组的确认的时间之间的时长来测量RTT497。 In one exemplary embodiment, the service gateway 300 transmits the data packets of the TCP session time and the serving gateway 470 to the server 200 based on the service gateway 300 receives the time duration between the transmission of the acknowledgment data packet 300 measured RTT497.在一个实施例中，服务网关300在TCP会话470期间周期地或偶尔地测量RTT497。 In one embodiment, the service gateway 300 periodically or occasionally measured during 470 RTT497 the TCP session.在一个实施例中，月艮务网关300基于与服务器200的一个或多个之前的服务器侧TCP会话估计RTT497。 In one embodiment, gateway 300 that works to months based on the server-side TCP session with the server 200 to one or more previous estimation RTT497.在一个实施例中，服务网关300将RTT497估计为10毫秒、100毫秒、3毫秒、22毫秒或3秒。 In one embodiment, the service gateway 300 RTT497 estimated as 10 ms, 100 ms, 3 ms, 22 ms or 3 seconds.

[0040] 在一个实施例中，服务网关300从接收缓存474检索数据，在一个实施例中通过服务应用350处理该数据，并通过TCP会话420将经处理的数据发送至客户机设备100。 [0040] In one embodiment, the service gateway 300 retrieves data from the receive buffer 474, in one embodiment, the processing by the data service applications 350, and 420 transmits the processed data to the client apparatus 100 via the TCP session.在一个实施例中，服务网关300每当TCP会话420准备传输时处理来自接收缓存474的数据。 In one embodiment, the service gateway 300 whenever a TCP session 420 is ready for transmission 474 to process the received data from the buffer.TCP会话420的缓慢传输造成服务网关300延迟处理来自接收缓存474的数据。 TCP slow transmission session 420 serving gateway 300 causes the delay processing data from the receive buffer 474.在一个实施例中，服务网关300使用TCP会话420的往返时间(RTT)492监测TCP会话420的性能。 In one embodiment, the service gateway 300 uses the round trip time (the RTT) 420 492 TCP session TCP session performance monitor 420.服务网关300测量或估计TCP会话420的RTT492。 Services Gateway 300 measuring or estimating the TCP session RTT492 420.在一个示例性实施例中，服务网关300基于服务网关300将TCP会话420的数据分组发送至客户设备100的时间和服务网关300接收对发送的数据分组的确认的时间之间的时长来测量RTT492。 The duration between the time in one exemplary embodiment, the service gateway 300 300 The data TCP session 420 transmits a packet based on the service gateway to the client device time and the serving gateway 100, 300 receive an acknowledgment of the data packets transmitted measured RTT492 .在一个实施例中，服务网关300在TCP会话420过程中周期地或偶尔地测量RTT492。 In one embodiment, the service gateway 300 periodically or occasionally measured in TCP session 420 RTT492 process.在一个实施例中，服务网关300基于与客户机设备100的一个或多个在前客户机侧TCP会话估计RTT492。 In one embodiment, the service gateway 300 based on one or more client devices 100 estimate the client-side TCP session RTT492 front.在一个实施例中，服务网关300将RTT492估计为10毫秒、100毫秒、3毫秒、22毫秒或3秒。 In one embodiment, the service gateway 300 RTT492 estimated as 10 ms, 100 ms, 3 ms, 22 ms or 3 seconds.

[0041 ] 在一个实施例中，服务网关300将RTT497与RTT492进行比较。 [0041] In one embodiment, the service gateway 300 is compared with RTT497 RTT492.在一个实施例中，当服务网关300确定RTT492超出RTT497某一阈值时，服务网关300如下文所述地施加处理，以调整RTT497以收窄RTT492和RTT497之间的间隙。 In one embodiment, when the service gateway 300 determines RTT492 RTT497 exceeds a certain threshold, the serving gateway 300 as described below is applied, so as to adjust to between RTT497 narrow gap RTT492 and RTT497.在一个实施例中，当RTT492比RTT497高过至少2倍、5倍或10倍时或当RTT492至少大过RTT497 —预定量(例如20毫秒、50毫秒或200毫秒)时，RTT492被确定为超出RTT497该阈值。 In one embodiment, when RTT492 than RTT497 higher than at least 2-fold, 5-fold or 10-fold or when RTT492 at least greater than RTT497 - a predetermined amount (e.g. 20 ms, 50 ms or 200 ms) when, RTT492 is determined to be exceeded RTT497 the threshold value.

[0042] 在一个实施例中，服务网关300确定RTT492未超出RTT497该阈值，并且服务网关300 不调整RTT497。 [0042] In one embodiment, the service gateway 300 determines RTT492 RTT497 not exceeded the threshold, and the serving gateway 300 without adjusting RTT497.

[0043] 在一个实施例中，服务网关300规则地或偶尔地测量RTT492和RTT497，并将RTT492与RTT497进行比较。 [0043] In one embodiment, the service gateway 300 regularly or occasionally measure RTT492 and RTT497, and compared with RTT492 RTT497.

[0044] 图2示出根据本发明一实施例用于调整服务器侧TCP会话470的RTT497的过程。 [0044] FIG. 2 shows a process for adjusting the embodiment RTT497 server side TCP session 470 according to an embodiment of the present invention.在一个实施例中，服务网关300从服务器200接收TCP会话470上的数据分组480。 In one embodiment, the service gateway 300 receives the data packet 470 TCP session 480 from the server 200.服务网关300将数据分组480存储到接收缓存474中。 The serving gateway 300 stores 480 the data packets to the reception buffer 474.在一个实施例中，服务网关300从接收缓存474确定按照TCP协议发送TCP确认的需要。 In one embodiment, the serving gateway 300 sent from the reception buffer 474 is determined according to the TCP acknowledgment requires TCP protocol.不是立即发送TCK ACK数据分组479，而是服务网关300使用定时器487安排在稍后时间发送TCP ACK数据分组479。 TCK is not sent immediately ACK packet 479, but the service gateway 300 uses timer 487 arranged to send TCP ACK packet 479 at a later time.服务网关300将定时器487设定至要求的RTT498。 Services Gateway 300 to the timer 487 is set RTT498 requirements.当定时器487到期时，服务网关300发送TCP ACK数据分组479。 When the timer 487 expires, the service gateway 300 sends TCP ACK packet 479.在一个实施例中，服务网关300包括时钟(未示出)，该时钟允许服务网关300确定定时器487是否到期。 In one embodiment, the service gateway 300 includes a clock (not shown), which allows clock serving gateway 300 determines whether the timer 487 expires.

[0045] 在一个实施例中，服务网关300基于RTT492计算要求的RTT498。 [0045] In one embodiment, the service gateway 300 based on the calculated required RTT492 RTT498.在一个实施例中，计算要求的RTT498使其落在RTT492的实际范围内。 In one embodiment, the computational requirements it RTT498 fall within the true scope of RTT492.例如，要求的RTT498被计算为RTT492的预定百分比，例如RTT492的30 %、40 %、60 %或75 %。 For example, the requirement is calculated as a predetermined percentage RTT498 RTT492, for example, of 30% RTT492, 40%, 60% or 75%.在一个实施例中，要求的RTT498被计算为RTT492减去一预定值，例如10毫秒、5毫秒或25毫秒。 In one embodiment, the requirement is calculated by subtracting a predetermined RTT498 value RTT492, e.g. 10 ms, 25 ms, or 5 ms.要求的RTT498提供发送TCP会话470的TCP确认的定时延迟，并由此增加TCP会话470的往返时间。 RTT498 required to provide a TCP session TCP acknowledgment transmission timing delay 470, and thereby increase the round-trip time of the TCP session 470.当在发送TCPACK数据分组479之后服务网关300如图1所示地测量RTT497时，RTT497被预期具有与要求的RTT498类似的值。 When the packet data service 479 transmitting TCPACK gateway 300 in FIG. 1 when measured RTT497 shown, RTT497 value is expected to have similar requirements RTT498.

[0046] 在一个实施例中，服务网关300执行一过程，即测量RTT497、RTT492，将RTT492与RTT497进行比较，并当服务网关300确定RTT492显著大于RTT497时执行图2中的处理步骤，从而减小接收缓存474的存储器容量，这进而增加了服务网关300处理额外TCP代理会话的能力。 [0046] In one embodiment, the service gateway 300 executes a process, i.e. measurement RTT497, RTT492, the RTT492 compared with RTT497, and executes the processing steps in FIG. 2 when the service gateway 300 determines RTT492 significantly greater than RTT497, thus reducing small receive buffer memory capacity of 474, which in turn increases the ability to handle the additional 300 service gateway TCP proxy session.

[0047] 在一实施例中，由用户凭经验确定预定RTT492的百分比或预定值，即针对不同客户机和服务器的不同TCP代理会话使用多种百分比和值。 [0047] In one embodiment, the predetermined value is empirically determined or predetermined percentage RTT492 by a user, i.e., using a variety of values ​​for different percentages and TCP sessions for different clients and proxy servers.典型地，RTT492和RTT497之间的差越小，则所需的接收缓存474的存储器容量越小。 The smaller the difference between Typically, RTT492 and RTT497, the required memory capacity of the reception buffer 474 is smaller.在一个实施例中，用户配置要求的RTT498以减少RTT497和RTT492之间的差。 In one embodiment, the user configures RTT498 required to reduce the difference between RTT497 and RTT492.在一个实施例中，预定的百分比在30%和50%之间，并由用户对服务网关300配置。 In one embodiment, the predetermined percentage is between 30% and 50%, by user 300 to configure the service gateway.用户能配置对较小的接收缓存474容量配置较高值的预定百分比或要求的RTT498，并对较大的接收缓存474容量配置较小值的预定百分比或要求的RTT498。 The user can configure a small percentage of the reception buffer 474 a predetermined value or higher capacity configuration required RTT498 pair and a larger capacity of the reception buffer 474 disposed a predetermined percentage of a smaller value or desired RTT498.用户可考虑一预定百分比或预定值以在接收缓存474容量和要求的RTT498之间取得平衡。 Users may consider a predetermined value or predetermined percentage of the balance between the capacity of the reception buffer 474 and requested RTT498.

[0048] 尽管已根据所示实施例描述了本发明，然而本领域内技术人员将容易理解，对这些实施例可能存在变型并且这些变型可落在本发明的精神和范围内。 [0048] While the present invention has been described in accordance with the illustrated embodiment, but those skilled in the art will readily appreciate that there may be variations to these embodiments and such modifications may fall within the spirit and scope of the invention.因此，可由本领域内技术人员作出许多修正而不脱离所附权利要求书的精神和范围。 Therefore, skilled in the art may make many modifications without departing from the spirit and scope of the appended claims.

Claims (15)

Translated from Chinese

1.一种减少在客户机和服务器之间的传输控制协议(TCP)代理会话的缓存使用的方法，所述方法包括: (a)确定服务网关和服务器之间的TCP代理会话的服务器侧TCP会话的第一往返时间(RTT)，并确定服务网关和客户机之间的TCP代理会话的客户机侧TCP会话的第二RTT ； (b)通过服务网关将第一 RTT与第二RTT进行比较； (c)确定第二 RTT是否超出第一RTT ； (d)响应于确定第二 RTT超出第一RTT，基于第二RTT通过服务网关计算要求的RTT ；以及(e)根据计算出的要求RTT通过服务网关设定定时器，其中服务器侧TCP会话的TCP确认被延迟直到定时器到期为止。 1. A method of using a cache between the client and the server Transmission Control Protocol (TCP) session reducing agent, the method comprising: (a) determining a proxy server side TCP TCP session between the serving gateway and the server the first round trip time of the session (RTT), and determining a second RTT of the TCP session client side TCP proxy session between the client and the serving gateway; (b) first and second RTT RTT by comparing the service gateway ; (c) determining whether the second exceeds the first RTT RTT; (D) in response to determining that the second exceeds the first RTT RTT, RTT is calculated based on a second required by the service gateway RTT; and (e) based on the calculated RTT requirements by setting the timer service gateway, wherein the server-side TCP session TCP acknowledgment is delayed until the timer expires.

2.如权利要求1所述的方法，其特征在于，所述确定(c)和计算⑷包括: Cl)确定第二RTT是否超出第一RTT —预定阈值；以及dl)响应于确定第二RTT超出第一RTT所述预定阈值，基于第二RTT通过服务网关计算要求的RTT。 2. The method according to claim 1, wherein said determining (c) and comprising ⑷ calculated: Cl) exceeds a first determining whether a second RTT RTT - predetermined threshold; and dl) in response to determining that the second RTT the RTT exceeds a first predetermined threshold value, based on the requirements of the second serving gateway RTT calculated by the RTT.

3.如权利要求1所述的方法，其特征在于，所述计算(d)包括: dl)通过服务网关将要求的RTT计算为第二RTT的百分比。 The method according to claim 1, wherein the calculating (d) comprises: dl) required by the service gateway RTT RTT is calculated as a percentage of the second.

4.如权利要求1所述的方法，其特征在于，计算(d)包括: (dl)通过网关服务器将要求的RTT计算为第二RTT减去一预定值。 4. The method according to claim 1, characterized in that the calculation (d) comprises: (dl) requested by the gateway server RTT calculated by subtracting a predetermined value to the second RTT.

5.如权利要求1所述的方法，其特征在于，所述设定(e)包括: (el)通过服务网关在服务器侧TCP会话上从服务器接收数据分组； (e2)通过服务网关确定将TCP确认发送至服务器的需要； (e3)通过服务网关将定时器设定至要求的RTT ;以及(e4)响应于定时器的到期，通过服务网关将TCP确认发送至服务器。 5. The method according to claim 1, wherein said setting (e) comprises: (el) from a data packet received by the server on the server side of the service gateway TCP session; (E2) determined by the service gateway TCP requires confirmation to the server; (E3) by the service gateway to the RTT timer setting requirements; and (E4) in response to the expiration of the timer, the serving gateway through a TCP acknowledgment is sent to the server.

6.一种具有嵌入在内的计算机可读程序代码以减少客户机与服务器之间的传输控制协议(TCP)代理会话的缓存使用的非临时计算机可读介质，所述计算机可读程序代码被配置成: (a)确定服务网关和服务器之间的TCP代理会话的服务器侧TCP会话的第一往返时间(RTT)，并确定服务网关和客户机之间的TCP代理会话的客户机侧TCP会话的第二RTT ； (b)将第一 RTT与第二RTT进行比较； (c)确定第二 RTT是否超出第一RTT ； (d)响应于确定第二 RTT超出第一RTT，基于第二RTT计算要求的RTT ；以及(e)根据计算出的要求RTT设定定时器，其中服务器侧TCP会话的TCP确认被延迟直到定时器到期为止。 Non-transitory computer used by the cache A having computer readable program code embedded to reduce including Transmission Control Protocol (TCP) between a client and a proxy server session-readable medium, the computer readable program code configured to: (a) determining a first round trip time of the TCP session server side TCP session between the agent and the service gateway server (RTT), and determines the client-side proxy TCP session TCP session between the serving gateway and the client a second RTT; (B) the first and second RTT RTT comparing; (c) determining whether the second exceeds the first RTT RTT; (D) in response to determining that the second exceeds the first RTT RTT, RTT based on a second calculating the RTT requirement; and (e) RTT timer is set based on the calculated claim, TCP server side TCP session wherein the acknowledgment is delayed until the timer expires.

7.如权利要求6所述的介质，其特征在于，被配置成确定(c)和计算(d)的计算机可读程序代码被进一步配置成: Cl)确定第二RTT是否超出第一RTT —预定阈值；以及dl)响应于确定第二RTT超出第一RTT所述预定阈值，基于第二RTT通过服务网关计算要求的RTT。 7. The medium according to claim 6, wherein, configured to determine (c) and calculating (d), computer readable program code is further configured to: Cl) exceeds the first determining whether a second RTT RTT - a predetermined threshold; and dl) in response to determining that said second RTT RTT exceeds a first predetermined threshold value, based on the requirements of the second serving gateway RTT calculated by the RTT.

8.如权利要求6所述的介质，其特征在于，被配置成计算(d)的计算机可读程序代码被进一步配置成: dl)将要求的RTT计算为第二RTT的百分比。 8. The medium according to claim 6, characterized in that the computing is configured to (d), computer readable program code is further configured to: dl) RTT is calculated as a percentage of the second would require the RTT.

9.如权利要求6所述的介质，其特征在于，被配置成计算(d)的计算机可读程序代码被进一步配置成: (dl)将要求的RTT计算为第二RTT减去一预定值。 9. The medium according to claim 6, characterized in that the computing is configured to (d), computer readable program code is further configured to: RTT calculation (DL) will be required as a second RTT by subtracting a predetermined value .

10.如权利要求6所述的介质，其特征在于，被配置成设定(e)的计算机可读程序代码被进一步配置成: (el)在服务器侧TCP会话上从服务器接收数据分组； (e2)确定将TCP确认发送至服务器的需要； (e3)将定时器设定至要求的RTT ;以及(e4)响应于定时器的到期，将TCP确认发送至服务器。 On the server side TCP server receives data from a packet session (el); (: 10. The medium according to claim 6, characterized in that the set is configured to (e) computer readable program code is further configured to e2) determining the TCP server needs to send an acknowledgment; (E3) set the timer to RTT requirements; and (E4) in response to the expiration of the timer, the TCP acknowledgment is sent to the server.

11.一种用于减少客户机和服务器之间的传输控制协议(TCP)代理会话的缓存使用的系统，包括: 安全网关，其中在安全网关和服务器之间建立TCP代理会话的服务器侧TCP会话，在安全网关和客户机之间建立TCP代理会话的客户机侧TCP会话，所述安全网关: (a)确定服务网关和服务器之间的TCP代理会话的服务器侧TCP会话的第一往返时间(RTT)，并确定服务网关和客户机之间的TCP代理会话的客户机侧TCP会话的第二RTT ； (b)将第一 RTT与第二RTT进行比较； (c)确定第二 RTT是否超出第一RTT ； (d)响应于确定第二 RTT超出第一RTT，基于第二RTT计算要求的RTT ;以及(e)根据计算出的要求RTT设定定时器，其中服务器侧TCP会话的TCP确认被延迟直到定时器到期为止。 11. A method for reducing the transmission control protocol used by the system cache (TCP) session between the proxy client and server, comprising: a security gateway, wherein the server-side TCP session established TCP proxy session between the server and the security gateway establish a TCP session between the agent and client security gateway client-side TCP session, the security gateway: (a) determining a first round trip time of the TCP session server side TCP session between the agent and the service gateway server ( RTT), and determining a second RTT of the TCP session client side TCP session between the agent and the client service gateway; (b) comparing the first and second RTT RTT; (C) determining whether the RTT exceeds a second a first RTT; (D) in response to determining that the second exceeds the first RTT RTT, RTT is calculated based on the RTT second requirement; and (E) RTT timer is set based on the calculated claim, TCP wherein the server-side TCP session acknowledgment It is delayed until the timer expires.

12.如权利要求11所述的系统，其特征在于，所述确定(c)和计算(d)包括: Cl)确定第二RTT是否超出第一RTT —预定阈值；以及dl)响应于确定第二RTT超出第一RTT所述预定阈值，基于第二RTT计算要求的RTT。 12. The system of claim 11, wherein said determining (c) and calculating (d) comprises: Cl) exceeds a first determining whether a second RTT RTT - predetermined threshold; and dl) in response to determining that the first two RTT RTT exceeds said first predetermined threshold value, calculated based on the required second RTT RTT.

13.如权利要求11所述的系统，其特征在于，所述计算(d)包括: dl)将要求的RTT计算为第二RTT的百分比。 13. The system of claim 11, wherein said computing (d) comprises: dl) The required RTT RTT is calculated as a percentage of the second.

15.如权利要求11所述的系统，其特征在于，所述设定(e)进一步包括: (el)在服务器侧TCP会话上从服务器接收数据分组； (e2)确定将TCP确认发送至服务器的需要； (e3)将定时器设定至要求的RTT ;以及(e4)响应于定时器的到期，将TCP确认发送至服务器。 Determining the TCP send an acknowledgment to the server (e2); (el) session on the server side TCP server receives data from packet: 15. A system as claimed in claim 11, wherein said setting (e) further comprises requires; (E3) set the timer to RTT requirements; and (E4) in response to the expiration of the timer, the TCP acknowledgment is sent to the server.

CN201410029889.6A2013-01-232014-01-22 Based delayed acknowledgments to reduce the use of cache proxy session tcp method, medium, and system CN103944954B
(en)

System and method for high-performance delivery of web content using high-performance communications protocol between the first and second specialized intermediate nodes to optimize a measure of communications performance between the source and the destination