Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
diPhantxm committed Aug 29, 2023
1 parent 485329a commit 6082496
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions docs/Coordinator.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ psql "host=localhost port=7002 dbname=spqr-console"

Then, run `SHOW routers;`. Coordinator will reply with list of knows router in current spqr installation

Coordinator is run with each router, but only one coordinator is running at the time while others wait.

## Data Balancing

We considered different options for moving data. The most popular way is to make a copy via logical replication, then delete half of the data on one node and delete another half of the data on the other node. We decided that logical replication does not work well enough yet. Instead, the coordinator makes ε-split - cut off a small part of the data. Since it is small, it all works very quickly.
Expand Down
7 changes: 4 additions & 3 deletions docs/Router.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

![Router schema](router.jpg "Router")

Consist of 3 parts:
Consist of 4 parts:
- Router - an app that works by PostgreSQL protocol. It receives a SQL query, parses it, and decides to which shard it should be sent. Then returns the query response.
- Admin Console - an app that works by PostgreSQL protocol. There you can see available shards with `SHOW SHARDS` and manage sharding rules with `CREATE SHARDING RULE` and `ADD KEY RANGE` commands.
- GRPC API - an app that works by GRPC protocol. It will also be used for managing sharding rules, WIP.
- [Coordinator](Coordinator.md)

## Query Path

Expand Down Expand Up @@ -46,7 +47,7 @@ Client's TLS config, see [tls config description](#tls-config-description) secti
### frontend_rules

| **Name** | **Description** |
| ------------------------- |---------------------------------------------------------------------|
| ------------------------- | ------------------------------------------------------------------- |
| `db` | the database to connect to |
| `usr` | the username with to connect |
| `auth_rule` | authentication method, see [Authentication.md](./Authentication.md) |
Expand Down Expand Up @@ -76,7 +77,7 @@ Client's TLS config, see [tls config description](#tls-config-description) secti
| `usr` | the username with to connect |
| `pwd` | the username's password |
| `hosts` | list of data shard hosts in `host:port` format |
| `type` | can be `DATA` or `WORLD`, see World |
| `type` | can be `DATA` or `WORLD`, see World |
| `tls` | server's TLS config, see [TLS config description](#tls-config-description) section |

### tls config description
Expand Down

0 comments on commit 6082496

Please sign in to comment.