Live data from Hacker News

Running SQLite Apps on Docker and Kubernetes with Litestream

openrun.dev

1–10 of 17 posts

Re: Running SQLite Apps on Docker and Kubernetes with Litestream

#2
Built-in Litestream replication and automatic restore is a new feature I added in OpenRun (a self-hosted deployment platform for web apps). Apps can use SQLite with zero code changes while OpenRun handles backup/recovery. This works on a single node with Docker/Podman and also on Kubernetes.

Re: Running SQLite Apps on Docker and Kubernetes with Litestream

#6

I use the same stack to run my apps! sqlite as Database backen on ephemeral pods. On initialisation, the pod restores the current litestream backup from object storage. No persistent volumes needed. No issues so far.

Without persistent volumes, every deployment of the app may require the SQLite data to be restored from S3, which can take time if database size is large. With PVC, regular app deployments use existing database, only a disaster recovery scenario restores from S3.

Yes, it feels magical to just recreate your namespace or even create a new K8s cluster and see all your apps (from OpenRun metadata) and app data restored automatically.

Re: Running SQLite Apps on Docker and Kubernetes with Litestream

#8
post #6

I use the same stack to run my apps! sqlite as Database backen on ephemeral pods. On initialisation, the pod restores the current litestream backup from object storage. No persistent volumes needed. No issues so far.

Without persistent volumes, every deployment of the app may require the SQLite data to be restored from S3, which can take time if database size is large. With PVC, regular app deployments use existing database, only a disaster recovery scenario restores from S3. Yes, it feels magical to just recreate your namespace or even create a new K8s cluster and see all your apps (from OpenRun metadata) and app data restored a…

I have no use case where I store a TB of data in a sqlite let alone few GB. Currently this checks out and restore is few seconds.

Re: Running SQLite Apps on Docker and Kubernetes with Litestream

#9

[flagged]

On Kubernetes, for apps using SQLite, maxReplicas is set to 1 and OpenRun uses the Recreate update strategy. This ensures at most one pod is active (requests are queued until the new pod is healthy). There should never be more than one pod accessing the SQLite database.

Re: Running SQLite Apps on Docker and Kubernetes with Litestream

#10
post #7

[flagged]

Do you have a particular issue with... the company that wrote this post, their choice of DB, decisions made in Litestream, SQLite, etc.?

Not a company :-) OpenRun has been a passion project I have been building for last three years, trying to make declarative deployments easier
Post reply on HN