Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blog: Raft algorithm #16

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Blog: Raft algorithm #16

wants to merge 2 commits into from

Conversation

duchh-manabie
Copy link
Contributor

I introduce about Consensus algorithm, Raft's properties and some way Raft do to achieve consistency.


#### **1. Consensus algorithm**

Consensus algorithm means you have a cluster node, you want all of the nodes in the cluster to have the same information, data,...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could mention here some tech that uses raft. From what I can figure out: NATS, Elasticsearch, and Etcd are some I think

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence has poor grammar, can you improve this? "concensus algirhtm means" "same imformation, data..."

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consensus
noun [ S or U ]
UK /kənˈsen.səs/ US /kənˈsen.səs/

C2
a generally accepted opinion or decision among a group of people:
The general consensus in the office is that he can't do his job.
Could we reach a consensus on this matter? Let's take a vote.

#### **1. Consensus algorithm**

Consensus algorithm means you have a cluster node, you want all of the nodes in the cluster to have the same information, data,...
In order to do that, Consensus applies a mechanism in the cluster we will have one server Leader, it has mission replicate data for
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consensus can not do things. consensus is a state of agreement.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leader is not a proper noun. 'leader' is better, and you can bold it for emphasis.


Consensus algorithm means you have a cluster node, you want all of the nodes in the cluster to have the same information, data,...
In order to do that, Consensus applies a mechanism in the cluster we will have one server Leader, it has mission replicate data for
all of other servers in the cluster. Another thing Consensus algorithm guarantee available for the cluster, for example, when sever Leader
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'consensus algorithms'
'guarantee is'
'cluster availability'
'when the server leader'

Consensus algorithm means you have a cluster node, you want all of the nodes in the cluster to have the same information, data,...
In order to do that, Consensus applies a mechanism in the cluster we will have one server Leader, it has mission replicate data for
all of other servers in the cluster. Another thing Consensus algorithm guarantee available for the cluster, for example, when sever Leader
is crashed the cluster will have another server instead immediately. Consensus algorithm properties include: safety, availability, integrity.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'crashes'.
Is it actually immediately?

In order to do that, Consensus applies a mechanism in the cluster we will have one server Leader, it has mission replicate data for
all of other servers in the cluster. Another thing Consensus algorithm guarantee available for the cluster, for example, when sever Leader
is crashed the cluster will have another server instead immediately. Consensus algorithm properties include: safety, availability, integrity.
Consensus algorithm is usually used in distributed systems to solve some consensus issues.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this sentence can be removed and you can mention 'distributed systems' in the first sentences.

![alt](./images/master-slave.png)

#### **2. Raft algorithm**
Raft is algorithm for managing a replicated log of the form. Raft implements by first electing a server Leader, then giving the Leader complete
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'Raft is a consensus algorithm that uses a replicated log data structure'

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'Raft implements this by'


#### **2. Raft algorithm**
Raft is algorithm for managing a replicated log of the form. Raft implements by first electing a server Leader, then giving the Leader complete
responsibility for managing the replicated log. The Leader accepts log entries from client, replicate them on other servers, and tell servers
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'replicates them'
'and tells servers'
'to their state machines'


#### **2. Raft algorithm**
Raft is algorithm for managing a replicated log of the form. Raft implements by first electing a server Leader, then giving the Leader complete
responsibility for managing the replicated log. The Leader accepts log entries from client, replicate them on other servers, and tell servers
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'replicates them'
'and tells servers'
'to their state machines'

when it is safe to apply log entries to their state machine.

##### **2.1. Term**
* **Term** is a number marked for the period at the beginning of Leader voting until the vote is successful, the new Leader will manage
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'is a number marked for the period at the beginning of Leader voting until the vote is successful,'
Is difficult to undestand.

when it is safe to apply log entries to their state machine.

##### **2.1. Term**
* **Term** is a number marked for the period at the beginning of Leader voting until the vote is successful, the new Leader will manage
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'is a number marked for the period at the beginning of Leader voting until the vote is successful,'
Is difficult to undestand.

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