InfluxDB is easy to install and use for development in the production environment. It is typically a user faced, business-critical enterprise environment. This can be very different from a lower environment such as development. Some important factors to consider are high availability, fault tolerance, recovery, security, performance, and so on to make InfluxDB production ready:
- High Availability: InfluxDB supports a high availability cluster, which can be reliably utilized with a minimum amount of downtime. Each instance will have a data node and a meta node. The meta node contains system information, while the data node contains actual data. Data can be replicated and distributed across networks to achieve high availability.
- Backups: Backup is critical for almost every production database. InfluxDB has the ability to snapshot an instance at a point-in-time and restore it, all backups are full backups. Once a backup is taken, it is important to verify your backups regularly.
- Security: Many known attacks are possible only once the physical access to a machine has been acquired.
For this reason, it is best to separate the application server and the database server on different machines. If it has to be in the same machine, you must make sure to execute remote commands via an application server, otherwise, an attacker may be able to harm your database even without permissions. For this reason, always enable authentication password protect for your InfluxDB instance to keep any unauthorized individuals from accessing your data.
Manage users and their permissions and restrict access by creating individual users and assigning them relevant read and/or write permissions. InfluxDB has three levels of user permission, cluster admin, database admin, and database user. Based on user entitlement, some users may only read data, while some users can read and write.
Cluster admin is the highest permission role among all of the roles. In this role admin can add or remove database admin and users, grant or invoke user permissions, and kill a query process in that database. Cluster admin also has the privilege to create, alert, delete and drop database and measurement.
Always enable HTTPS in production to secure the communication between clients and the InfluxDB server. It is highly recommend to close port 8088 for remote backups and restore it in the production environment. Provide the remote machine with a specific permission to perform a remote backup.