Hi Павел,

> ...  Is there a way (or API) to direct request to follower instance of
ratis cluster and only to one instance?

Ratis is an implementation of Raft for replicated state machines.  As the
name suggested, the  state machines are supposed to be replicated.  If the
question is to change the state only in one of the state machines but not
the others, then the answer is no --  Ratis does not support it.

For administrative operations, we do have CLI/API to get/change the server
state (not the state machine state).  For examples, we may trigger creating
a snapshot in a particular server, changing leader, etc.

- CLI:
https://github.com/apache/ratis/blob/master/ratis-docs/src/site/markdown/cli.md
- API:
https://github.com/apache/ratis/blob/master/ratis-common/src/main/java/org/apache/ratis/protocol/AdminProtocol.java

> My case: leader of cluster assign some job to one of followers of raft
cluster. In other words I want to send message to one of follower (and only
one) from leader. Have I a way to do it?

What kind of jobs?  You may need a separated mechanism to do so.

In Apache Ozone, the datanodes form Ratis groups for accepting write
requests and replicating them using Raft.  At the same time, datanodes have
different services to handle other requests from Ozone's SCM (Storage
Container Manager).

Please feel free to let us know if you have more questions.

Tsz-Wo



> From: "Павел Шелогуров" <[email protected]>
> To: [email protected]
> Cc:
> Bcc:
> Date: Thu, 30 Jan 2025 09:32:00 +0300
> Subject: How Apache Ratis work
> Hello!
> I investigate to how works apche ratis and have a question. Is there a way
> (or API) to direct request to follower instance of ratis cluster and only
> to one instance?
> My case: leader of cluster assign some job to one of followers of raft
> cluster. In other words I want to send message to one of follower (and only
> one) from leader. Have I a way to do it?
>

Reply via email to