Client Documentation

Start Page 4. Usage and operation instructions 4.2. Parallel Transfers

4.2. Parallel Transfers

Note

This feature is only available for Unix and Linux operating system.

SFTPPlus Client is a single threaded application, all transfers being scheduled and executed in a single sequential queue.

This simple mechanism assure a constant usage of CPU or network resources, which is independent of the number of configured transfers.

In the same time, the simple single execution queue avoid any conflicts that might be generated while processing the same files from multiple transfers and does not generate any race conditions.

When transfers are required to run in parallel, multiple instances of SFTPPlus Client can be launched from the same machine.

Multiple SFTPPlus Clients can share the same installation folder, but they require different configuration files, startup scripts and separate working folders.

4.2.1. Configuration files

The first thing required to run a parallel SFTPPlus Client is to create a new dedicated global configuration file.

To create a new global configuration file for the new parallel SFTPPlus Client instance, copy the default global.conf file and save it under a different name.

In the following example, we use /SFTPPlus-client/parallel/global.conf as the new global configuration file.

The following configuration options needs to be amended to point to the new dedicated working folders:

/* Working directories */
global.tmpdir = '/SFTPPlus-client/parallel/' || 'tmp' || sepchar
global.inbox = '/SFTPPlus-client/parallel/' || 'inbox' || sepchar
global.outbox = '/SFTPPlus-client/parallel/' || 'outbox' || sepchar
global.archive = '/SFTPPlus-client/parallel/' || 'archive' || sepchar
global.response = '/SFTPPlus-client/parallel/' || 'response' || sepchar
global.conf = '/SFTPPlus-client/parallel/' || 'conf' || sepchar
global.retrydir = '/SFTPPlus-client/parallel/' || 'retry' || sepchar
global.faildir = '/SFTPPlus-client/parallel/' || 'failed' || sepchar

/* Dedicated log file */
message.logfile = '/SFTPPlus-client/parallel/message.log'

Transfer configuration files for this new SFTPPlus Client instance are placed in /SFTPPlus-client/parallel/conf folder. All transfers configured for this folder are executed in a sequential order, but are run in parallel with transfers from other SFTPPlus Clients instances running on the same machine.

A separate log file is required for the parallel SFTPPlus Client instance to avoid conflicts that might be created while writing the same file from 2 separate instances.

You can still use absolute path for inbox folder in transfer configuration files, by using the following configuration for global.inbox

global.inbox = '/''

4.2.2. Working folders

A separate set of working folders is specified in the dedicated global configuration file, as discussed in the the previous section.

The dedicated working folders needs to be manually created before staring the new SFTPPlus Client instance.

4.2.3. Startup Script

The startup scripts for parallel clients needs to be configured to point to different global configuration file.

To create a startup script for a new parallel SFTPPlus Client instance, copy the default rc.SFTPPlus init script and save it under a different name.

In the following example, the startup script dedicated for a new parallel SFTPPlus Client is called rc.SFTPPlus-parallel.

In the startup script, replace the following line:

GLOBAL_CONFIGURATION='global.conf'

with the full path to the global configuration file dedicated for this new instance:

GLOBAL_CONFIGURATION='/SFTPPlus-client/parallel/global.conf'

You can then use the rc.SFTPPlus-parallel init script by calling the start and stop commands.