PowerScale OneFS: How SmartConnect Connection Policies Distribute Client Connections
Summary: How SmartConnect connection policies distribute client connections.
Instructions
Introduction
There are four OneFS SmartConnect connection policies:
- Round-robin
- Connection count
- Network throughput
- CPU usage
This article describes how each of the SmartConnect connection policies works so you can decide which one best suits your workflow.
The round-robin connection policy is recommended, unless there is a specific reason to use another policy. The other policies are better suited to environments in which those particular measurements (connection count, network throughput, or CPU usage) are constant and there are not great variations in usage within the five-second intervals described in each section below.
If the connections on your cluster do not look balanced in the way that you expect, you might have selected a policy that is not suited to your workflow.
If you are unsure which policy to use, start with round-robin.
For more information about client-connection balancing policies, see the OneFS administration guide for your version of OneFS.
Connection policies and how they work
Round-robin
Round-robin is the default policy. If the cluster does not have an active SmartConnect Advanced license, round-robin is the only connection policy available.
The round-robin policy assigns connections to the next available node on a rotating basis. This does not mean that all nodes always have the same number of connections. The policy does not "load balance" connections among the nodes. For example, if a node reboots for some reason, all the connections to that node are divided up among the remaining nodes. When the down node comes back online, it starts with zero connections. As new connection requests come in, they are distributed per the round-robin policy, which means that that node has fewer connections than the other nodes. This is why you might see nodes with unevenly balanced connections with this policy.
It is recommended that the round-robin connection policy be used for systems in which all clients connect simultaneously.
Connection count
The connection count policy determines the total number of established TCP connections on each available node to balance client connections across the cluster. The policy counts the number of TCP connections to a node that are in the ESTABLISHED state. The policy excludes internal (InfiniBand) connections from the connection count.
The number of connections is evaluated once every 10 seconds and a history of 1 minute is used to average out the results.
Network throughput
The network throughput policy adds up all the bytes in and bytes out from all external interfaces on a node, compares this value across the cluster, and chooses the node with the lowest throughput to give the connection to.
The values collected by the policy are cached for five seconds. Every connection request within the five-second period is routed to the same IP address.
CPU usage
The system calculates the average percentage CPU usage on each available node at five-second intervals. For each five-second interval, the system assigns all incoming connections to the node with the lowest CPU percentage usage.
The values collected by the policy are cached for five seconds. Every connection request within the five-second period is routed to the same IP address.