Commit Graph

9 Commits

Author SHA1 Message Date
Vincent Bernat
ac68c5970e inlet: split inlet into new inlet and outlet
This change split the inlet component into a simpler inlet and a new
outlet component. The new inlet component receive flows and put them in
Kafka, unparsed. The outlet component takes them from Kafka and resume
the processing from here (flow parsing, enrichment) and puts them in
ClickHouse.

The main goal is to ensure the inlet does a minimal work to not be late
when processing packets (and restart faster). It also brings some
simplification as the number of knobs to tune everything is reduced: for
inlet, we only need to tune the queue size for UDP, the number of
workers and a few Kafka parameters; for outlet, we need to tune a few
Kafka parameters, the number of workers and a few ClickHouse parameters.

The outlet component features a simple Kafka input component. The core
component becomes just a callback function. There is also a new
ClickHouse component to push data to ClickHouse using the low-level
ch-go library with batch inserts.

This processing has an impact on the internal representation of a
FlowMessage. Previously, it was tailored to dynamically build the
protobuf message to be put in Kafka. Now, it builds the batch request to
be sent to ClickHouse. This makes the FlowMessage structure hides the
content of the next batch request and therefore, it should be reused.
This also changes the way we decode flows as they don't output
FlowMessage anymore, they reuse one that is provided to each worker.

The ClickHouse tables are slightly updated. Instead of using Kafka
engine, the Null engine is used instead.

Fix #1122
2025-07-27 21:44:28 +02:00
Vincent Bernat
62521e629d common/http: rename to common/httpserver
This is a preparation to introduce an httpclient common package. And it
makes it easier to use http from the standard library.
2023-05-28 09:08:29 +02:00
Vincent Bernat
c01489948f general: use map[string]struct{} instead of map[string]bool 2022-08-05 18:12:41 +02:00
Vincent Bernat
684a219fac cmd: replace fake-exporter by demo-exporter
Also propagate this rename to configuration and code. It makes easier
to understand the purpose of such a command in the provided
`docker-compose` file.
2022-07-26 17:42:16 +02:00
Vincent Bernat
916674655a fakeexporter: for demo purpose, provide a fake exporter component
Also, add a complete docker-compose.yaml to improve out-of-the-box
experience.
2022-07-07 21:34:56 +02:00
Vincent Bernat
f67d2493b0 orchestrator: allow to register several configuration for a given service
Use the first one by default and if the index is not known. Remove
service registration as this is not used yet.
2022-06-29 15:45:59 +02:00
Vincent Bernat
8be1bca4fd license: AGPL-3.0-only
```
git ls-files \*.js \*.go \
  | xargs sed -i '1i // SPDX-FileCopyrightText: 2022 Free Mobile\n// SPDX-License-Identifier: AGPL-3.0-only\n'
git ls-files \*.vue \
  | xargs sed -i '1i <!-- SPDX-FileCopyrightText: 2022 Free Mobile -->\n<!-- SPDX-License-Identifier: AGPL-3.0-only -->\n'
```
2022-06-29 11:42:28 +02:00
Vincent Bernat
8ec6492448 orchestrator: remove broker reference from URLs too
The broker component was merged as the root orchestrator component.
Remove references from URL too.
2022-06-20 15:53:14 +02:00
Vincent Bernat
ee26a468b0 orchestrator: move broker component as orchestrator
We can have one main subcomponent per component. We don't do that for
the inlet component as there is more configuration.
2022-06-13 09:50:43 +02:00