Go to file
Paul Dix 6a55272641 feat: implement write buffer segment with wal flushing
This creates the WriteBufferFlusher and OpenBufferSegment. If a wal is passed into the buffer, data written into it will be persisted to the wal for the initialized segment id.
2024-01-31 19:19:32 -05:00
.cargo chore: don't doc behind tokio_unstable flags 2023-07-03 15:42:35 +02:00
.circleci fix: remove deploy step for images (#24566) 2024-01-10 13:51:19 -05:00
.config fix: garbage_collector no longer uses chrono-english so it can use the workspace hack crate 2023-05-01 11:31:42 -04:00
.github docs: rename influxdb_iox to influxdata (#24577) 2024-01-16 13:34:23 -05:00
arrow_util fix: Failing CI on main (#24562) 2024-01-09 15:11:35 -05:00
authz chore(deps): Bump base64 from 0.21.3 to 0.21.4 (#8701) 2023-09-11 08:14:43 +00:00
backoff chore(deps): Bump tokio from 1.31.0 to 1.32.0 (#8507) 2023-08-17 08:06:29 +00:00
cache_system fix: Failing CI on main (#24562) 2024-01-09 15:11:35 -05:00
clap_blocks feat(ingester): buffered partition limit 2023-09-13 17:14:43 +02:00
client_util fix: Failing CI on main (#24562) 2024-01-09 15:11:35 -05:00
data_types fix: Failing CI on main (#24562) 2024-01-09 15:11:35 -05:00
datafusion_util chore(deps): Bump tokio from 1.31.0 to 1.32.0 (#8507) 2023-08-17 08:06:29 +00:00
dml build: remove unused dependencies from crates 2023-05-23 14:55:43 +02:00
docker chore: fix JDK for integration tests (#7980) 2023-06-13 10:51:26 +00:00
docs chore(doc): fix typo (#8398) 2023-08-02 20:33:32 +00:00
executor chore(deps): Bump tokio-util from 0.7.8 to 0.7.9 2023-09-21 02:01:19 +00:00
flightsql chore(deps): Bump bytes from 1.4.0 to 1.5.0 (#8692) 2023-09-08 12:17:12 +00:00
garbage_collector chore(deps): Bump tokio-util from 0.7.8 to 0.7.9 2023-09-21 02:01:19 +00:00
generated_types fix: Failing CI on main (#24562) 2024-01-09 15:11:35 -05:00
grpc-binary-logger chore(deps): Bump bytes from 1.4.0 to 1.5.0 (#8692) 2023-09-08 12:17:12 +00:00
grpc-binary-logger-proto build: remove unused dependencies from crates 2023-05-23 14:55:43 +02:00
grpc-binary-logger-test-proto build: remove unused dependencies from crates 2023-05-23 14:55:43 +02:00
import_export fix: Failing CI on main (#24562) 2024-01-09 15:11:35 -05:00
influxdb2_client chore(deps): Bump mockito from 1.1.1 to 1.2.0 (#8751) 2023-09-18 07:55:49 +00:00
influxdb3 feat: implement write buffer segment with wal flushing 2024-01-31 19:19:32 -05:00
influxdb3_server feat: implement write buffer segment with wal flushing 2024-01-31 19:19:32 -05:00
influxdb3_write feat: implement write buffer segment with wal flushing 2024-01-31 19:19:32 -05:00
influxdb_influxql_parser chore(deps): Bump insta from 1.31.0 to 1.32.0 2023-09-21 10:10:26 +00:00
influxdb_iox_client chore(deps): Bump serde_json from 1.0.106 to 1.0.107 (#8731) 2023-09-14 09:28:30 +00:00
influxdb_line_protocol chore: Sync and release v1.0.1 of influxdb-line-protocol (#24527) 2023-12-22 15:12:41 -05:00
influxdb_storage_client build: remove unused dependencies from crates 2023-05-23 14:55:43 +02:00
influxdb_tsm feat: Upgrade to Rust 1.72.0 (#8589) 2023-08-29 05:57:38 +00:00
influxrpc_parser fix: Failing CI on main (#24562) 2024-01-09 15:11:35 -05:00
ingester_query_grpc fix: Failing CI on main (#24562) 2024-01-09 15:11:35 -05:00
iox_catalog Merge branch 'pd/influxdb3-oss' 2023-09-21 09:15:41 -04:00
iox_data_generator fix: Failing CI on main (#24562) 2024-01-09 15:11:35 -05:00
iox_query fix: Failing CI on main (#24562) 2024-01-09 15:11:35 -05:00
iox_query_influxql fix: Failing CI on main (#24562) 2024-01-09 15:11:35 -05:00
iox_query_influxrpc refactor: unpack record batches later during query (#8663) 2023-09-06 08:08:54 +00:00
iox_tests feat: make sory_key_ids non-optional (#8750) 2023-09-19 14:22:29 +00:00
iox_time chore(deps): Bump chrono from 0.4.30 to 0.4.31 (#8752) 2023-09-18 12:57:48 +00:00
ioxd_common fix: Failing CI on main (#24562) 2024-01-09 15:11:35 -05:00
ioxd_test chore(deps): Bump tokio-util from 0.7.8 to 0.7.9 2023-09-21 02:01:19 +00:00
logfmt feat: Upgrade to Rust 1.72.0 (#8589) 2023-08-29 05:57:38 +00:00
metric fix: Failing CI on main (#24562) 2024-01-09 15:11:35 -05:00
metric_exporters build: remove unused dependencies from crates 2023-05-23 14:55:43 +02:00
mutable_batch feat: decode time portion of the partition key (#8725) 2023-09-14 09:15:11 +00:00
mutable_batch_lp feat: Upgrade to Rust 1.72.0 (#8589) 2023-08-29 05:57:38 +00:00
mutable_batch_pb fix: prevent panics in partitioning logic 2023-06-01 17:44:44 +02:00
mutable_batch_tests chore(deps): Bump bytes from 1.4.0 to 1.5.0 (#8692) 2023-09-08 12:17:12 +00:00
object_store_metrics chore: Update datafusion, arrow/flight/parquet to `46.0.0` , object_store to `0.7.0` (#8577) 2023-09-08 12:49:57 +00:00
observability_deps chore: Rerun cargo hakari manage-deps 2023-02-27 11:56:15 +01:00
panic_logging fix: Failing CI on main (#24562) 2024-01-09 15:11:35 -05:00
parquet_file Revert "chore: Update DataFusion pin (#8698)" (#8714) 2023-09-11 17:19:04 +00:00
parquet_to_line_protocol chore: Update datafusion, arrow/flight/parquet to `46.0.0` , object_store to `0.7.0` (#8577) 2023-09-08 12:49:57 +00:00
predicate chore(deps): Bump chrono from 0.4.30 to 0.4.31 (#8752) 2023-09-18 12:57:48 +00:00
query_functions fix: Failing CI on main (#24562) 2024-01-09 15:11:35 -05:00
schema fix: Failing CI on main (#24562) 2024-01-09 15:11:35 -05:00
scripts fix: update proto path for parquet meta script (#7911) 2023-06-02 15:29:11 +00:00
service_common chore: Update datafusion, arrow/flight/parquet to `46.0.0` , object_store to `0.7.0` (#8577) 2023-09-08 12:49:57 +00:00
service_grpc_flight fix: Failing CI on main (#24562) 2024-01-09 15:11:35 -05:00
service_grpc_testing build: remove unused dependencies from crates 2023-05-23 14:55:43 +02:00
sharder refactor: AsRef bytes for NamespaceName 2023-08-29 12:18:33 +02:00
sqlx-hotswap-pool chore(deps): Bump tokio from 1.31.0 to 1.32.0 (#8507) 2023-08-17 08:06:29 +00:00
test_fixtures feat: introduce a new way of max_sequence_number for ingester, compactor and querier (#6692) 2023-01-26 10:52:47 +00:00
test_helpers chore(deps): Bump tempfile from 3.7.1 to 3.8.0 (#8527) 2023-08-21 08:52:19 +00:00
test_helpers_end_to_end Revert "chore: Update DataFusion pin (#8698)" (#8714) 2023-09-11 17:19:04 +00:00
tokio_metrics_bridge chore(deps): Bump tokio from 1.31.0 to 1.32.0 (#8507) 2023-08-17 08:06:29 +00:00
tools feat: tool to graphically display plans (#803) 2021-02-15 13:03:12 +00:00
trace chore(7618): trace ingester response encoding v2 (#7820) 2023-05-26 09:40:16 +00:00
trace_exporters chore(deps): Bump chrono from 0.4.30 to 0.4.31 (#8752) 2023-09-18 12:57:48 +00:00
trace_http chore(deps): Bump itertools from 0.10.5 to 0.11.0 (#8060) 2023-06-23 08:11:56 +00:00
tracker chore(deps): Bump tokio-util from 0.7.8 to 0.7.9 2023-09-21 02:01:19 +00:00
trogging chore(deps): Bump thiserror from 1.0.47 to 1.0.48 (#8658) 2023-09-04 09:21:22 +00:00
wal fix: Failing CI on main (#24562) 2024-01-09 15:11:35 -05:00
wal_inspect chore(deps): Bump thiserror from 1.0.47 to 1.0.48 (#8658) 2023-09-04 09:21:22 +00:00
workspace-hack fix: Failing CI on main (#24562) 2024-01-09 15:11:35 -05:00
.editorconfig chore: editor config spacing for shell scripts 2022-12-13 11:12:11 +01:00
.gitattributes feat: implement jaeger-agent protocol directly (#2607) 2021-09-22 17:30:37 +00:00
.gitignore chore: gitignore pending insta snapshots (#6923) 2023-02-09 10:47:29 +00:00
.kodiak.toml chore: Set default to squash 2022-01-25 15:57:10 +01:00
.yamllint.yml ci: run yamllint 2021-11-29 15:11:15 +01:00
CONTRIBUTING.md docs: rename influxdb_iox to influxdata (#24577) 2024-01-16 13:34:23 -05:00
Cargo.lock feat: implement write buffer segment with wal flushing 2024-01-31 19:19:32 -05:00
Cargo.toml feat: Add basic Edge server structure (#24552) 2024-01-08 11:50:59 -05:00
Dockerfile fix: set Dockerfile to build influxdb3 not IOx (#24563) 2024-01-09 15:19:21 -05:00
Dockerfile.dockerignore fix: do not exclude cargo configs in docker build (#8054) 2023-06-22 14:31:02 +00:00
LICENSE-APACHE fix: Add LICENSE (#430) 2020-11-10 12:10:07 -05:00
LICENSE-MIT fix: Add LICENSE (#430) 2020-11-10 12:10:07 -05:00
README.md chore: Update README.md (#24379) 2023-09-26 09:59:23 -04:00
buf.yaml chore: apply proto lints to ingester->query gRPC 2023-09-01 13:03:11 +02:00
deny.toml chore: upgrade to sqlx 0.7.1 (#8266) 2023-07-19 12:18:57 +00:00
integration-docker-compose.yml fix: Remove uses of KAFKA_CONNECT, redpanda, and some talk of Kafka 2023-04-12 11:53:23 -04:00
rust-toolchain.toml fix: Failing CI on main (#24562) 2024-01-09 15:11:35 -05:00
rustfmt.toml chore: use Rust edition 2021 2021-10-25 10:58:20 +02:00

README.md

InfluxDB Edge

[!NOTE] On 2023-09-21 this repo changed the default branch from master to main. At the same time, we moved all InfluxDB 2.x development into the main-2.x branch. If you relied on the 2.x codebase in the former master branch, update your tooling to point to main-2.x, which is the new home for any future InfluxDB 2.x development. This branch (main) is now the default branch for this repo and is for development of InfluxDB 3.x.

For now, this means that InfluxDB 3.0 and its upstream dependencies are the focus of our open source efforts. We continue to support both the 1.x and 2.x versions of InfluxDB for our customers, but our new development efforts are now focused on 3.x. The remainder of this readme has more details on 3.0 and what you can expect.

InfluxDB is an open source time series database written in Rust, using Apache Arrow, Apache Parquet, and Apache DataFusion as its foundational building blocks. This latest version (3.x) of InfluxDB focuses on providing a real-time buffer for observational data of all kinds (metrics, events, logs, traces, etc.) that is queryable via SQL or InfluxQL, and persisted in bulk to object storage as Parquet files, which other third-party systems can then use. It is able to run either with a write ahead log or completely off object storage if the write ahead log is disabled (in this mode of operation there is a potential window of data loss for any data buffered that has not yet been persisted to object store).

The open source project runs as a standalone system in a single process. If you're looking for a clustered, distributed time series database with a bunch of enterprise security features, we have a commercial offering available as a managed hosted service or as on-premise software designed to run inside Kubernetes. The distributed version also includes functionality to reorganize the files in object storage for optimal query performance. In the future, we intend to have a commercial version of the single server software that adds fine-grained security, federated query capabilities, file reorganization for query optimization and deletes, and integration with other systems.

Project Status

Currently this project is under active prototype development without documentation or official builds. This README will be updated with getting started details and links to docs when the time comes.

Roadmap

The scope of this open source InfluxDB 3.0 is different from either InfluxDB 1.x or 2.x. This may change over time, but for now here are the basics of what we have planned:

  • InfluxDB 1.x and 2.x HTTP write API (supporting Line Protocol)
  • InfluxDB 1.x HTTP query API (InfluxQL)
  • Flight SQL (query API using SQL)
  • InfluxQL over Flight
  • Data migration tooling for InfluxDB 1.x & 2.x to 3.0
  • InfluxDB 3.0 HTTP write API (a new way to write data with a more expressive data model than 1.x or 2.x)
  • InfluxDB 3.0 HTTP query API (send InfluxQL or SQL queries as an HTTP GET and get back JSON lines, CSV, or pretty print response)
  • Persist event stream (subscribe to the Parquet file persist events, useful for downstream clients to pick up files from object store)
  • Embedded VM (either Python, Javascript, WASM, or some combination thereof)
    • Individual queries
    • Triggers on write
    • On persist (run whatever is being persisted through script)
    • On schedule
  • Bearer token authentication (all or nothing, token is set at startup through env variable, more fine-grained security is outside the scope of the open source effort)

What this means is that InfluxDB 3.0 can be pointed to as though it is an InfluxDB 1.x server with most of the functionality present. For InfluxDB 2.x users that primarily interact with the database through the InfluxQL query capability, they will also be able to use this database in a similar way. Version 3.0 will not be implementing the rest of the 2.x API natively, although there could be separate processes that could be added on at some later date that would provide that functionality.

Flux

Flux is the custom scripting and query language we developed as part of our effort on InfluxDB 2.0. While we will continue to support Flux for our customers, it is noticeably absent from the description of InfluxDB 3.0. Written in Go, we built Flux hoping it would get broad adoption and empower users to do things with the database that were previously impossible. While we delivered a powerful new way to work with time series data, many users found Flux to be an adoption blocker for the database.

We spent years of developer effort on Flux starting in 2018 with a small team of developers. However, the size of the effort, including creating a new language, VM, query planner, parser, optimizer and execution engine, was significant. We ultimately werent able to devote the kind of attention we would have liked to more language features, tooling, and overall usability and developer experience. We worked constantly on performance, but because we were building everything from scratch, all the effort was solely on the shoulders of our small team. We think this ultimately kept us from working on the kinds of usability improvements that would have helped Flux get broader adoption.

For InfluxDB 3.0 we adopted Apache Arrow DataFusion, an existing query parser, planner, and executor as our core engine. That was in mid-2020, and over the course of the last three years, there have been significant contributions from an active and growing community. While we remain major contributors to the project, it is continuously getting feature enhancements and performance improvements from a worldwide pool of developers. Our efforts on the Flux implementation would simply not be able to keep pace with the much larger group of DataFusion developers.

With InfluxDB 3.0 being a ground-up rewrite of the database in a new language (from Go to Rust), we werent able to bring the Flux implementation along. For InfluxQL we were able to support it natively by writing a language parser in Rust and then converting InfluxQL queries into logical plans that our new native query engine, Apache Arrow DataFusion, can understand and process. We also had to add new capabilities to the query engine to support some of the time series queries that InfluxQL enables. This is an effort that took a little over a year and is still ongoing. This approach means that the contributions to DataFusion become improvements to InfluxQL as well given it is the underlying engine.

Initially, our plan to support Flux in 3.0 was to do so through a lower level API that the database would provide. In our Cloud2 product, Flux processes connect to the InfluxDB 1 & 2 TSM storage engine through a gRPC API. We built support for this in InfluxDB 3.0 and started testing with mirrored production workloads. We quickly found that this interface performed poorly and had unforeseen bugs, eliminating it as a viable option for Flux users to bring their scripts over to 3.0. This is due to the API being designed around the TSM storage engines very specific format, which the 3.0 engine is unable to serve up as quickly.

Well continue to support Flux for our users and customers. But given Flux is a scripting language in addition to being a query language, planner, optimizer, and execution engine, a Rust-native version of it is likely out of reach. And because the surface area of the language is so large, such an effort would be unlikely to yield a version that is compatible enough to run existing Flux queries without modification or rewrites, which would eliminate the point of the effort to begin with.

For Flux to have a path forward, we believe the best plan is to update the core engine so that it can use Flight SQL to talk to InfluxDB 3.0. This would make an architecture where independent processes that serve the InfluxDB 2.x query API (i.e. Flux) would be able to convert whatever portion of a Flux script that is a query into a SQL query that gets sent to the InfluxDB 3.0 process with the result being post-processed by the Flux engine.

This is likely not a small effort as the Flux engine is built around InfluxDB 2.0's TSM storage engine and the representation of all data as individual time series. InfluxDB 3.0 doesn't keep a concept of series so the SQL query would either have to do a bunch of work to return individual series, or the Flux engine would do work with the resulting query response to construct the series. For the moment, were focused on improvements to the core SQL and (and by extension InfluxQL) query engine and experience both in InfluxDB 3.0 and DataFusion.

We may come back to this effort in the future, but we dont want to stop the community from self-organizing an effort to bring Flux forward. The Flux runtime and language exists as permissively licensed open source here. We've also created a community fork of Flux where the community can self-organize and move development forward without requiring our code review process. There are already a few community members working on this potential path forward. If you're interested in helping with this effort, please speak up on this tracked issue.

We realize that Flux still has an enthusiastic, if small, user base and wed like to figure out the best path forward for these users. For now, with our limited resources, we think focusing our efforts on improvements to Apache Arrow DataFusion and InfluxDB 3.0s usage of it is the best way to serve our users that are willing to convert to either InfluxQL or SQL. In the meantime, well continue to maintain Flux with security and critical fixes for our users and customers.