To process commands, the API requires two properly formatted files sent to the server in a specific order—first the Data File and then the blank Signal File. If everything is properly defined and uploaded in the correct order, the service will process the commands in the Data File.
After the server has processed the files, both the data and signal files are deleted. If requested, an email message will be sent when processing is complete. Since communication with the FTP or SFTP server is one-way, there are no return values other than the requested confirmation email.
The FTP API is designed as a batch tool that procesess files containing several commands. Sending many single command files to the API server can interrupt other processes on the system. The FTP APIs are optimized for batch processing as opposed to individual file processing.
Batch files are also faster than single command files because:
- The server does not spend time looking for and loading new files. The processor sleeps for a bit between reading files—after processing the notification email, it prepares to read the next data file.
- Some information is cached to make it quicker to save to the database. With a larger file, this occurs once and can be reused several times, whereas with many smaller files, the cache must be flushed and then read again for every file.
In some cases, you may still need to split a single file into several smaller files. This is generally only an issue when you have several hundred thousand commands, such as a file to import one million subscriptions. This file would include at least one million subscribe commands. By splitting this into four files, you have some control over when each piece of the import will kick off, and support can stop one or more files from being picked up if you need to make a change instead of waiting for all one million commands to complete.
In addition, you may want to split commands of different types into separate files. For example, if you need to delete some contacts, add other contacts, and send campaigns, you may wish to create three separate files: one to delete the Contact records, one to subscribe addresses, and one to send the campaigns.
There is no way to stop an FTP process without stopping all FTP processes on the server. This affects all customers on the service. Please be sure you are only uploading files that you want processed.