Scaling ExApps
AppAPI delegates the scaling task to the ExApp itself. This means that the ExApp must be designed to scale vertically. For horizontal scaling, we recommend using Kubernetes.
You could also implement, for example, a Server-Worker architecture for basic scaling. In this case, the Server is your ExApp and the Workers are the external machines that can work with the ExApp using Nextcloud user authentication. Additional clients (or workers) can be (optionally) added (or attached) to the ExApp to increase the capacity and performance.
The rest of this section will explain how to setup and use Kubernetes for automated scaling. Additional instructions are also provided if you have a GPU device for GPU scaling.
- Setting up Kubernetes
- Prerequisites
- Architecture overview
- 0. Environment variables (optional)
- 1. Create the kind Cluster
- 2. Create Namespace and RBAC
- 3. Configure the nginx Proxy
- 4. Build and Deploy HaRP
- 5. Register the k8s Deploy Daemon in Nextcloud
- 6. Run Test Deploy
- Cluster Overview
- Monitoring Commands
- Troubleshooting
- Autoscaling with KEDA
- Emulating AppAPI
- Prerequisites
- 0. Environment variables
- 1. Check if ExApp is present (k8s deployment exists)
- 2. Create ExApp (PVC + Deployment with replicas=0)
- 3. Start ExApp (scale replicas to 1)
- 4. Wait for ExApp to become Ready
- 5. Expose + register in HaRP
- 6. Extract exposed host/port for follow-up tests (requires
jq) - 7. Check
/heartbeatvia HaRP routing (AppAPI-style direct routing headers) - 8. Stop and remove (API-based cleanup)
- Useful
kubectlcommands (debug / manual cleanup)