Skip to content

Commit

Permalink
docs: add architecture concept
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangxu19830126 committed Jul 26, 2017
1 parent d30f482 commit 93a4433
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 6 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ Use Elasticell as Redis. You can replace Redis with Elasticell to power your app
Grow Elasticell as your business grows. You can increase the capacity simply by adding more machines.

- __Strong consistent persistence storage__
You can think of Elasticell as a single-machine NoSQL which provide 7*24 service and has zero downtime. Elasticell put your data on multiple machines as replication without worrying about consistency. Elasticell makes your application use redis as a database and not just only the cache.
Elasticell put your data on multiple machines as replication without worrying about consistency. Elasticell makes your application use redis as a database and not just only the cache.

- __High availability__
All of the three components, PD, Cell and Proxy, can tolerate the failure of some instances without impacting the availability of the entire cluster.


## Roadmap

Expand Down
1 change: 1 addition & 0 deletions docs/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ This document defines the roadmap for Elasticell development.
- [x] Multi-Raft
- [x] Redis protocol
- [x] RocksDB
- [ ] Go,Java,Python redis lib
- [ ] Prometheus
- [ ] PD admin UI
- [ ] Index
40 changes: 40 additions & 0 deletions docs/architecture/concept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
## Concept
To better understand Elasticell’s architecture, you need to understand the Elasticell concept.

### Store
Store is a service that runs on a single disk. A store manage many cells, and provide data storage for cells, and dispatch messages to cells.

### Cell
A cell manage some data in range of [start, end), every cell has some replication on different stores, we called these replications Peer. All cell replications with has same id makes up a raft group. Cell's peer maybe scheduled by PD move to another store, or removed from the store.

A cell has three meta data:

1. ID, The uniquely identifies of a cell

2. Data range, Decide which data is managed by the cell

3. Peers, Cell replications

4. Epoch, The version of the cell, it will increase every time the peers changes or cell split

In the raft group, number of cell replications needs to be set an odd number. Usually it is recommended to set to 3 at least.

### PD (Placement Driver)
PD is the managing component of the entire cluster and is in charge of the following two operations:

1. Storing the metadata of the cluster such as the cell location of a specific key.

2. Scheduling and load balancing cells in the store cluster, including but not limited to data migration and Raft group leader transfer.

As a cluster, PD needs to be deployed to an odd number of nodes. Usually it is recommended to deploy to 3 online nodes at least.

### Proxy (optional component)
The Proxy server is used for proxy the read and write operation for external application. The proxy is in charge of the following three operations:

1. Sync cells metadata to local from PD

2. Receive read and write operation from external application, and forward these operations to the correct store according to metadata and the key.

3. Receive the response from the store, and forwarding it to the external application. Resynchronize the metadata from PD when an raft error occurs, and retry forward the operation.

The proxy is stateless and can be scaled.
18 changes: 18 additions & 0 deletions docs/architecture/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Architecture
To better understand Elasticell’s features, you need to understand the Elasticell architecture.

![architecture](../imgs/architecture.png)

The Elasticell has threee components: PD server, cell server, and proxy server.

### __Compatible with Redis protocol__
Use Elasticell as Redis. You can replace Redis with Elasticell to power your application without changing a single line of code in most cases([unsupport-redis-commands](./unsupport-command.md)).

### __Horizontal scalability__
Grow Elasticell as your business grows. You can increase the capacity simply by adding more machines.

### __Strong consistent persistence storage__
Elasticell put your data on multiple machines as replication without worrying about consistency. Elasticell makes your application use redis as a database and not just only the cache.

### __High availability__
All of the three components, PD, Cell and Proxy, can tolerate the failure of some instances without impacting the availability of the entire cluster.
Binary file modified docs/imgs/architecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 7 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@

Elasticell is a distributed NoSQL database with strong consistency and reliability.

- __Compatible with Redis protocol__
### __Compatible with Redis protocol__
Use Elasticell as Redis. You can replace Redis with Elasticell to power your application without changing a single line of code in most cases([unsupport-redis-commands](./unsupport-command.md)).

- __Horizontal scalability__
### __Horizontal scalability__
Grow Elasticell as your business grows. You can increase the capacity simply by adding more machines.

- __Strong consistent persistence storage__
You can think of Elasticell as a single-machine NoSQL which provide 7*24 service and has zero downtime. Elasticell put your data on multiple machines as replication without worrying about consistency. Elasticell makes your application use redis as a database and not just only the cache.
### __Strong consistent persistence storage__
Elasticell put your data on multiple machines as replication without worrying about consistency. Elasticell makes your application use redis as a database and not just only the cache.

### __High availability__
All of the three components, PD, Cell and Proxy, can tolerate the failure of some instances without impacting the availability of the entire cluster.
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pages:
- Quick Start: user-guide/quick-start.md
- Installation: user-guide/installation.md
- Configuation: user-guide/configuration.md
- Architecture:
- Architecture: architecture/index.md
- Concept: architecture/concept.md
- PD: architecture/pd.md
- Cell: architecture/cell.md
Expand Down

0 comments on commit 93a4433

Please sign in to comment.