The serverless version of FeatureBase has come to FeatureBase Cloud and is available to try NOW! Here’s a brief walkthrough of how you can experience the same low-latency, high throughput database you know and love in a serverless fashion.
Serverless introduces a couple of new components that are important to understand before starting. The first are “workers”. Workers represent the compute for your database and are used for querying and ingesting data. Each worker has a set of pre-defined specifications, which for preview, is 2GB of memory and 1vCPU. This is intentionally small, but workers will evolve to have much larger specs and specific intended workloads (general purpose, ingest-optimized, etc.) coming out of preview.
As you ingest data, your data is stored durably and separate from the workers. In addition to having 11 nines of durability, data is highly available and stored redundantly across multiple locations.
IMPORTANT REMINDER: Functionality is in Preview status, so there are known limitations and likely unknown limitations. A list of known limitations can be referenced as you explore, but please let us know if you encounter any issues. Your feedback is what makes our product better!
The first step to starting with serverless is creating a database. This can be accomplished through the UI by going to the Databases page, choosing Start with a clean database, selecting the Serverless (Preview) option, and pressing CREATE DATABASE:
You will now see your database with a status of RUNNING. One worker is assigned to a new serverless database by default.
Interacting with a serverless database is the same as other FeatureBase databases. Loading and extracting data is all done through SQL. The following commands can be run to load a couple of records into an iris table that holds flower information:
Now you may want to load something larger and want to load it quickly. You can add a worker to your database with a simple SQL query:
After running this query, another 2GB worker is added to your database and available to use for queries you issue. Let’s create and load a new table with more data following this guide.
After following the guide and loading a larger dataset, you can remove workers from your database. In fact, you can remove all of the workers, which may be helpful if you don’t run queries outside of business hours and don’t want to pay for idle compute:
When you do this, you will no longer be able to issue queries to your database. Don’t worry, the data you loaded is safe on disk and will be available for reads/write whenever you add workers back.
If you are done with a database and no longer want the data in any of the tables, you can drop your database. This action cannot be undone and will result in all data being deleted permanently:
We hope you are as excited as we are about FeatureBase Serverless and the many advantages it can bring! We’ll be continuously pushing updates and new features, so make sure and stay tuned in! For more information on serverless, check out our docs, or for getting access, please contact FeatureBase Support on Discord.
docker run -p 10101:10101 featurebasedb/featurebase
git clone https://github.com/FeatureBaseDB/featurebase-examples.git
docker network create fbnet
docker compose up