The metrics calculation service is responsible for managing our duckdb backed cluster for metrics calculation. This makes it so that the sqlmesh code doesn’t directly instantiate the cluster from the multiple threads of execution
Notes
For now we will do things with polling for asynchronous things as there aren’t many consumers of the service
Endpoints
GET /status
Simple liveness endpoint
Params
N/A
Returns
200
This will mean the service has started
POST /cluster/start
Idempotent request to ensure the cluster is started.
Params
min_size - cluster minimum size
max_size - cluster maximum size
Returns
200
GET /cluster/status
Gets the current status
Params
N/A
Returns
200
isReady: bool - True if the cluster is ready to operate
What is it?
The metrics calculation service is responsible for managing our duckdb backed cluster for metrics calculation. This makes it so that the sqlmesh code doesn’t directly instantiate the cluster from the multiple threads of execution
Notes
Endpoints
/status
/cluster/start
/cluster/status
/job/submit
/job/status