Failover
Capitex Företagslån - User interface
If the users web browser hangs/crashes or the user shut down the PC or the browser without storing the last changes the will be lost right now.
In our pipeline we have a task to solve this by constant store the case to temporary local storage. If the user then restarts the OS or browser the user will get a question if the last case should be recovered. The user can then continue working on that case and store it to the server.
As is right now you need to either setup
a load balancer with sticky sessions that can handle persistant sessions and the abillity to restore sessions in application server to be able to failover the clients and get the client to reconnect to the backend.
or use some header based authentication like http authentication combined with a custom implementation of our XSS-token plugin that uses a second party service for tokens.
Both solutions above is a rather complicated setup so in our roadmap we will provide features in the application so we are not dependant on session restoring in the load balancer or custom XSS-token plugin.
a) When the user try to save/fetch/printout and the backend has restarted you should get information immediately that the backend is restarted and it's not possible to reconnect, right now you will get a timeout after around 30 seconds. The user will be informed that they can continue in off-line mode but to save the case or do printouts they need to close the browser and login/restart, after the restart the user will be asked to recover the case from local storage and can then continue the work.
b) The application should continuously poll the server to check the connection and when it notice that it can't connect we should immediately inform the user that backend is lost. All functions in the user interface that depends on the server-side will be disabled in this off-line-mode. The application will continue polling to check when the backend is up again. When the backend is up the application will tell the user to close the browser and restart the application, after the restart the user will be asked to recover the case from local storage and can then continue the work.
c) Instead of telling the user to manually restart the application the user will be able to get to a login-page and then the user will not have to recover the case just because of the temporarly lost connection. If the user identity provider has support for automatically do a refresh of the credentials using the same security token the login will happen in the background without user interferance.
If the failover happens on server level in for example Hyper-V/vmware the system will continue to work without any problem.
The client is a single page javascript application and the client is delivered to the client ondemand from the service layer.
(Optional on consultancy basis) Integration layer - depends on customer requirements
The integration layer can normally be load balanced for quick failover.
If the integrations is done using a message-que there will just be a delay in the process when Capitex Företagslån buisness/service layer or third party service is temporary down. The message will be left in the que to be able to process it later. If this could fully/easy be done depends on the systems the integration layer is calling (support for rollback etc). If no support for rollback the integration layer could ping all systems the will be involved before the integration layer do anything, if some system is down the message will be left in the que for later processing.
If the integrations is not using any kind of message-que-like solution the integration layer will answer back to the caller with an error message if the Capitex Företagslån buisness/service layer or any involed second or third party system is down and it will be up to the caller layer to handle the problem and make a new call or inform in a log and/or user interface.
We recommend that the Virtual Server image/images is backed up for quick restore of the setup.
Capitex Företagslån - business/service layer
This layer could be load balanced (with sticky sessions) for quick failover for all services that call the Capitex Företagslån - buisness/service layer. (The Capitex Företagslån userinterface need a rather complicated setup to make use of this failover as is right now, see above)
The business/service layer stores only logfiles, all storage of other data is done in the database. There exist some configuration of how and where to do some of the loging and it is possible to do loging to a database or external volume.
We recommend that the Virtual Server image/images is backed up for quick restore of the setup.
Database
The setup is done according to the database provider documentation for most reliable setup with encrypted data, failover and backup.