docs: add future optimization for per-compute node statistics

This commit is contained in:
YueGuobin 2026-03-30 00:23:35 +08:00
parent b379747aeb
commit d64e4e28e3
No known key found for this signature in database

View File

@ -141,3 +141,36 @@ This API is designed for monitoring dashboards that need:
|--------|-------------|
| 401 | Unauthorized - invalid or missing session |
| 500 | Internal server error |
### Future Optimizations
#### Per-Compose Node Statistics
Currently `nodes` are aggregated globally. Future enhancement could add per-compute breakdown:
```json
"nodes": {
"total": 42,
"by_compute": {
"local": {
"total": 30,
"open_project_nodes": 20,
"closed_project_nodes": 10,
"by_type": { "qemu": 20, "docker": 10 }
},
"remote-server-1": {
"total": 12,
"open_project_nodes": 10,
"closed_project_nodes": 2,
"by_type": { "docker": 12 }
}
},
"by_type": { "qemu": 20, "docker": 22 },
"open_project_nodes": 30,
"closed_project_nodes": 12,
"by_type": { "qemu": 20, "docker": 22 },
"by_status": { "started": 25, "stopped": 12, "suspended": 5 }
}
```
This requires tracking which compute each node runs on (Node._compute).