High Availability with S-Filer Portal
Who this guide is for
This article helps S-Filer Portal administrators set up a high availability deployment of S-Filer Portal. It requires in-depth knowledge of the S-Filer Portal solution and its components.
General concepts
To make high availability of S-Filer Portal possible, several changes were made to the solution over the latest versions:
- Authentication sessions shared between S-Filer servers (new in version 4.20.0)
- Authenticated user sessions are now kept in the database instead of in the memory of a single server. Previously, an authentication token was only recognized by the server that issued it, which prevented the use of two servers at the same time. Several servers can now run at the same time, and the same token can be used with any of them.
- The servers use the same configuration instance, so their configuration is identical. In particular, the firewall rules must allow the connections of every server, because any of them can establish connections. Also, if "native" extensions using files on disk are deployed, these files must be identical on every server. If the storage is on a NAS or SAN, the same storage must be reachable from every server.
- S-Filer has no built-in mechanism to balance the load between servers: an S-Filer gateway connects to a single server URL. Use an infrastructure solution such as a load balancer that exposes a virtual IP and balances the load between the servers. In this configuration, the S-Filer gateways use the virtual IP to communicate with the server.
- File storage in the cloud (new in version 4.19.0)
- The solution can keep files in Amazon S3 or Azure Blob Storage. This type of storage is highly available and can easily be shared between several servers. See the Cloud Storage Configuration Guide.
- Upgrades without a service outage (starting with the upgrade to version 4.21.0)
- The new behaviours of a version stay inactive until the version flag of that version is enabled. Nodes running the previous version and nodes running the new version can therefore coexist during the deployment. See Version flags.
- First, the database schema is updated while the servers and gateways keep running the previous version.
- Then the nodes are upgraded one at a time. A client connected to a gateway being upgraded loses its connection, but can reconnect immediately through another gateway.
- Finally, once every node runs the new version, the version flag is enabled.
- WARNING: The nodes still running the previous version must be on the latest available version of that line (for example, the latest 4.20.x version for an upgrade to 4.21.0). OKIOK does not guarantee compatibility between non-consecutive versions: an upgrade that skips a version (for example, from 4.20.x to 4.22.0) cannot be done without a service outage. The detailed procedure is described in Upgrading to 4.21.0.
- Email notification customization in the interface (new in version 4.20.0)
- Previously, the content of email notifications was kept in files on disk and was difficult to modify.
- The content of the notifications is now edited directly in the web interface and kept in the database, which is shared by all the servers. This makes it easier to deploy new email templates on several servers at the same time.
- WARNING: The web interface is not yet fully highly available. Use a session affinity mechanism (sticky sessions) so that a user is always directed to the same web gateway for the whole session.
Enabling a new version of S-Filer Portal in a cluster
Each new version of S-Filer Portal is made available through the different distribution channels:
- AWS, for the new Docker images;
- GCP, for the Debian packages;
- S-Filer Portal Distribution, for all the installation files (including the lightweight distributions).
To enable a new version of S-Filer Portal in a cluster, follow these steps:
- Update the database schema with the update-db-schema command.
- Deploy the new version on every machine of the cluster.
- Enable the version flag of the new version (for example Version 4.21) in the Administrative Console.
Important
Make sure that every machine of the cluster is up to date before enabling the new version of S-Filer Portal.
Deploying in a virtual machine environment
The environment described here is a virtual machine environment made of several gateway / server pairs. Follow these steps to upgrade all the pairs of the cluster:
- Update the database schema with the update-db-schema command.
- Take a first gateway / server pair out of the cluster and stop it to upgrade it. During this step, incoming requests must not be directed to the gateway being upgraded.
- Upgrade the gateway and the server using the upgrade method that matches your infrastructure (installer, MSI, Debian package, Docker, etc.).
- Restart the gateway and the server, then put them back into service in the cluster.
- Repeat steps 2 to 4 for each of the other gateway / server pairs of the cluster.
Upgrade every gateway and every server of the cluster before enabling the new features of the new version of S-Filer Portal.
