A more complete understanding of the present invention may be obtained by reference to the following detailed description when taken in conjunction with the accompanying drawings wherein:
Referring to
In the exemplary scenario, it is assumed that HTTP traffic (e.g., HTTP incoming packets 310, 310′ and 310″) are load balanced among three HTTP servers S1, S2 and S3 (shown as HTTP servers 312a, 312b, and 312n). And, the application filter 302 is assumed to implement a server calculation algorithm that is based on round robin scheme. Alternatively, the application filter 302 could implement a server calculation algorithm that is based, for example, on a least number of connections scheme or a server service rate scheme. At step 1, the CAM 316 would look as follows:
The CAM 316 receives the first incoming packet 310 which is a TCP packet (associated with a HTTP connection) with a SRC IP Addr.=a.b.c.d and a DST IP Addr.=1.1.1.1. The incoming packet 310 matches the application filter 302 because it satisfies the matching key where SRC IP Addr.=ANY, DST IP Addr.=www.ericsson.com (1.1.1.1) and Protocol field=TCP. The application filter 302 then creates a dynamic filter 304 which has an action field with instructions to “redirect to server S1”. The application filter 302 selects server S1 because none of the servers S1, S2 and S3 have been previously selected by the round robin server selection algorithm. At step 2, the CAM 316 looks as follows:
The router 300 receives HTTP packets 310′ and 310″ that contain a SRC IP Addr.=a.b.c.d and a DST IP Addr.=1.1.1.1 which means they will match the dynamic filter 304 (the first filter checked). The dynamic filter 304 has an action field with instructions that redirects the HTTP packets 310′ and 310″ to server S1. At this point, server S1 has been assigned to service one traffic stream 310, 310′ and 310″, and the remaining servers S2 and S3 have not yet been assigned to service a traffic stream.
The router 300 now receives an incoming packet 320 which is a TCP packet (associated with a HTTP connection) with a SRC IP Addr.=d.e.f.g and a DST. IP Addr.=1.1.1.1. The incoming packet 320 does not match the first dynamic filter 304 (the first filter checked) because there is a difference between the SRC IP Addr.=a.b.c.d (in dynamic filter 304) and the SRC IP Addr.=d.e.f.g (in incoming packet 320). However, the incoming packet 320 does match the application filter 302 (the second filter checked) because it satisfies the matching key which includes SRC IP Addr.=ANY. DST IP Addr.=www.ericsson.com (1.1.1.1) and Protocol field=TCP. The application filter 302 then creates a new dynamic filter 304′ which has an action field with instructions to “redirect to server S2”. In this case, the application filter 302 used the round robin server selection algorithm to select server S2. At step 3, the CAM 316 would look as follows:
The router 300 receives HTTP packets 320′ and 320″ that contain a SRC IP Addr.=e.f.g.h and a DST IP Addr.=1.1.1.1 which means they will match the second dynamic filter 304′ (the second filter checked). The second dynamic filter 304′ has an action field with instruction that redirects the HTTP packets 320′ and 320″ to server S2. At this point, server S1 is servicing traffic stream 310, 310′ and 310″, server S2 is servicing traffic stream 320, 320′ and 320″, and server 3 has not yet been assigned to service a traffic stream.
The router 300 now receives an incoming packet 318 (not a TCP packet) which has a SRC IP Addr.=h.i.j.k. and a DST. IP Addr.=www. MSN.com (2.2.2.2.). The incoming packet 318 does not match the application filter 302 nor does it match anyone of the configured secondary filters 304 and 304′. However, the incoming packet 318 does match the firewall filter 306 which has an action field with instructions to drop the incoming packet 318. As can be seen, the firewall filter 322 (the lowest priority filter) provides a secure firewall.
The application filter 302 is able to select the lightly load servers S1 and S2 which are used by dynamic filters 304 and 304′, because it keeps track of the rate and number of requests (sessions) which are redirected to each server S1, S2 and S3. For instance, the application filter 302 would keep track of the load on each server S1, S2 and S3 by using probe(s) 322 (HTTP probe 328) which communicates with and ascertains the load of the servers 312a, 312b . . . 312n, 314a, 314b . . . 314n. Because, the application filter 302 maintains statistics about the aggregate load per each server S1, S2 and S3, it can make an intelligent decision when selecting the best available/lightly loaded server S1, S2 or S3. This capability is highly desired because if the application filter 302 is not aware that one of the servers 312a, 312b . . . 312n, 314a, 314b . . . 314n has malfunctioned it could redirect new requests to this server which would lead to an unsuccessful connection.
In addition, the application filter 302 could have the functionality to keep track of the total number of requests (sessions) which are currently being redirected to servers S1, S2 and S3. If this is done, then the application filter 302 could use this information to help counter a SYN attack in which a malicious user sends numerous requests (new incoming packets) in an attempt to overload/shutdown the servers S1, S2 and S3. For instance, the application filter 302 could counter a SYN attack by incrementing a counter by “1” every time a new incoming packet 310 (for example) associated with a new session is accepted and a secondary filter 304 (for example) is subsequently created. Once, a threshold is reached, then the application filter 302 upon receiving a new incoming packet will not create a secondary filter but instead it will drop the new incoming packet. This is a desirable feature.
Referring to
From the foregoing, it should be appreciated that the router 300 and method 400 use stateful load balancing filters 302, 304 and 306 located on a dataplane 308 (fastpath 308) to balance loads at servers 312a, 312b . . . 312n. The stateful load balancing filters 302, 304 and 306 improve the performance of the servers 312a, 312b . . . 312n and at the same time provide a firewall functionality. The router 300 and method 400 have many desirable features and advantages several of which have been listed below:
Although one embodiment of the present invention has been illustrated in the accompanying Drawings and described in the foregoing Detailed Description, it should be understood that the invention is not limited to the disclosed embodiment, but is capable of numerous rearrangements, modifications and substitutions without departing from the spirit of the invention as set forth and defined by the following claims.