Skip to main content

Deploy QuestDB

Introduction

If you’ve never heard about QuestDB before, you can check out their website. QuestDB is an open-source time-series database that is built for speed and efficiency. In our tests, we found that QuestDB is real fast. We saw that was capable of ingest 1 million rows one second with minimal CPU usage.

Ready to get started with the deployment? Let's go!

Download the CLI

To interact with the Voltmetrix platform, we need to download the CLI. You can find the CLI 👇

Linux

curl -L https://get.voltmetrix.com/linux/voltmetrix -o voltmetrix 

Make it executable.

chmod +x voltmetrix 

Windows (PowerShell)

curl https://get.voltmetrix.com/windows/voltmetrix.exe -o voltmetrix.exe 

Login to the platform

To login to the platform, we can use the following command, the result of this is a token that we can use to interact with the platform.

voltmetrix login --email [email protected] --org_id c9h39892e2f --password <your-password> 

Deploy QuestDB

Before deploying TimescaleDB we need to size the instance that you are going to use. You can start taking a look at this page to get an idea of what you need. If you are not sure, you can start with a t2.large instance on AWS or a s-4vcpu-8gb-amd on DigitalOcean.

Once we decide the size of the instance, we can deploy QuestDB.

Deploying QuestDB is quite easy, we just need to run the following command.

voltmetrix deploy \ 
--cloud aws \ 
--database questdb \ 
--org_id your-org_id \ 
--token your-awesome-token \ 
--plan professional \ 
--region us-east-1 \ 

The response will be a JSON object with the following properties (We will also send you an email with the same information + the connection details):

{ 
  "resource_id": "5c9f5b5c", 
  "database": "questdb", 
  "org_id": "your-org_id", 
  "cloud": "aws", 
  "plan": "professional", 
  "region": "us-east-1", 
  "created_at": "2021-05-15T18:00:00.000Z", 
} 

Connect to QuestDB

To connect to QuestDB we need to use the following command:

psql -h 5c9f5b5c.customers.voltmetrix.io -p 8812 -U admin -d qdb

Ingest data

Once you are connected to the database, you can execute the following to create a table:

CREATE TABLE IF NOT EXISTS t1 (name STRING, value INT);

Insert some data

INSERT INTO t1 VALUES('a', 42)

Query back

SELECT * FROM t1

The result should be something like this:

 name | value
------+-------
 a    |    42
(1 row)

Ingesting data using third-party clients.

If you want to ingest integrating QuestDB with a third-party tool, you can use check the following help article from QuestDB site: Ingesting data. Also, our CTO wrote a blog post about how to ingest data using Python.

Conclusion

As you can see it is quite easy to deploy QuestDB on the Voltmetrix platform. If you have questions, please contact the support team, and we will help you get started.