Skip to content

Pipe: support different load balance strategies for data sync#12281

Merged
SteveYurongSu merged 6 commits intomasterfrom
pipe-load-balancer
Apr 2, 2024
Merged

Pipe: support different load balance strategies for data sync#12281
SteveYurongSu merged 6 commits intomasterfrom
pipe-load-balancer

Conversation

@SteveYurongSu
Copy link
Member

Usage

Supported sinks: iotdb-airgap-sink, iotdb-ssl-thrift-sink, iotdb-sync-sink, iotdb-async-sink

create pipe p1
with sink (
  'load-balance-strategy' = 'random'
);

Options for 'load-balance-strategy': round-robin, random and priority. round-robin by default.

Explaination:

  • round-robin: The connector will select the next client in a round-robin manner. If the current client is dead, the connector will try the next client until it finds an alive client. If all clients are dead, the connector will throw a PipeConnectionException.

  • random: The connector will select a client randomly. If the selected client is dead, the connector will try the next client until it finds an alive client. If all clients are dead, the connector will throw a PipeConnectionException.

  • priority: The connector will select the first alive client in given clients (via. node-urls). If all clients are dead, the connector will throw a PipeConnectionException.

@SteveYurongSu SteveYurongSu self-assigned this Apr 2, 2024
@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 2, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
3 Security Hotspots
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@SteveYurongSu SteveYurongSu merged commit fd48ef6 into master Apr 2, 2024
@SteveYurongSu SteveYurongSu deleted the pipe-load-balancer branch April 2, 2024 12:49
HTHou pushed a commit that referenced this pull request Jun 26, 2024
**Supported sinks:** iotdb-airgap-sink, iotdb-ssl-thrift-sink, iotdb-sync-sink, iotdb-async-sink

```
create pipe p1
with sink (
  'load-balance-strategy' = 'random'
);
```

Options for `'load-balance-strategy'`: `round-robin`, `random` and `priority`. `round-robin` by default.

**Explaination:**

* `round-robin`:  The connector will select the next client in a round-robin manner. If the current client is dead, the connector will try the next client until it finds an alive client. If all clients are dead, the connector will throw a `PipeConnectionException`.

* `random`: The connector will select a client randomly. If the selected client is dead, the connector will try the next client until it finds an alive client. If all clients are dead, the connector will throw a `PipeConnectionException`.

* `priority`: The connector will select the first alive client in given clients (via. `node-urls`). If all clients are dead, the connector will throw a `PipeConnectionException`.
SzyWilliam pushed a commit to SzyWilliam/iotdb that referenced this pull request Nov 26, 2024
…#12281)

**Supported sinks:** iotdb-airgap-sink, iotdb-ssl-thrift-sink, iotdb-sync-sink, iotdb-async-sink

```
create pipe p1
with sink (
  'load-balance-strategy' = 'random'
);
```

Options for `'load-balance-strategy'`: `round-robin`, `random` and `priority`. `round-robin` by default.

**Explaination:**

* `round-robin`:  The connector will select the next client in a round-robin manner. If the current client is dead, the connector will try the next client until it finds an alive client. If all clients are dead, the connector will throw a `PipeConnectionException`.

* `random`: The connector will select a client randomly. If the selected client is dead, the connector will try the next client until it finds an alive client. If all clients are dead, the connector will throw a `PipeConnectionException`.

* `priority`: The connector will select the first alive client in given clients (via. `node-urls`). If all clients are dead, the connector will throw a `PipeConnectionException`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants