Skip to content
Git

Scaling Strategy

Hosting on Hetzner, we can scale vertically on the VM level up to 16 cores and 32 GB RAM. However, the primary limiting factor here is disk space (320 GB max).

To have a future-proof setup, we acquired three bare-metal servers (demeter, hades and minerva) through Hetzners Auctions. These will run both Forgejo and its database in a three-node HA setup. The main focus was on being able to have a redundant disk setup of multiple TB of NVME storage. This storage will be used in a Ceph cluster and solely used for the repository data. The repo data is the component that profits most when being stored on a fast NVME drive.

With respect to horizontal scaling of the Forgejo instance: as of today, Forgejo isn’t cluster-ready yet, i.e. Forgejo cannot be run in HA-mode out of the box. It can be achieved when turning off certain tasks that should only executed once by the implicit leader instance, e.g. cron-based maintenance tasks or other tasks involving write operations.

To reach “full” HA, the Forgejo dependencies such as database, caching layer and code search must also be available in HA mode. Right now, caching and code search aren’t HA-ready yet in our setup. We are actively working on improving the HA capabilities of Forgejo step by step.