Yes.  A new server will load the latest snapshot and the logs.  It will
then talk to the leader in order to catch up the remaining logs.  Of
course, we have to set up the configuration and start the server manually.
Tsz-Wo

On Fri, Nov 19, 2021 at 1:13 AM Asad Awadia <[email protected]> wrote:

> Ok ok yes that makes sense.
>
> One more thing around adding servers
>
>
> 1. When adding a new server - what is the process? Will it load the state
> snapshot and start iterating over the log automatically? Anything manually
> required?
>
> Thanks for all the help!
>
> Asad
>
> ------------------------------
> *From:* Tsz Wo Sze <[email protected]>
> *Sent:* Thursday, November 18, 2021 10:12:48 AM
> *To:* [email protected] <[email protected]>
> *Subject:* Re: Replication factor
>
> 1. Yes.  In Ratis, we have a BlockingApi and an AsyncApi; see
> https://github.com/apache/ratis/blob/master/ratis-client/src/main/java/org/apache/ratis/client/api/
> .  The send(Message message) method is for "write".  The client will get a
> succeeded reply only after the message has been replicated to a majority of
> servers and has been committed by the leader.
>
> 2. Yes and yes.  The sendReadOnly(Message message) method is for "read".
> It will read from the leader so that we have strong consistency.
>
> Thanks for your questions.
> Tsz-Wo
>
>
> On Thu, Nov 18, 2021 at 7:48 PM Asad Awadia <[email protected]> wrote:
>
> Thanks,  yes that helps.
>
> Few more questions around read/write semantics:
>
> 1. Writes are acknowledged to the client when committed to majority?
>
> 2. Are reads via the query method strongly consistent? Do they get routed
> to the leader transparently?
>
> Regards,
> Asad
> ------------------------------
> *From:* Tsz Wo Sze <[email protected]>
> *Sent:* Wednesday, November 17, 2021, 7:18 p.m.
> *To:* [email protected]
> *Subject:* Re: Replication factor
>
> Hi Asad,
>
> Yes, you are right.  Replication factor is the same as the number of
> members (servers) in a Raft group since each member has a copy of the
> states.  To change the replication factor, change the number of the members.
>
> Hope it helps.
> Tsz-Wo
>
>
> On Thu, Nov 18, 2021 at 5:49 AM Asad Awadia <[email protected]> wrote:
>
> Apache Ratis - In Search of a Usable Raft Library
> <https://www.slideshare.net/TszWoNicholasSze/apache-ratis-in-search-of-a-usable-raft-library>
> slide 9/23 it talks about membership changes and replication factor.
>
> How is the replication factor configured? I don't see any functions or
> mention of that? Only on the watch rpc.
>
> Is replication factor how many servers should keep a copy of the data? Is
> my understanding correct? Or is this something completely different?
>
> Thank you for all the work! I am really looking forward to using this
> project.
>
> Regards,
> Asad
>
>
>

Reply via email to