{"id":13504385,"url":"https://github.com/cnosdb/cnosdb","last_synced_at":"2025-05-13T22:05:31.494Z","repository":{"id":37096641,"uuid":"420965027","full_name":"cnosdb/cnosdb","owner":"cnosdb","description":"A cloud-native open source distributed time series database with high performance, high compression ratio and high availability.","archived":false,"fork":false,"pushed_at":"2025-04-28T09:09:59.000Z","size":18555,"stargazers_count":1693,"open_issues_count":129,"forks_count":317,"subscribers_count":121,"default_branch":"main","last_synced_at":"2025-04-29T13:52:41.880Z","etag":null,"topics":["database","distributed-database","rust","rust-lang","sql","time-series","time-series-database","timeseries"],"latest_commit_sha":null,"homepage":"https://www.cnosdb.com","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cnosdb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"docs/roadmap/ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-10-25T09:47:14.000Z","updated_at":"2025-04-28T09:10:11.000Z","dependencies_parsed_at":"2023-09-22T13:49:47.663Z","dependency_job_id":"bc4f5495-302a-49a9-9759-182d299b8f38","html_url":"https://github.com/cnosdb/cnosdb","commit_stats":null,"previous_names":["cnosdatabase/cnosdb"],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnosdb%2Fcnosdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnosdb%2Fcnosdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnosdb%2Fcnosdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnosdb%2Fcnosdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cnosdb","download_url":"https://codeload.github.com/cnosdb/cnosdb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254036817,"owners_count":22003653,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","distributed-database","rust","rust-lang","sql","time-series","time-series-database","timeseries"],"created_at":"2024-08-01T00:00:36.075Z","updated_at":"2025-05-13T22:05:26.487Z","avatar_url":"https://github.com/cnosdb.png","language":"Rust","readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg  src=\"docs/source/_static/img/cnosdb_logo_white.svg\" width=\"500\" alt=\"CnodSB Logo\"\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/cnosdb/cnosdb/actions\"\u003e\n  \u003cimg alt=\"CI\" src=\"https://github.com/cnosdb/cnosdb/actions/workflows/makefile.yml/badge.svg\" /\u003e\n  \u003c/a\u003e\n  \n  \u003ca href=\"https://www.rust-lang.org/\"\u003e\n  \u003cimg alt=\"Rust\" src=\"https://img.shields.io/badge/Language-Rust-blue.svg\" /\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://github.com/cnoshb/cnosdb/blob/main/LICENSE.md\"\u003e\n  \u003cimg alt=\"License Agpl 3.0\" src=\"https://img.shields.io/badge/License-AGPL_3.0-orange.svg\" /\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://twitter.com/CnosDB\"\u003e\n  \u003cimg alt=\"twitter\" src=\"https://img.shields.io/badge/twitter--white.svg?logo=twitter\u0026style=social\" /\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://www.linkedin.com/company/cnosdb\"\u003e\n  \u003cimg alt=\"linkedin\" src=\"https://img.shields.io/badge/linkedin--white.svg?logo=linkedin\u0026style=social\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca class=\"discord-widget\" href=\"https://discord.com/invite/D8cB4WGpP4\" title=\"Join us on Discord\"\u003e\n    \u003cimg src=\"https://discordapp.com/api/guilds/1104023581194715229/embed.png\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003ch3 align=\"center\"\u003e\n    \u003ca href=\"https://www.cnosdb.cloud/\"\u003eCnosDB Cloud\u003c/a\u003e\n    •\n    \u003ca href=\"https://www.cnosdb.com/\"\u003eWebsite\u003c/a\u003e\n    •\n    \u003ca href=\"https://docs.cnosdb.com/\"\u003eDocumentation\u003c/a\u003e\n    •\n    \u003ca href=\"https://docs.cnosdb.com/en/latest/start/quick_start.html\"\u003eQuick Start\u003c/a\u003e\n    •\n    \u003ca href=\"https://docs.cnosdb.com/en/eco-integration\"\u003eEco-Integration\u003c/a\u003e\n\u003c/h3\u003e\n\n\nEnglish | [简体中文](./README_CN.md)\n\nCnosDB is a high-performance, high-compression, and easy-to-use open-source distributed time-series database. It is primarily used in fields such as IoT, industrial internet, connected cars, and IT operations. All of the code is open-sourced and available on GitHub.\n\nIn its design, we fully utilize the characteristics of time-series data, including structured data, non-transactions, fewer deletions and updates, more writes and less reads, etc. As a result, CnosDB has a number of advantages that set it apart from other time-series databases:\n\n- **High performance**: CnosDB addresses the issue of time-series data expansion and theoretically supports unlimited time-series data. It supports aggregate queries along the timeline, including queries divided by equal intervals, queries divided by enumeration values of a column, and queries divided by the length of the time interval between adjacent time-series records. It also has caching capabilities for the latest data and the cache space can be configured for fast access to the latest data.\n- **Easy to use**: CnosDB provides clear and simple interfaces, easy configuration options, standard SQL support, seamless integration with third-party tools, and convenient data access functions. It supports schema-less writing mode and supports historical data supplement(including out of order writing).\n- **Cloud native**: CnosDB has a native distributed design, data sharding and partitioning, separation of storage and computing, Quorum mechanism, Kubernetes deployment and complete observability, ensuring final consistency. It can be deployed in public clouds, private clouds, and hybrid clouds. t also supports multi-tenancy and has role-based permission control. The computing and storage nodes support horizontal scaling.\n\n  **CnosDB Cloud is now live, [click here](https://www.cnosdb.cloud/) to get started now.**\n\n# Architecture\n\n![arch](./docs/source/_static/img/cnosdb_arch.png)\n\n# Quick Start\n\n## Build\u0026Run from source\n\n### **Support Platform**\n\nWe support the following platforms, if found to work on a platform not listed,\nPlease [report](https://github.com/cnosdb/cnosdb/issues) to us.\n\n- Linux x86(`x86_64-unknown-linux-gnu`)\n- Darwin arm(`aarch64-apple-darwin`)\n\n### **Requirements**\n\n1. Install `Rust`, You can check [official website](https://www.rust-lang.org/learn/get-started) to download and install\n2. Install Cmake\n```shell\n# Debian or Ubuntu\napt-get install cmake\n# Arch Linux\npacman -S cmake\n# CentOS\nyum install cmake\n# Fedora\ndnf install cmake\n# macOS\nbrew install cmake\n```\n\n3. Install FlatBuffers\n\n```shell\n# Arch Linux\npacman -S flatbuffers\n# Fedora\ndnf install flatbuffers\n# Ubuntu\nsnap install flatbuffers\n# macOS\nbrew install flatbuffers\n```\n\nIf your system is not listed, you can install FlatBuffers as follows\n\n```shell\n$ git clone -b v22.9.29 --depth 1 https://github.com/google/flatbuffers.git \u0026\u0026 cd flatbuffers\n\n# Choose one of the following commands depending on your operating system\n$ cmake -G \"Unix Makefiles\" -DCMAKE_BUILD_TYPE=Release\n$ cmake -G \"Visual Studio 10\" -DCMAKE_BUILD_TYPE=Release\n$ cmake -G \"Xcode\" -DCMAKE_BUILD_TYPE=Release\n\n$ sudo make install\n```\n\n4. Install Protobuf\n\n```shell\n# Arch Linux\npacman -S protobuf\n# Fedora\ndnf install protobuf\n# Ubuntu\nsnap install protobuf\n# macOS\nbrew install protobuf\n```\n\n### **Compile**\n\n```shell\ngit clone https://github.com/cnosdb/cnosdb.git \u0026\u0026 cd cnosdb\nmake build\n```\n\n### **Run**\n\n#### Run CnosDB\n\nThe following is a single node startup. If you need to start a cluster, see the [Deploy](https://docs.cnosdb.com/en/docs/deploy/) section.\n\n```bash\n./target/debug/cnosdb run -M singleton --config ./config/config.toml\n```\n\n#### **Run CLI**\n```shell\ncargo run --package client --bin cnosdb-cli\n```\n\n## Run with Docker\n\n1. Install [Docker](https://www.docker.com/products/docker-desktop/)\n\n2. Start container\n```shell\ndocker run --name cnosdb -d cnosdb/cnosdb:community-latest cnosdb run -M singleton --config /etc/cnosdb/cnosdb.conf\n```\n3. Run a command in the running container\n```shell\ndocker exec -it cnosdb bash\n```\n4. Run `cnosdb-cli`\n```shell\ncnosdb-cli\n```\n\n\u003e Quit `\\q`\n\u003e Help `\\?`\n\u003e For more details, check [quick start](https://docs.cnosdb.com/en/latest/start/quick_start.html)\n\n## Write data\n\n- [SQL](https://docs.cnosdb.com/en/latest/reference/sql.html#insert)\n- [influxdb line-protocol](https://docs.influxdata.com/influxdb/v2.6/reference/syntax/line-protocol/)\n- [bulk loading](https://docs.cnosdb.com/en/latest/develop/write.html#load-data)\n- [telegraf](https://docs.cnosdb.com/en/eco-integration/telegraf)\n\nThe following will show an example of using cli to write data by SQL\n\n1. CREATE TABLE\n\n```sql\nCREATE TABLE air (\n    visibility DOUBLE,\n    temperature DOUBLE,\n    pressure DOUBLE,\n    TAGS(station)\n);\n```\n\n```bash\npublic ❯ CREATE TABLE air (\n    visibility DOUBLE,\n    temperature DOUBLE,\n    pressure DOUBLE,\n    TAGS(station)\n);\nQuery took 0.063 seconds.\n```\n\n2. Insert a row\n\n```sql\nINSERT INTO air (TIME, station, visibility, temperature, pressure) VALUES\n                (1673591597000000000, 'XiaoMaiDao', 56, 69, 77);\n```\n\n```bash\npublic ❯ INSERT INTO air (TIME, station, visibility, temperature, pressure) VALUES\n                (1673591597000000000, 'XiaoMaiDao', 56, 69, 77);\n+------+\n| rows |\n+------+\n| 1    |\n+------+\nQuery took 0.032 seconds.\n```\n\n3. insert multiple rows\n\n```sql\nINSERT INTO air (TIME, station, visibility, temperature, pressure) VALUES\n                ('2023-01-11 06:40:00', 'XiaoMaiDao', 55, 68, 76),\n                ('2023-01-11 07:40:00', 'DaMaiDao', 65, 68, 76);\n```\n\n```bash\npublic ❯ INSERT INTO air (TIME, station, visibility, temperature, pressure) VALUES\n                ('2023-01-11 06:40:00', 'XiaoMaiDao', 55, 68, 76),\n                ('2023-01-11 07:40:00', 'DaMaiDao', 65, 68, 76);\n+------+\n| rows |\n+------+\n| 2    |\n+------+\nQuery took 0.038 seconds.\n```\n\n## Query data\n\n- [SQL](https://docs.cnosdb.com/en/latest/reference/sql.html), compatible with SQL standard.\n- [Prometheus remote read](https://docs.cnosdb.com/en/eco-integration/prometheus#remote-read).\n\nThe following will show an example of SQL query using cli\n\n```sql\n-- query table data\nSELECT * FROM air;\n```\n\n```bash\npublic ❯ -- query table data\nSELECT * FROM air;\n+---------------------+------------+------------+-------------+----------+\n| time                | station    | visibility | temperature | pressure |\n+---------------------+------------+------------+-------------+----------+\n| 2023-01-11T06:40:00 | XiaoMaiDao | 55         | 68          | 76       |\n| 2023-01-13T06:33:17 | XiaoMaiDao | 56         | 69          | 77       |\n| 2023-01-11T07:40:00 | DaMaiDao   | 65         | 68          | 76       |\n+---------------------+------------+------------+-------------+----------+\nQuery took 0.036 seconds.\n```\n\n# Connector\n\nCnosDB supports connections from various clients:\n\n- C/C++\n- Go\n- Java\n- Rust\n- Python\n- JDBC\n- ODBC\n- Arrow Filght SQL\n\nPlease refer to the \"Connector\" section in the documentation for the above examples. You can access it [here](https://docs.cnosdb.com/en/latest/reference/connector/).\n\n# Roadmap\n\n- Click to view [Roadmap](./docs/roadmap/ROADMAP.md)\n\n# Join the community\n\nWelcome to join our developer community at discord: \n  \n  https://discord.com/invite/D8cB4WGpP4\n\n\u003cp align=\"left\"\u003e\n  \u003ca class=\"discord-widget\" href=\"https://discord.com/invite/D8cB4WGpP4\" title=\"Join us on Discord\"\u003e\n    \u003cimg src=\"https://discordapp.com/api/guilds/1104023581194715229/embed.png?style=banner1\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## Contributing\n\nPlease refer to [Contribution Guide](./CONTRIBUTING_EN.md) to contribute to CnosDB.\n\n# Acknowledgement\n\n- CnosDB 2.0 uses [Apache Arrow](https://github.com/apache/arrow) as the memory model.\n- CnosDB 2.0's query engine is powered by [Apache Arrow DataFusion](https://github.com/apache/arrow-datafusion).\n- CnosDB 2.0's bug detection is powered by [SQLancer](https://github.com/sqlancer/sqlancer).\n- CnosDB 2.0's integration test framework is powered by [sqllogictest-rs](https://github.com/risinglightdb/sqllogictest-rs).\n- CnosDB 2.0 combining [LangChain](https://github.com/hwchase17/langchain) to realize the natural language to communicate with the database。\n\n","funding_links":[],"categories":["Databases","Rust","time-series"],"sub_categories":["Time Series"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnosdb%2Fcnosdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcnosdb%2Fcnosdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnosdb%2Fcnosdb/lists"}