Decoupled storage and compute is a fundamental architectural principle of the modern data stack. This separation allows enterprises to independently scale their compute resources and storage capacity, optimizing both for cost-efficiency and performance. Starting from version 3.0, StarRocks introduced the storage-compute separation architecture, where data storage is separated from compute nodes, allowing for independent scaling of storage and compute.
By entrusting best-in-class object storage to handle its specialized functions and leaving query performance to the expertise of database vendors, this approach maximizes the strengths of each component. This relationship is very clearly realized when using MinIO with StarRocks in the decoupled compute mode. Good things happen when you combine high-performance analytics with high-performance object storage.
To be considered truly modern, your data stack must be able to be deployed with a single Kubernetes YAML file multiple times a day. These two Kubernetes-native, open-source projects meet that requirement. Putting on a finer point on what it means to be built for the cloud rather than to be built for a specific public cloud.
This article provides a step-by-step tutorial for getting started with StarRocks with MinIO as primary storage. It is based on StarRocks’ tutorial in which more configuration details can be found.
StarRocks Explained
StarRocks is a high-performance, massively parallel processing (MPP) OLAP database that allows data warehouse query performance on the data lakehouse. It boasts features like a fully vectorized engine, a newly designed cost-based optimizer, and intelligent materialized views, all of which allow it to deliver exceptionally fast query speeds, especially for complex multi-table joins at sub-second response times. StarRocks supports various schemas, including flat, star, and snowflake schemas, and is compatible with MySQL protocols. While using decoupled storage, you can access your data in the StarRocks internal format, Apache Iceberg, Apache Hudi, or Delta Lake within MinIO buckets. You can read more about StarRocks at http://starrocks.io.
Advantages of Decoupled Storage and Compute

To address the potential increase in network overhead caused by decoupling, StarRocks uses a local data cache for frequently accessed data to improve query performance. This architecture provides the following advantages:
- Cost Savings: Separating compute and storage allows for independent scaling and optimizing resource utilization that can lead to significant cost savings.
- Flexibility: Decoupling allows for greater operational flexibility, enabling enterprises to select tools and services that are best suited to a particular task.
- Scalability: It also provides the ability to scale object storage and compute independently, leading to better agility and ultimately more precise scaling.
- Performance: Separating storage and compute allows for the optimization of each component for its specific task, leading to improved performance, faster processing times, and better data throughput.
- Simplified Management: Decoupling storage and compute can lead to simplified management of the data stack, as it allows for easier movement of workloads and better resource allocation.
- Resource Isolation: The decoupled architecture enables resource isolation, ensuring that computational resources are matched to specific workloads.
What You’ll Learn
In this tutorial, you'll learn the essentials of running StarRocks and MinIO in Docker containers. You will go through the process of configuring StarRocks for shared data: you’ll load two public datasets and explore the data with SQL commands.
Prerequisites
You’ll use curl to download the YAML, datasets and to upload StarRocks. Check to see if you have curl installation by typing curl or curl.exe in your command prompt. If you don't have it, get curl here.
You’ll also need Docker Compose. You have the option to install the Docker Engine and Docker Compose binaries either separately or together using Docker Desktop. Installing Docker Desktop is the easiest option.
Verify that you have Docker Compose by executing:
You can access the MySQL instance in this tutorial using the MySQL CLI, eliminating the need for additional prerequisites. Alternatively, you can enhance your experience by downloading DBeaver or MySQL Workbench.
Getting Started
Open up a terminal and run this command to create a directory to work on and download the Docker compose file.
Instruct Docker Compose to launch the containers specified in the docker-compose.yml file in the background using the following command:
MinIO
You can use MinIO through the MinIO Console or with mc. The screenshots and instructions below are for the MinIO Console.
Navigate to http://localhost:9001/access-keys. The username and password are mentioned in the Docker compose file, set as minioadmin:minioadmin by default.
Click on "Create access key +" and then “Create”.

SQL Client
You’ll need to connect to a SQL client to play around with the data. You can optionally use DBeaver. Create a new database connection in DBeaver. Then select the MySQL database driver.
Configure the following fields
- Port: 9030
- Server Host: localhost
Username: root
Test the connection, and click Finish if the test succeeds.

Alternatively, if you don't share my love for DBeaver, or you might just feel more comfortable at the command line, you could use the MySQL CLI in the starrocks-fe container. To connect to StarRocks, go to the same directory as your docker-compose.yml and run the following command.
Create a Bucket
Run the following in your SQL Client, making sure that you use the access key and secret that you previously created in the MinIO Console:
Navigate to http://localhost:9001/buckets to see that the starrocks bucket has been successfully created.

Download the Data
Run the command below in a terminal window to open a Bash shell within the starrocks-fe container, allowing you to interact with the container's file system and execute commands inside it.
Run these commands to make a quickstart directory inside the container.
Run these commands to download the two data sets into the folder you just created.
Create Tables
Run these commands at the StarRocks > prompt in the terminal window where you connected to StarRocks with your SQL client.
Your terminal should look something like this:
Create Tables in SQL Client
Back in DBeaver, or the SQL Client of your choice, execute the following commands to create tables for your data.
Load the Data
Switch to the terminal in which you downloaded the dataset and execute these curl commands from the shell running in the starrocks-fe container. Press ENTER when prompted for a password.
Return to MinIO at http://localhost:9001 to verify that the data has been successfully loaded.

Explore the Data
Return to your SQL Client. Let's run some queries against the data we just loaded. Get started by querying the data to get a sense of the relationship between precipitation, crashes and day/time of the week.
Cloud-Native Analytics with StarRocks and MinIO
The combination of StarRocks and MinIO empowers enterprises with a flexible, scalable and cost-efficient data architecture. The separation of compute and storage resources allows for independent scaling, optimizing resource utilization and leads to significant cost savings. This approach not only enhances performance but also simplifies management and ensures better resource isolation.
As data becomes a cornerstone of decision-making, the ability to analyze and derive insights efficiently and quickly is paramount. StarRocks, in tandem with MinIO, positions itself as a robust solution worthy of residing in the modern data stack.
Any questions? Reach out to us on Slack or talk to us at hello@min.io. We’d be happy to help.



.png)
