You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en_US/concepts/rules.md
+40-2Lines changed: 40 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,16 +4,54 @@ Each rule represents a computing job to run in eKuiper. It defines the continuou
4
4
5
5
## Rule Lifecycle
6
6
7
-
Currently, eKuiper only supports stream processing rule, which means that at lease one of the rule source must be a continuous stream. Thus, the rule will run continuously once started and only stopped if the user send stop command explicitly. The rule may stop abnormally for errors or the eKuiper instance exits.
7
+
eKuiper currently **only supports Streaming Rules**. These types of rules require at least one Continuous Stream as a
8
+
data source.
9
+
10
+
Once a rule is started, it will run continuously until:
11
+
12
+
1. The user explicitly sends a stop command.
13
+
2. The rule abnormally terminates due to an internal error or the eKuiper instance exiting.
14
+
15
+
**Asynchronous Rule Startup and Status Management**
16
+
17
+
The rule startup process is **asynchronous**. When a user sends a start command, eKuiper performs necessary static
18
+
checks and then asynchronously executes the rule's startup operation. Therefore:
19
+
20
+
* The command response received by the user only indicates that eKuiper has accepted the startup request and set the
21
+
rule's **Expected Status** to 'started'.
22
+
* This does not mean the rule has begun running. Users need to further check the rule's **Runtime Status** to confirm
23
+
that the rule has successfully started and is running.
24
+
25
+
**Rule Update and Error Rollback**
26
+
27
+
During the rule update process, eKuiper provides **rollback** support. If the updated rule fails to start, the system
28
+
will automatically maintain and continue running the original old rule to ensure service stability.
8
29
9
30
## Rules Relationship
10
31
11
32
It is common to run multiple rules simultaneously. As eKuiper is a single instance process, the rules are running in the same memory space. However, there are separated in the runtime and the error in one rule should not affect others. Regarding workload, all rules share the same hardware resource. Each rule can specify the operator buffer to limit the processing rate to avoid taking all resources.
12
33
34
+
When multiple rules use a **[Shared Stream](../guide/streams/overview.md#share-source-instance-across-rules)**, they
35
+
share the upstream source components, including data ingestion and decoding.
36
+
37
+
In execution, all rules utilizing a shared stream form a single **Directed Acyclic Graph (DAG)** where downstream rules
38
+
can be dynamically added or removed.
39
+
40
+
**Impact of Shared Streams**
41
+
42
+
Due to this shared structure, rules within the DAG will influence each other. Specifically:
43
+
44
+
***Backpressure Propagation:** Backpressure originating from one rule can propagate backward through the shared source
45
+
component.
46
+
***Wider Impact:** This backpressure on the shared stream will then affect the performance and processing of **all**
47
+
other rules connected to that same shared source.
48
+
49
+
Besides this, the shared source side ignores checkpoint.
50
+
13
51
## Rule Pipeline
14
52
15
53
Multiple rules can form a processing pipeline by specifying a joint point in sink/source. For example, the first rule produce the result to a topic in memory sink and the other rule subscribe to that topic in its memory source. Besides the pair of memory sink/source, users can also use mqtt or other sink/source pair to connect rules.
Copy file name to clipboardExpand all lines: docs/en_US/configuration/global_configurations.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,8 @@ basic:
46
46
rulePatrolInterval: 10s
47
47
# cfgStorageType indicates the storage type to store the config, support `file` and `kv`. When `cfgStorageType` is file, it will save configuration into File. When `cfgStorageType` is `kv`, it will save configuration into the storage defined in `store`
48
48
cfgStorageType: file
49
+
# If it is enabled, each REST API call will print logs
50
+
enableRestAuditLog: false
49
51
```
50
52
51
53
for debug option in basic following env is valid `KUIPER__BASIC__DEBUG=true` and if used debug value will be set to true.
@@ -340,7 +342,9 @@ This section configures the portable plugin runtime.
340
342
341
343
## Ruleset Provision
342
344
343
-
Support file based stream and rule provisioning on startup. Users can put a [ruleset](../api/restapi/ruleset.md#ruleset-format) file named `init.json` into `data` directory to initialize the ruleset. The ruleset will only be import on the first startup of eKuiper.
345
+
Support file based stream and rule provisioning on startup. Users can put
346
+
a [ruleset](../api/restapi/ruleset.md#ruleset-format) file named `init.json` into `etc` directory to initialize the
347
+
ruleset. The ruleset will only be import on the first startup of eKuiper.
0 commit comments