How To Set Up an SFTP Active-Passive Cluster | JSCAPE
Learn how to set up an SFTP active-passive cluster online at JSCAPE! This tutorial will show you how to set up a failover server for your SFTP server.
Overview
In this quick tutorial, you'll discover an easy way to set up a failover server for your SFTP server and in turn build an SFTP active-passive high availability cluster.
What we're trying to achieve
Why you need a SFTP failover server
Your primary SFTP server can experience planned or unplanned downtimes. This might be caused by a scheduled maintenance or an outright failure. While that server is down, all business operations that rely on it will also have to come to a halt. In many situations, such downtimes, especially if they stretch over extended periods, are simply unacceptable.
A failover SFTP server serves as a backup that you can quickly activate if your primary server goes down. If you have one, you can reduce your downtimes to just a couple of minutes.
An active SFTP server coupled with a passive (failover) server is usually known as a SFTP active-passive high availability cluster. Let's now go through the steps of setting one up using two instances of JSCAPE MFT Server. JSCAPE MFT SERVER is a highly secure, automated managed file transfer server that supports SFTP as well as several other file transfer protocols.
Prefer to watch a video version of this article instead?
Settings on your primary SFTP server
In the latest version of JSCAPE MFT Server, active-passive SFTP high availability clustering has been made so much easier. All you have to do is point both your primary and failover server to the same global datastore.
Here's what you need to do on your primary server.
Go to Settings > Datastore.
Now, enter the JDBC URL of the external database that serves as your server's global datastore. This global datastore can be any RDBMS database. In preparing for this tutorial, we just created an empty database on MySQL (no tables) and added an administrative user for it.
In our example, the JDBC URL is: jdbc:mysql://172.31.47.129/jscape_ha
and the username of our database user is: jscapeadmin
We also enter that user's corresponding password.
After entering those basic information, we then click the "Create DB" button. This will create the database schema on the empty database.
If everything goes well, you should see a message box indicating that the "Database created successfully".
You can double-check the database on your RDBMS to verify whether the tables were really created.
Click the Apply button to finalize/commit those settings.
After you click "Apply", you'll be asked whether you want MFT Server to copy existing configuration data from the embedded H2 database to the newly created database (in our case, on MySQL). Click Yes.
You'll then be logged out. Log back in and double-check the Datastore module to verify if the changes were indeed applied. That's it. Now we move on to the failover server. Yes. That's all you had to do on the primary server side. But it's even much easier on your failover server.
Settings on your failover SFTP server
Navigate to the same page on your failover server (i.e. Settings > Datastore).
Enter exactly the same JDBC URL and database user login credentials as the ones you entered on the primary server and then click Apply.
This time, when you're prompted whether to copy existing configuration data, click NO (Remember, in the primary server, we clicked 'YES'). So, instead of copying configuration data from this MFT Server's H2 database to the MySQL database, this MFT Server instance will acquire config data from the MySQL database.
Once again, you'll be logged out. Simply log back in if you want to check to see if your settings were indeed changed and now share the same settings as your your primary server.
Because this is a failover server, you don't want it to be receiving file upload/download requests or performing any automated processes while your primary server is up. So, simply stop this MFT Server service.
That's it! From this point onwards, all configuration changes you make on your primary SFTP server will be stored in the remote RDBMS and then automatically applied to your failover SFTP server as soon as that server is restarted.
If you want to try this out yourself, download a free, fully-functional evaluation edition of JSCAPE MFT Server now.
In case you want to know how to set up a SFTP server on JSCAPE MFT Server, read the post "Setting Up An SFTP Server" (It's much easier than the usual way).
Other Related posts
Active-Active vs Active-Passive High Availability Cluster
Comparing Load Balancing Algorithms
How To Install A SFTP Server on Windows
How To Set Up A HTTPS File Transfer
How To Set Up a Server To Server File Transfer
10 Ways to Make a Server to Server File Transfer Fit Enterprise Use