Open
Description
Is your feature request related to a problem? Please describe.
Today, you have to reload Cerberus to update data about services from database to make it available.
Describe the solution you'd like
It would be nicer to be able to :
- Every time the leader node does its routine, check up what's new in the database and add or update it in Redis (Note in additional context)
- When a route is asked, check in memory (in
/proxy/services.go#services
), if it is: serve - If not in memory, check in Redis
- If in Redis :
- Add it in memory (Note in additional context)
- Return to number 2
- If not in Redis : 404 not found
- If in Redis :
Additional context
Database : Implies updatedAt
lastChecked
in MySQL ans check which one is bigger in go
Mutex : to prevent weird behaviour in case of simultaneous writing, prevent with a mutex concurrent writings in /proxy/services.go#services
Also possible in the future : It will be possible to bypass memory and only rely on Redis for services