We think we can remove the external database server dependency from bedrock. Bedrock causes no data to change while it is running. This means that it can use a read-only database. SQLite is quite good and fast even in multi-process environments when it is used read-only. So here's the plan:
When these containers run they will both use the local sqlite database to serve data-driven pages (e.g. release-notes, security advisories, and product-details), and they will keep these data up-to-date using a single cron process.
I have an example of this working now. It is deployed to my demo. I have it pointed to my fork of the release notes data and I have tested updating the data while the website is running and it is refreshed appropriately.
The changes are only currently in my demo branch, but I should have a PR shortly.
/cc @jgmize @bensternthal @metadave @glogiotatidis
I like the idea. How do you plan to monitor the update of the multiple sqlite databases? Using a DMS trigger for each?
@glogiotatidis I've been thinking about that. I've developed a view on the site that will report how long it's been since the last update for all of the update tasks. Each task also has a max time (which is 5 min longer than the task's schedule). If any task is late that view will return 500 and indicate which task is late. We'll then have "k8s liveness probe" check that URL every so often and alert us if they're having problems. This seems to be a good way to go. I don't think the way DMS currently works that it would be manageable to have that many snitches.
I'm happy to go into more detail about how the cron tasks are setup and how the view monitors them. I'm very pleased with how it works. You can also just check out the PR.
Yep, I was thinking the DMS is sub-optimal for this one. I like the liveness probe implementation 馃憤
New PR for this is #5334.
Do the following to do the initial deployment of The SQLitening:
clock process type in all but one cluster (leave on in oregon-b)oregon-b-prod branch which will deploy and test stage and prod in oregon-bclock process type in all but one cluster (leave on in oregon-b)This is now in production 馃帀
Most helpful comment
/cc @jgmize @bensternthal @metadave @glogiotatidis