Graham Jenson
1 min readJul 17, 2023

--

Hey, cheers for the response and the development of LiteFS and LiteStream.

The code was simple, basically just

http.HandleFunc("/insert", func(w http.ResponseWriter, r *http.Request) {

res, err := db.Exec("INSERT INTO testtable(a, b, c) values(?,?,?)", "v1", "v2", "v3")

checkErr(err)

id, err := res.LastInsertId()

checkErr(err)

fmt.Fprintf(w, "%v", id)

})

The goal was not an exhaustive benchmark, more just to get something running and then try out LiteFS and see it working. I was looking at it from a perspective of backing up the DB, but since simplicity is my main goal (ATM) I will probably just backup to s3 once per day. Given I don't need code changes to use LiteFS and the new LiteFSCloud backup solution looks awesome, I may end up going that way, if needed :)

I think the ephemeral and persistent storage being equal was just because I am in New Zealand querying a host in Sydney. That is why I figure somewhere between me and fly.io there is a bottleneck limiting my throughput. The fact I can get 200+ writes per second is awesome and already well above what I needed.

Cheers for the work, looking forward to seeing what is coming next. I will be posting more about what I am doing with SQLite and Fly.io, it is really the perfect solution to my problem!

--

--

Graham Jenson
Graham Jenson

Written by Graham Jenson

New Zealand Programmer, Dad, DevOps, Data, Scale Everything

No responses yet