Show HN: Run SQLite Directly on S3 from AWS or GCP

2 hours ago 1

SQLite is an open-source in-process SQL database engine that makes it easy to build portable, self-contained databases. Because SQLite stores each database in a single file, it’s already simple to use with Archil. This guide will walk you through the steps on how to run a SQLite database on Archil, to avoid the need to worry about capacity limits or performance. For organizations which create a single SQLite database per user, Archil makes it easy to only pay for the databases which are actively being used.

Create an Archil disk

First, follow the Archil Getting Started Guide to create an Archil disk that you wish to attach to your Firecracker microVM.

Install SQLite

On Amazon Linux 2023, you can install SQLite with the following command:

sudo dnf install sqlite -y

Next, mount your Archil disk to an easy to access directory.

sudo mkdir -p /mnt/archil sudo archil mount <disk-name> /mnt/archil --region aws-us-east-1 --auth-token TOKEN

Now, you can create a SQLite database on Archil. Simply cd to the Archil disk and create a new database file.

cd /mnt/archil sqlite3 my_database.db

You can use the SQLite database as normal.

(Optional) Run a benchmark to validate performance

We’ll do a performance benchmark of sqlite using the speedtest1 tool from the SQLite authors. Let’s install and compile this tool.

git clone https://github.com/sqlite/sqlite.git cd sqlite ./configure --all make clean speedtest1

Then, run a benchmark.

sudo ./speedtest1 /mnt/archil/performance_test.db
Read Entire Article