#1343: Is it possible to configure Swarmica system with separate instances?
Отредактирована: сегодняQuestion
Is it possible to configure the system with separate instances for the postgresql, redis, backend-frontend services?
Answer
Such a configuration is not recommended.
Normally, we test and support a scheme where the database is on the same server, and backup is done at the level of the entire virtual machine. In this case, the recovery time is equal to the time required to restore the virtual disk backup, and the depth of lost data is the time from the date of backup creation to the recovery time.
If you theoretically move the database server to an external cluster at your own risk and configure the application to connect to this cluster, then:
- This scheme is not tested in a standard configuration, so there may be unexpected issues that will be difficult to resolve.
- In the event of a disaster recovery scenario, there is a risk, albeit minimal, that the application code in the containers and the database version will differ. Especially if the data on the database side is restored separately in case of failure. Then it is difficult to predict the behavior of the application - whether it will be able to start up and correctly run all migrations or not.
- In case of a breakdown, database backup does not solve the problem of restoring user data that is stored in Docker volumes swarmica_ugc, swarmica_uploads, swarmica_runtime, swarmica_cron_d. In theory, you can mount them as network drives, but then there will be a delay in reading and writing these files based on network latency, which will negatively affect the speed of the web interface.
Summary: instead of increasing performance and fault tolerance, this will result in network delay and performance degradation.
As practice shows, it is much more reliable to install Swarmica on a single virtual machine with sufficient capacity, which is easy to back up, restore in case of an incident, and easy to administer and update.