8.9. FTP Latency Optimization

There is not really FTP latency optimization happening, the only reason it gets intercepted and processed is to get the FTP Data channel statistics correct and to get the synchronization between the data channel and command channel correctly.

8.9.1. How it works

In the lifetime of the FTP Command Channel, the Steelhead appliance checks for the PORT commands to see which TCP sessions are used for the FTP Data Channel. Once known, the server-side Steelhead appliance (for active FTP) or the client-side Steelhead appliance (for passive FTP) will setup a hidden fixed target in-path rule so that the traffic goes through the two Steelhead appliances and gets identified as FTP Data traffic.

From RiOS version 6.1 this hidden in-path rule does not get created by default anymore.

8.9.2. Data channel and command channel synchronization

According to FTP standard, the transfer of a file goes as follows:

  • The client sends a PORT command over the command channel which informs the server to which IP address and TCP port it should connect to.

  • The server sets up a TCP session for the data channel, transfers the data over it and closes the data channel.

  • The server sends a 226 response code, which means that the file has been transferred.

  • The client knows now that the whole file has been transferred.

With a Steelhead appliance in between, the server-side Steelhead appliance might still be encoding the data from the server when the server closes the data channel and sends the 226 response code to the client. That early 226 response code might confuse the client and makes it close the data channel while it is still receiving the data.

8.9.3. Where things can go wrong

8.9.3.1. FTP Data Channel not recognized as such

If Enhanced Auto Discovery is not enabled and there are multiple Steelhead appliances in a serial deployment at the FTP server side, it is possible that the Steelhead appliance with the termination of the optimized FTP Data channel is not the one which terminates the optimized FTP Command channel. That will prevent the traffic statistics to be correctly identified as FTP data.

Figure 8.36. FTP Data reported as unknown protocols

!! Graphics file XXX.png not found
XXX Lots of unknown data which should have been FTP Data