Currently, we expire stale ComputeServiceRegistrations via the heartbeat_computeservice compute API endpoint. This works, but it is largely unnecessary, and so may result in unnecessary load on the database. Every time a ComputeService instance issues a heartbeat update, it runs this function.
Instead, we could create a PeriodicsService responsible for running functions such as this that operate on a fixed schedule. This would avoid potential load problems, and make the heartbeat_computeservice endpoint do only the one thing it should.
Currently, we expire stale
ComputeServiceRegistrations via theheartbeat_computeservicecompute API endpoint. This works, but it is largely unnecessary, and so may result in unnecessary load on the database. Every time aComputeServiceinstance issues a heartbeat update, it runs this function.Instead, we could create a
PeriodicsServiceresponsible for running functions such as this that operate on a fixed schedule. This would avoid potential load problems, and make theheartbeat_computeserviceendpoint do only the one thing it should.