Welcome to the world of Apache HoraeDB, an incubating project designed to make handling time-series data as easy and fast as a breeze on a sunny day! In this blog, we will guide you through the steps to set up and start using HoraeDB, ensuring that you can harness the power of this high-performance, distributed, cloud-native database with utmost efficiency. Let’s dive in!
Quick Start
Before we jump into action, let’s gather our tools. You’ll need Docker installed to run HoraeDB seamlessly. Now, let’s break down how to get things rolling either by running it standalone or setting up a full-fledged cluster.
Running HoraeDB Standalone Server
The easiest way to get started is to run HoraeDB’s standalone server. Think of it as setting up a small food stand instead of a full restaurant. You’ll get a taste of its capabilities.
docker run -d --name horaedb-server -p 8831:8831 -p 3307:3307 -p 5440:5440 ghcr.io/apache/horaedb-server:nightly-20231222-f57b3827
Setting Up a HoraeDB Cluster
For a more robust experience, you can create a cluster with two HoraeDB server nodes and one HoraeMeta server node. It’s like making a cozy restaurant where multiple chefs can cook simultaneously!
docker compose -f docker/docker-compose.yaml up
Creating Your First Table
Now that you have HoraeDB up and running, let’s create a table and write some data. Think of this step as creating a menu for your food stand.
Create a Table
curl --location --request POST http://127.0.0.1:5440/sql -d "CREATE TABLE demo (name string TAG, value double NOT NULL, t timestamp NOT NULL, timestamp KEY (t)) ENGINE=Analytic WITH (enable_ttl=false)"
Writing Data
Now that the menu is ready, let’s add some delicious entries!
curl --location --request POST http://127.0.0.1:5440/sql -d "INSERT INTO demo (t, name, value) VALUES (1702224000000, 'horaedb', 100)"
Reading Data
After writing, it’s time to check what’s on the menu!
curl --location --request POST http://127.0.0.1:5440/sql -d "SELECT * FROM demo"
Dropping the Table
If you want to start fresh, here’s how to clean up your menu.
curl --location --request POST http://127.0.0.1:5440/sql -d "DROP TABLE demo"
Troubleshooting
Sometimes, things may not go as smoothly as we hope. Here are a few troubleshooting ideas:
- Ensure that Docker is running properly. If you encounter a connection error, this may be the culprit.
- Check if the ports (8831, 3307, and 5440) are already in use by another service.
- For help or to share ideas, consider joining the community by sending an email to dev-subscribe@horaedb.apache.org.
- If you want more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.
At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.
There you have it! With the information provided, you are now equipped to start your journey with Apache HoraeDB, making data handling easier and more efficient. Happy coding!

