You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2021/10/29 12:42:40 UTC

[GitHub] [ignite-3] alievmirza commented on a change in pull request #419: IGNITE-15474 Documented RAFT threading model.

alievmirza commented on a change in pull request #419:
URL: https://github.com/apache/ignite-3/pull/419#discussion_r739198239



##########
File path: modules/raft/README.md
##########
@@ -0,0 +1,76 @@
+# Ignite module for RAFT (Reliable, Replicated, Redundant, And Fault-Tolerant) protocol implementation.
+
+This module contains a fork of a JRaft project <sup id="a1">[1](#f1)</sup>
+
+## Top level overview
+
+The main entry point is `JRaftServerImpl`, which starts server node for handling RAFT messages.
+Responsble for managing one or many RAFT replication groups, see `NodeImpl`.
+
+A RAFT node represents a single group node, which can be voting or non voring (so called learner).

Review comment:
       ```suggestion
   A RAFT node represents a single group node, which can be voting or non-voting (so called learner).
   ```

##########
File path: modules/raft/README.md
##########
@@ -0,0 +1,76 @@
+# Ignite module for RAFT (Reliable, Replicated, Redundant, And Fault-Tolerant) protocol implementation.
+
+This module contains a fork of a JRaft project <sup id="a1">[1](#f1)</sup>
+
+## Top level overview
+
+The main entry point is `JRaftServerImpl`, which starts server node for handling RAFT messages.
+Responsble for managing one or many RAFT replication groups, see `NodeImpl`.
+
+A RAFT node represents a single group node, which can be voting or non voring (so called learner).
+
+## Threading model
+
+The implementation uses several thread pools and threads for different purposes.
+
+Each node can work in shared pools mode or start it's dedicated set of pools.
+Then using many groups it's recommended to use shared mode, otherwise threads count may be too big.
+
+Shared pools can be passed to `NodeOptions` as parameter values.
+
+Currently following pools are used:
+
+### JRaft-Common-Executor
+A pool for processing short-lived asynchronous tasks.
+Should never be blocked.
+
+### JRaft-Node-Scheduler
+A scheduled executor for running delayed or repeating tasks.
+
+### JRaft-Request-Processor
+A default pool for handling RAFT requests.
+Should never be blocked.
+
+### JRaft-Response-Processor
+A default pool for handling RAFT responses.
+Should never be blocked.
+
+### JRaft-AppendEntries-Processor
+A pool of single thread executors.
+Used only if a replication pipelining is enabled. 
+Handles append entries requests and responses (used by the replication flow). 
+Threads are started on demand.
+Each replication pair (leader-follower) uses dedicated single thread executor from the pool, so all messages 
+between replication peer pairs are processed sequentially.
+
+### NodeImpl-Disruptor
+A striped disruptor for batching FSM user tasks.

Review comment:
       ```suggestion
   A striped disruptor for batching FSM (finite state machine) user tasks.
   ```

##########
File path: modules/raft/README.md
##########
@@ -0,0 +1,76 @@
+# Ignite module for RAFT (Reliable, Replicated, Redundant, And Fault-Tolerant) protocol implementation.
+
+This module contains a fork of a JRaft project <sup id="a1">[1](#f1)</sup>
+
+## Top level overview
+
+The main entry point is `JRaftServerImpl`, which starts server node for handling RAFT messages.
+Responsble for managing one or many RAFT replication groups, see `NodeImpl`.
+
+A RAFT node represents a single group node, which can be voting or non voring (so called learner).
+
+## Threading model
+
+The implementation uses several thread pools and threads for different purposes.
+
+Each node can work in shared pools mode or start it's dedicated set of pools.
+Then using many groups it's recommended to use shared mode, otherwise threads count may be too big.
+
+Shared pools can be passed to `NodeOptions` as parameter values.
+
+Currently following pools are used:

Review comment:
       ```suggestion
   Currently, the following pools are used:
   ```

##########
File path: modules/raft/README.md
##########
@@ -0,0 +1,76 @@
+# Ignite module for RAFT (Reliable, Replicated, Redundant, And Fault-Tolerant) protocol implementation.
+
+This module contains a fork of a JRaft project <sup id="a1">[1](#f1)</sup>
+
+## Top level overview
+
+The main entry point is `JRaftServerImpl`, which starts server node for handling RAFT messages.
+Responsble for managing one or many RAFT replication groups, see `NodeImpl`.
+
+A RAFT node represents a single group node, which can be voting or non voring (so called learner).
+
+## Threading model
+
+The implementation uses several thread pools and threads for different purposes.
+
+Each node can work in shared pools mode or start it's dedicated set of pools.
+Then using many groups it's recommended to use shared mode, otherwise threads count may be too big.
+
+Shared pools can be passed to `NodeOptions` as parameter values.
+
+Currently following pools are used:
+
+### JRaft-Common-Executor
+A pool for processing short-lived asynchronous tasks.
+Should never be blocked.
+
+### JRaft-Node-Scheduler
+A scheduled executor for running delayed or repeating tasks.
+
+### JRaft-Request-Processor
+A default pool for handling RAFT requests.
+Should never be blocked.
+
+### JRaft-Response-Processor
+A default pool for handling RAFT responses.
+Should never be blocked.
+
+### JRaft-AppendEntries-Processor
+A pool of single thread executors.
+Used only if a replication pipelining is enabled. 

Review comment:
       Probably we need to add more info about replication pipelining

##########
File path: modules/raft/README.md
##########
@@ -0,0 +1,76 @@
+# Ignite module for RAFT (Reliable, Replicated, Redundant, And Fault-Tolerant) protocol implementation.
+
+This module contains a fork of a JRaft project <sup id="a1">[1](#f1)</sup>
+
+## Top level overview
+
+The main entry point is `JRaftServerImpl`, which starts server node for handling RAFT messages.
+Responsble for managing one or many RAFT replication groups, see `NodeImpl`.
+
+A RAFT node represents a single group node, which can be voting or non voring (so called learner).
+
+## Threading model
+
+The implementation uses several thread pools and threads for different purposes.
+
+Each node can work in shared pools mode or start it's dedicated set of pools.
+Then using many groups it's recommended to use shared mode, otherwise threads count may be too big.

Review comment:
       ```suggestion
   When using many groups it's recommended to use shared mode, otherwise, threads count may be too big.
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org