Maintaining Session Information

Upon initialization, the data component creates and initializes a session (flow) lookup table in the object cache.

The table is defined in the file equilibrium-data_packet.c, as hashtable_t * sessions_table. It is initialized in the function init_packet_loops(), which is called at the end of the function equilibrium_init().

The hashtable is used for load balancing and session aging (flow aging since the last-observed traffic.) Aging, which is done in the aging_cleanup() function, removes entries from the table, whereas the function process_packet() adds entries. The application also looks up forwarding information for flows in the table.

It is important to configure the largest possible size for object-cache to handle this table. For more information on configuring the application, see Configuring the Application.

The size of the table supported is also important for performance, and the recommended size will depend on future testing results; this example sets the size to store half a million flow hashes.

For this application, a flow hash is the output of a hash function whose input is the source and destination addresses. The hash function output can be thought of as a number of bits, commonly measured in the width. The wider the output of the hash function is, the larger the table must be, since the table will map (index) a hash output to a table entry. In this table, an entry can contain information for multiple existing flows or session entries.

There is a tradeoff between the table size and the speed of a lookup. A larger table (and hash output) has fewer collisions because the hash function has a wider input than output. When a collision happens, more than one flow's information is in a list attached to each table entry. Searching this list for an exact match takes extra time, and the lists can be expected to be shorter when the size of the lookup table is larger.

2007-2009 Juniper Networks, Inc. All rights reserved. The information contained herein is confidential information of Juniper Networks, Inc., and may not be used, disclosed, distributed, modified, or copied without the prior written consent of Juniper Networks, Inc. in an express license. This information is subject to change by Juniper Networks, Inc. Juniper Networks, the Juniper Networks logo, and JUNOS are registered trademarks of Juniper Networks, Inc. in the United States and other countries. All other trademarks, service marks, registered trademarks, or registered service marks are the property of their respective owners.
Generated on Sun May 30 20:26:47 2010 for Juniper Networks Partner Solution Development Platform JUNOS SDK 10.2R1 by Doxygen 1.4.5