open-balena-api icon indicating copy to clipboard operation
open-balena-api copied to clipboard

Split metrics from `device` resource

Open fisehara opened this issue 1 year ago • 1 comments

Remodel device resource and split metrics into device metrics record

This reduces the load on the device resource when updating device metrics periodically. device metrics are far less frequently needed than the device resource. Thus writing to the heavily used device resource should be offloaded to the device metrics record resource.

Change-type: major

fisehara avatar Jul 04 '23 09:07 fisehara

@Page- @thgreasi when this is fine I'll follow up with a PR for finalising the async migration and dropping the columns from device resource.

fisehara avatar Jul 06 '23 22:07 fisehara