OPERATION & MAINTENANCE

Configuration - Performance optimization

As a general remark, we highly recommend using an SSD for storing files and databases. Fiona 8 accesses the filesystem very frequently. Fast disks are essential for good performance.

Background job workers

Fiona 8 performs several tasks asynchronously, e.g. working copy creation or publishing. These tasks are handled by Fiona 8’s background_worker service. To ensure that background tasks are executed in a timely manner, the amount of background workers should be configured depending on their usage in the docker-compose.yml configuration file:

x-background-worker-count: &background-worker-count 2

As a rule of thumb, you can set the worker count to 
max_working_copy_count / 20 + 1.

Web workers

The default configuration of Fiona 8 is quite conservative regarding the use of system resources. It probably won't use all of the available CPU cores and memory. For improving this situation, we recommend to tweak those settings in your docker-compose.yml. The defaults are as follows:

MEMORY: 1024
WEB_CONCURRENCY: 1
RAILS_MAX_THREADS: 5  

These are configuration parameters of the backend container hosting the Rails web workers. Web workers are managed by a Puma webserver in the same container. All of these settings control how the Puma webserver behaves in terms of system resources. Change them gradually and closely monitor your system's behavior.

MEMORY denotes the maximum allowed memory consumption of a single puma process. This value only needs to be changed if a Fiona 8 web worker regularly consumes more than this amount of memory.

WEB_CONCURRENY is the number of Rails processes that Puma forks off for handling requests. Increase this number to use more of the available CPU cores and memory.

RAILS_MAX_THREADS is the number of threads a single Rails process uses for handling requests. Increasing this number won't increase the number of used cores but can improve concurrency within a process.

Monitoring

We recommend to integrate the Fiona 8 monitoring tasks into your existing monitoring solution, e.g. Nagios. The following aspects should be taken care of:

Overall health

$ sudo docker-compose ps → all services should be “Up”
$ sudo docker-compose logs → scan logs for error/fail/exception

Backend

$ curl -X GET http://localhost:8080/health_check → should respond with HTTP code 200

Minio

$ curl -X GET http://localhost:9000/minio/health/live → HTTP 200

CREATING BACKUPS

For a complete backup of your Fiona 8 content, please perform the following individual backup steps in this particular order:

MariaDB/MySQL

$ mysqldump -h127.0.0.1 -uroot -p fiona8db > backup-fiona8db.sql

Minio

$ mc config host add fiona8 http://localhost:9000 $YOUR_MINIO_ACCESS_KEY $YOUR_MINIO_SECRET_KEY --api S3v4
$ mc mirror fiona8/fiona8-blobs backup-minio-fiona8-blobs
$ mc mirror fiona8/fiona8-dicts backup-minio-fiona8-dicts

See the Minio docs for details.

Elasticsearch

See the Elasticsearch docs on how to make a snapshot.

RESTORING BACKUPS

MariaDB/MySQL

$ mysql -h127.0.0.1 -uroot -p fiona8db < backup-fiona8db.sql

Minio

$ mc config host add fiona8 http://localhost:9000 $YOUR_MINIO_ACCESS_KEY $YOUR_MINIO_SECRET_KEY --api S3v4
$ mc mirror backup-minio-fiona8-blobs fiona8/fiona8-blobs
$ mc mirror backup-minio-fiona8-dicts fiona8/fiona8-dicts

See the Minio docs for details.

Elasticsearch

See the Elasticsearch docs on how to restore a snapshot.