Storing BLOB data

25 views
Skip to first unread message

Mustafa Çelik

unread,
Oct 28, 2022, 6:53:18 PM10/28/22
to rqlite
Hi,
I want to store files in the database as BLOB but obviously I can't do it with single HTTP request; my file is around 10MB. Do you have any idea how I can send a file via HTTP to the rqlite?
Thank you

Philip O'Toole

unread,
Oct 28, 2022, 10:00:14 PM10/28/22
to rql...@googlegroups.com
Why can't you "obviously" do it? I agree it would be a very large POST, but I want to understand what exact problem you're trying to solve. Can you explain more?

--
You received this message because you are subscribed to the Google Groups "rqlite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rqlite+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rqlite/908223c2-ad58-47d5-8ad5-915c044192c1n%40googlegroups.com.

Mustafa Çelik

unread,
Oct 29, 2022, 3:22:38 PM10/29/22
to rqlite
Because maximum POST data is 2MB. So I have to break it down.
So if I had a 100KB file, that would work. I can POST in single call and done. But since HTTP POST's maximum data is 2MB, I can't send the whole file in single HTTP POST. But rqlite can't understand multiple HTTP calls. So how I'm going to save 10MB of data in the database?

Philip O'Toole

unread,
Oct 29, 2022, 3:30:15 PM10/29/22
to rql...@googlegroups.com
Perhaps some sort of "chunked encoding" would work, but I suspect rqlite would need changes to support it.

What is your application that you want to store a single 10MB file in rqlite? rqlite wasn't really meant for that. rqlite is a database, but with single objects that size it sounds more like you want a file system, perhaps with reliability and fault tolerance thrown in.

Mustafa Çelik

unread,
Oct 29, 2022, 3:34:47 PM10/29/22
to rqlite
Normally I store the file in the server and and path/filename in the database. But since I'm going to have distributed database of SQLite, I chose rqlite for it. Now the data sync is great but to sync files, I thought putting the files in the database. I'm afraid I have to store files in the server and sync the files separately. Right?

Didip Kerabat

unread,
Oct 29, 2022, 7:36:21 PM10/29/22
to rqlite
I don't think it is a good idea to do this.
Why not store the file on AWS S3 and save the reference on rqlite?
Reply all
Reply to author
Forward
0 new messages