Skip to content

Scalability: move ephemeral state to redis #3642

@knolleary

Description

@knolleary

Part of #2782

Whilst the work under #2782 has removed most in-memory state handling, there are some pieces that are not suitable for managing via the postgres database.

  • API Rate-limiting - state is currently held in memory. The module we use supports connecting to redis out of the box (or a redis-api compatible alternative)
  • Instance/Device inflight state - when an instance/device is transitioning between states, we store some state in memory and some in the database. Need to review what, if anything, would be more suited to holding separately.

Tasks - Phase One

  • Identify what ephemeral state we still have
  • Create 'cache' component in forge app to centralise via API
  • Update forge code to use cache component in place of local in-memory state

Tasks - Phase two

  • Identify what technology to use (redis, or an alternative given recent licensing changes)
  • Add to our helm charts
  • Setup authentication mechanism
  • Update rate-limiting to use redis if configured
  • Review instance/device lifecycle to see if any other state needs moving in

Sub-issues

Metadata

Metadata

Assignees

Labels

size:XL - 8Sizing estimation point

Type

No type

Projects

Status

Review

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions