Open janiew opened 5 years ago
This will take a bit of planning.
Up until this point we have not been storing any data exclusively in the database. The database has not been the source of truth. Instead the database has been acting as a cache. The source of truth has been the serverless-apps GitHub repo.
We cannot and should not store things like download counts in the serverless-apps repo.
We have to operate either a Prometheus or Mongo DB instance reliably. This means implementing backups. If we choose Mongo DB this also means running Mongo DB in cluster high availability mode.
The only thing I am worrying about here is the race condition while incrementing the downloads counter
The only thing I am worrying about here is the race condition while incrementing the downloads counter
Prometheus automatically handles this race condition.
Mongo can lock documents, this would handle the race condition.
Which datastore should we use though?
Track how many people have deployed each app through KScout