Skip to main content

Automated maintenance

Concept

Spider includes some automated maintenance jobs that are scheduled and run automatically to tend to the system behavior.

List of jobs

JobDescriptionPeriodicity
forceMergeJobPerforms a forcemerge action to some indices that have low cardinality and high update frequency.Each 45 min
purgeJobRemoves useless data from the system.Each day
backupJobBackup active configuration to be able to restore it in case of big outage, or for a redeployment of Spider.Each day
cleanWhisperersJobRemoves deleted whisperers from Teams and Customers resources.Each day

Execution

These jobs are run by the maintenance service, at start and after the configured delay.

The configuration of jobs is made through standard system configuration and may be overridden by adding extraConfiguration key in the service part of the values.yaml file.

The default configuration is listed here: Maintenance.

Details

Force merge job

Some indices are storing data that is updated too frequently for Elasticsearch to perform its segment merges.
This slows down searches on these data.

To cope with this, Spider performs regular forcemerge action on the following indices:

IndexContent
spider-active-hosts-streamingStores the hosts resolution (IP -> Name) sent by Whisperers. Records might be updated every min.
spider-whisp-statusStores the Whisperers status. Records are updated every 20s.
spider-sessionStores the user sessions. Records are updated every few minutes.

Purge job

Some deleted or stale data stay in the system for auditability or recovery.
This job removes them after a while.

DataIndexCondition
Usersspider-customersUser deleted more than 6 month ago
Whisperersspider-whispWhisperers deleted more than 6 months ago
Whisperers statusspider-whisp-statusWhen modified more than 1d ago
Controllersspider-controllersControllers deleted more than 6 months ago
Attachmentsspider-attachmentsAttachments ended more than 6 months ago
Linksspider-linksLinks created more than 3 months ago

Backup job

Configuration data is backed up to a S3 compatible storage in case of disaster, or to reload the configuration in a new deployment of Spider.

DataIndexCondition
Usersspider-customersACTIVE customers
Users UI settingsspider-guisettings-
Whisperersspider-whispACTIVE whisperers
Teamsspider-teamsACTIVE teams
Controllersspider-controllersACTIVE controllers
Attachmentsspider-attachmentsATTACHED attachments

Clean Whisperers job

This job:

  1. Loops on all teams and users
  2. Removes from their whisperers list
    • Whisperers deleted more than 1 week ago
    • Whisperers that have been purged
  3. Updates the teams and users

This job will trigger emails when it is updating teams to inform administrators that the whisperers have been deleted.
In the editor field, the user maintenance is provided for auditability.
Logs are provided to explicitly list the changes performed.