Find a solution to database size increasing
leo-holanda opened this issue · comments
Until the database hits the free tier limit, its size will increase every time new jobs are inserted by the serverless functions. Then, it should stop working.
It can be said that it makes no significant difference whether saving new jobs in a database or just appending them in a compressed JSON file that is uploaded to R2 and requested by Cloudflare Workers. Because it is very unlikely that the job data will change after the job posting is closed.
To avoid exceeding the database free tier limit, there should be a solution where the jobs are automatically appended to a JSON file that is then saved in R2. There should be specific JSON files for each collection, i.e., webdev, qa, ai, etc. They should be compressed using zip and then decompressed at the client in an effort to increase download speed and, consequently, reduce page load time.