Skip to main content

Scale Query Service Nodes

Overview

This guide will walk you through the process of scaling your Databend Query Service cluster. You can either add new nodes (scale up) or remove existing nodes (scale down) from your cluster.

Prerequisites

Scale Up: Add New Query Service Node

To add a new Query Service node, follow the steps in Deploy Query Service on the new node. Make sure to:

  1. Copy the configuration from an existing node:

    sudo mkdir -p /etc/databend
    sudo scp root@<existing-node-ip>:/etc/databend/databend-query.toml /etc/databend/
  2. Follow the deployment steps in Deploy Query Service to install and start the service.

  3. After deployment, verify the new node is added to the cluster:

    bendsql -h 127.0.0.1 -u root
    SELECT * FROM system.clusters;

Scale Down: Remove Query Service Node

To remove a Query Service node from the cluster, simply stop the service on that node:

sudo systemctl stop databend-query

The node will be automatically removed from the cluster. You can verify the cluster status from any remaining node:

bendsql -h 127.0.0.1 -u root
SELECT * FROM system.clusters;

Troubleshooting

If you encounter issues:

  1. Check the service status:

    sudo systemctl status databend-query
  2. View the logs for detailed error messages:

    sudo journalctl -u databend-query -f
  3. Common issues and solutions:

    • Permission denied: Ensure the databend user has proper permissions
    • Port already in use: Check if another service is using the configured ports
    • Configuration errors: Verify the configuration file syntax and paths
    • Meta Service connection issues: Ensure the Meta Service is accessible from the new node

Next Steps

After successfully scaling your Query Service cluster, you can:

Explore Databend Cloud for FREE
Low-cost
Fast Analytics
Easy Data Ingestion
Elastic Scaling
Try it today