Skip to content

Rate limiting for scheduling #306

Description

@nhoening

Scheduling is the first operation we should start to rate-limit, as it is most expensive. Foremost, this protects against bad/rogue client implementations.

My suggestion (taking into account the state before Project 6 is implemented:

  • Make a new field on GenericAssets: max-actuation-rate (a timedelta). How often we allow someone to re-compute things for their asset is a business decision I believe, so this is where it belongs.
  • Update the sensor/<id>/schedules/trigger endpoint, so it checks when the last scheduling job happened and if it was too recently, it does not make a new one, or it schedules one into the future (in this option we also need to check if in the future a scheduling job already exists).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions