1. Field of the Invention
The present invention relates generally to network architectures. More particularly, the present invention relates to methods and systems for implementing a light-weight TCP stack for use in networks.
2. Background Art
Today, the Internet uses a variety of technologies to provide end-to-end communication between applications on different computers. Most applicants use Transport Control Protocol (TCP) and Internet Protocol (IP) (TCP/IP) to achieve this end-to-end communication. TCP/IP is a suite of protocols designed to allow communication between networks regardless of the technologies implemented in each network. The concept that underlies the creation and development of TCP/IP is generally referred to as internetworking. An important fundamental idea that defines the internetworking is known as layering or modularity. For example,
As shown in
As a packet is received by a host, the packet enters the lowest point of TCP/IP stack 300, which is physical layer 325, and travels the sequence of layers 305-325 that make up TCP/IP stack 300. Each layer then proceeds to strip-out the data it needs and passes the remaining packet, if required, to the next layer up in the stack. Likewise, when application layer 305 creates a packet, application layer 305 will pass the packet down to the next layer where further information is added by each and every subsequent layer until the packet emerges onto physical layer 325 as a full TCP/IP packet. As an example, a 30-byte packet created by application layer 305 may be sent to transport layer 310, e.g. TCP, where 20 bytes of TCP header are added to the packet. Thereafter, 20 bytes of IP header may be added by network layer 15 to the packet, and 22 bytes of ethernet header may be added by data-link layer 320, before a full packet of 96 bytes arrives at physical layer 325 for transmission in the network. Similarly, when a packet arrives at physical layer 325, data are stripped out from the packet at each layer until a 30-byte packet arrives at application layer 305.
Now, turning to
A socket is required on each of edge device 110 and server 120 for a valid connection, i.e. two sockets per connection, and each of edge device 110 and server 120 will keep track of the sockets currently in use. Each socket contains the numeric IP address of the local host, the local port number and the port number of the TCP/IP service on the remote host. Each socket is uniquely numbered and valid only for the duration of the connection. The socket number is recycled when the connection is completed. When server 110 sends a connection request to server 120 asking for permission to use the remote service, server 120 uses listening socket 250 for monitoring and receiving such request to start a thread, such as thread 252, 262 or 272, for establishing a TCP/IP session for supporting a connection with edge device 110. The initial request from edge device 110 includes IP address of server 120, the port number of the requested service from server 120 and the local socket number, i.e. the originating socket number of edge device 110. As a result of this initial request, server 120 creates its own socket 255, 265 or 275 to use for the duration of the connection 242, 244 or 246, respectively. Server 120 then replies with an acknowledgement which contains server 120 socket information directed back to the originating socket address of edge device 110.
For example, once client connection 202 between edge device 110 and a client using the socket in FTSI/socket 215 is established and confirmed, FTSI/socket 215 provides a full implementation of TCP stack for data communications between the client device and edge device 110. Similarly, once private connection 242 between edge device 110 and server 120 using the sockets in FTSI/socket 218 and FTSI/socket 255 is established and confirmed, FTSI/socket 218 and FTSI/socket 255 provide full implementations of TCP stack for data communications between edge device 110 and server 120. At this point, the client can then use the desired application on server 120. When the client ends the connection with edge device 110, edge device 110 in turn ends the connection with server 120. Likewise, client connections 204 and 206 can made via FTSI/socket 225 and FTSI/socket 235, respectively, and private connections 244 and 246 can made via FTSI/socket 228, FTSI/socket 265, FTSI/socket 238 and FTSI/socket 275, in response to other client requests through edge device 110 for using services or applications on server 120.
However, the above-described conventional approach suffers from many inefficiencies and a tremendous overhead for edge device 110 and server 120, since each of private connections 242, 244 and 246 must be supported by a full TCP stack implementation at edge device 110 and a full TCP stack implementation at server 120, e.g. FTSIs of FTSI/socket 218, 228 and 238 and FTSIs of FTSI/socket 255, 265 and 275. As a result, on a per-session-basis, each full-blown TCP stack implementation—in this case three sets of FTSI to support three private connections—includes a tremendous overhead of a full-fledged socket/TCP/IP data structure, retransmission handling, timer management, populated lookup table, session open and tear-down, and so on.
Accordingly, there is a need in the art to provide a higher performance and resource efficient network architecture that overcomes the inefficiencies of the conventional network architecture and its undesirable full TCP stack overhead that is required for each connection.
There are provided systems and methods for implementing a light-weight TCP stack for use in networks, substantially as shown in and/or described in connection with at least one of the figures, as set forth more completely in the claims.
The features and advantages of the present invention will become more readily apparent to those ordinarily skilled in the art after reviewing the following detailed description and accompanying drawings, wherein:
Although the invention is described with respect to specific embodiments, the principles of the invention, as defined by the claims appended herein, can obviously be applied beyond the specifically described embodiments of the invention described herein. Moreover, in the description of the present invention, certain details have been left out in order to not obscure the inventive aspects of the invention. The details left out are within the knowledge of a person of ordinary skill in the art.
The drawings in the present application and their accompanying detailed description are directed to merely example embodiments of the invention. To maintain brevity, other embodiments of the invention which use the principles of the present invention are not specifically described in the present application and are not specifically illustrated by the present drawings. It should be borne in mind that, unless noted otherwise, like or corresponding elements among the figures may be indicated by like or corresponding reference numerals.
According to one embodiment of the present invention, only a single FTSI connection is used between each server 420, 430 or 440 and edge device 410, and one or more LTSI connections are established over the single FTSI connection. As a result, the overhead of establishing an FTSI connection for each and every client connection is substantially reduced by an implementation of the present invention. Of course, in other embodiments of the present invention, there can be a plurality of FTSI connections between each server 420, 430 or 440 and edge device 410, where each of the plurality of FTSI connections supports one or more LTSI connections. A person of ordinary skill in the art would recognize that such changes can be made to the invention of the present application in form and detail without departing from the spirit and the scope of the invention.
Further, at step 620, thread 512, 522 or 532 creates light-weight socket 518, 528 or 538, respectively, for supporting light TCP connections 520 via super FTSI connection 525, which are supported by light-weight socket 518, 528 or 538 and FTSI/socket 545, respectively. Light-weight socket 518, 528 or 538 is an extension of conventional FTSI socket for supporting light TCP connections over an FTSI connection. Next, at step 625, edge device 510 associates a unique session ID (SID) with the new light TCP connection that is to be established over FTSI connection 525. At step 630, edge device 510 sends an open session message (MSG_TCP_OPEN) to server 550 over super FTSI connection 525 to open a new light TCP connection that will be associated with the new SID.
At step 635, listening socket 551 of server 550 detects the open session message and opens thread 552, 562 or 572 in response thereto. At step 640, server 550 associates LTSI/light-weight socket 554, 564 or 574 with FTSI/socket 555 and super FTSI connection 525, and light TCP connection 520 is established between edge device 510 and server 550 via super FTSI connection 525. Once light TCP connection 520 is established, at step 645, edge device 510 and server 550 start exchanging data packets using the new SID to identify the newly established light TCP connection 520 via super FTSI connection 525.
In one embodiment of the present invention, light TCP implementation can be achieved without modifying the conventional socket semantic or changing the application layer. In one embodiment, a single persistent connection may be established between edge device 510 and server 550 to support all client connections with server 550. In accordance with such embodiment, the need for a look-up table for tracking FTSI connections is eliminated, since there is only a single FTSI connection, namely supper FTSI connection, that supports all light TCP connections with server 550. As a result, TCP/IP processing overhead, including full-fledged socket/TCP/IP data structure, retransmission handling, timer management, populated lookup table, session open and tear-down, and so on, is reduced to the overhead for a single super FTSI connection. In addition, data structures for light TCP stack implementations are smaller than FTSI connections, and memory allocation and complexity are also reduced by the present invention. Even more, the present invention substantially reduces pollution of the processor cache with network subsystem data structures and increases performance.
In one embodiment, there is provided a method for use by edge device 510 for establishing a connection with server 550 to support full TCP connection 502 between a client (not shown) and edge device 510. The method comprises establishing full TCP connection 525 with server 550 using full TCP socket 545, allocating first light TCP socket 518 for supporting a first light TCP connection of LTSI connection 520 with server 550, associating a first light session ID with the first light TCP connection of LTSI connection 520, sending a first open session message to server 550 via full TCP connection 525 with server 550, establishing the first light TCP connection of LTSI connection 520 with server 550 via full TCP connection 525, associating first data with the first light session ID, and delivering the first data associated with the first light session ID to server 550 using the first light TCP connection of LTSI connection 520 via full TCP connection 525.
In another embodiment, prior to establishing full TCP connection 525 with server 550, the method may further comprise receiving a first client request for client connection 502. In yet another embodiment, after establishing full TCP connection 525 with server 550 occurs, full TCP connection 525 is maintained persistently even without a client connection being present or requested. In one embodiment, full TCP connection 525 is the only full TCP connection between edge device 510 and server 550, and full TCP connection 550 supports a plurality of light TCP connections 520 including the first light TCP connection.
Further, the method may also comprise receiving a second client request for second connection 504, allocating second light TCP socket 528 for supporting a second light TCP connection of LTSI connections 520 with server 550, associating a second light session ID with the second light TCP connection of LTSI connections 520, sending a second open session message to server 550 via full TCP connection 525 with server 550, establishing the second light TCP connection of LTSI connections 520 with server 550 via full TCP connection 525, associating second data with the second light session ID, and delivering the second data associated with the second light session ID to server 550 using the second light TCP connection of LTSI connections 520 via full TCP connection 525.
In yet another embodiment, there is provided a method for use by server 550 for establishing a connection with edge device 510 to support full TCP connection 502 between a client (not shown) and edge device 510. The method comprises establishing full TCP connection 525 with edge device 510 using full TCP socket 555, receiving a first open session message from edge device 510 via full TCP connection 525 with edge device 510, allocating first light TCP socket 554 for supporting a first light TCP connection of LTSI connections 520 with edge device 510, associating a first light session ID with the first light TCP connection of LTSI connections 520, establishing the first light TCP connection of LTSI connections 520 with edge device 510 via full TCP connection 525, associating first data with the first light session ID, and delivering the first data associated with the first light session ID to edge device 510 using the first light TCP connection of LTSI connections 520 via full TCP connection 525.
In an additional embodiment, prior to establishing full TCP connection 525 with server 550, edge device 510 may receive a first client request for first connection 515. In yet another embodiment, after establishing full TCP connection 525 with edge device 510 occurs, full TCP connection 525 is maintained persistently even without a client connection being present or requested. In one embodiment, full TCP connection 525 is the only full TCP connection between edge device 510 and server 550, and full TCP connection 550 supports a plurality of light TCP connections 520 including the first light TCP connection.
Further, the method may also comprise receiving a second open session message from edge device 510 via full TCP connection 525 with edge device 510, allocating a second light TCP socket for supporting a second light TCP connection of LTSI connections 520 with edge device 510, associating a second light session ID with the second light TCP connection of LTSI connections 520, establishing the second light TCP connection of LTSI connections 520 with edge device 510 via full TCP connection 525, associating second data with the second light session ID, and delivering the second data associated with the second light session ID to edge device 510 using the second light TCP connection of LTSI connections 520 via full TCP connection 525.
Now, turning to server 550 of
From the above description of the invention it is manifest that various techniques can be used for implementing the concepts of the present invention without departing from its scope. Moreover, while the invention has been described with specific reference to certain embodiments, a person of ordinary skill in the art would recognize that changes can be made in form and detail without departing from the spirit and the scope of the invention. For example, it is contemplated that the circuitry disclosed herein can be implemented in software, or vice versa. The described embodiments are to be considered in all respects as illustrative and not restrictive. It should also be understood that the invention is not limited to the particular embodiments described herein, but is capable of many rearrangements, modifications, and substitutions without departing from the scope of the invention.
Number | Name | Date | Kind |
---|---|---|---|
7269654 | Srinivas | Sep 2007 | B2 |
20030217149 | Crichton et al. | Nov 2003 | A1 |
20050138189 | Tripathi et al. | Jun 2005 | A1 |
20050271042 | Johnson | Dec 2005 | A1 |
20060075119 | Hussain et al. | Apr 2006 | A1 |
Number | Date | Country | |
---|---|---|---|
20080069116 A1 | Mar 2008 | US |