|
Persistence ("Sticky Connections")
Capabilities |
|
|
|
What are Persistent Connections?
When standard loadbalancing
is done on a server cluster, each incoming network connection is
independent of the other connections and the real server for that
connection can be chosen on the basis of the loadbalancing technique
used at the moment. However, there are many applications that require
connections from the same client to be directed to the same server
either to ensure correct operation and performance.
FTP is one of the applications
that require persistent connections. The client - server data transfer
is done using two connections, one is a control connection (port
21) to exchange command information and the other is a data connection
(usually port 20) that transfers the data.
Another example is connections
using SSL (Secure Socket Layer). When a SSL connection is made a
key for the connection must be chosen and exchanged. Until the SSL
key expires, all consequent connections from the same client are
granted access to the server. If the persistent connections feature
is not enabled new SSL key should be issued for each new connection,
which will hinder the performance of the server and increase server
response time.
Persistence in E-commerce
E-commerce shopping
cart applications also require sticky connections in order to function
properly. For example, let’s say a customer fills a "shopping cart"
of goods at a Web site, and then browses a different part of the
site for some details about his selection before completing the
transaction. Later, when he submits his order, SysMaster may direct
the customer’s request to a different server, that may not know
about the user and his shopping cart. Of course, if all servers
store the user information and their selected goods in a single
back-end database server, this would not be a problem. But if the
site is not designed this way, the specific shopping cart data resides
on just one server. In this case, SysMaster must select the same
server that the user was directed to in the past, in order to seamlessly
process the user’s request.
The Solution
When the persistence
features are enabled, SysMaster records the IP address of the client
and the real server that the client was connected to initially in
a reference table. When a new request comes in from the same client,
the SysMaster cross references its table and when it finds the client's
record, directs the traffic to the original server.
It is easily seen that
keeping persistence for great periods of time is impractical and
resource consuming. That is why loadbalancers use a persistence
timer that limits the extent of the persistence in time. The timer
measures the interval that has passed since there was a connection
from a particular IP address to a specific virtual service. The
time period begins as soon as there are no longer any active connections
between the client and a particular real server. The timer is set
to zero whenever a new connection occurs. If the timer passes the
pre-configured persistence time, new connections from that IP to
the same virtual service may be redirected to another real server.
Loadbalancers use more
memory and need more CPU time to manage persistent connections.
The resource consumption increases as the persistent time grows.
Network administrators should choose the shortest possible time
for the specific applications and should now use sticky connections
for applications that do not need this feature.
SysMaster offers several
persistence methods that allow network administrators to build high-performance
networks for e-commerce.
Source IP/Destination
- The SysMaster directs all connections for a given combination
of Source IP and Destination to the same server. But, if a client
with the same IP connects to a different service (VIP) or application
port, the connections will be loadbalanced to any available server.
This method meets the requirements of most applications that need
persistence connections including applications using SSL connections.
Mega Proxy
Sever Persistence - Big enterprises and ISPs use loadbalancing
across multiple proxy servers to connect to the Internet. In such
cases the same user may be coming to the site from a different proxy
server for each TCP connection. Therefore source IP is not a reliable
indicator of a given user. To address this problem SysMaster can
be configured to treat a range of source IP addresses as a single
IP address, so that all connections from a block of IP addresses
are redirected to one and the same real server for the period of
the persistence timer.
As you can see, persistence
is an important issue when planning and designing your Web site
services. While you need to loadbalance your network traffic to
optimize your site’s Quality of Service, you also may need the ability
to direct traffic to a particular server. SysMaster persistency
features meets this requirements providing flexible and intelligent
loadbalancing solutions that accommodate your network infrastructure
and supports your strategic business applications.
|