netbird
netbird copied to clipboard
external database for self-hosted netbird
Is your feature request related to a problem? Please describe. slow performance for user logins/activity viewing and sqlite locking on larger environments see #1470
Additionally, the events.db file seems to grow quite large very quickly. This could serve to minimize bloat on the docker host. I have only 11 users and 10 peers. The events.db file is already nearly 1GB in size.
Describe the solution you'd like a method to define an externally usable database server in the StoreConfig section postgresql seems like the most viable candidate
additionally a migration tool akin to the one which moves existing data between json and sqlite options
Describe alternatives you've considered mariadb or mysql could be possible solutions as well
Additional context Having an external DB would also simplify backups and migrations of the base docker host.
Yes, I also think so. If there is a good solution, please
I would like to add, that the ability to scale-out the database to a separate host seems like a good capability. I have 370 Users and 141 Groups in my self-hosted instance. Most of them work during the 9-5 hours. The management service struggles to keep up during this time. (The VM has 16 cores and 16GB of RAM and it looks like it will need more RAM soon)
Offloading all the i/o related to the DB would help at least a little in freeing up resources.
I am also happy to report that after the fix in #1470 the db files have not grown huge:
[root@netbird _data]# ls -lah
total 74M
drwxr-xr-x 2 root root 102 Apr 3 15:54 .
drwx-----x 3 root root 19 Dec 22 15:00 ..
-rw-r--r-- 1 root root 2.9M Apr 3 15:46 events.db
-rw-r--r-- 1 root root 60M Mar 1 07:02 GeoLite2-City.mmdb
-rw-r--r-- 1 root root 9.1M Mar 1 07:02 geonames.db
-rw-r--r-- 1 root root 1.5M Apr 3 15:54 store.db