Skip to content

Commit

Permalink
doc: Sharding vs partitioning (#570)
Browse files Browse the repository at this point in the history
  • Loading branch information
patriknw authored and johanandren committed May 27, 2024
1 parent eb885a5 commit 3858de2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions docs/src/main/paradox/data-partition.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Data partitioning
# Database sharding

Using a single non-distributed database can become a bottleneck for applications that have high throughput
requirements. To be able to spread the load over more than one database the event journal, snapshot store and
Expand All @@ -13,7 +13,8 @@ A data partition corresponds to a separate database table. For example, 4 data p
and (768 to 1023) to data partition 3.

Number of data partitions must be between 1 and 1024 and a whole number divisor of 1024 (number of slices), e.g.
2, 4, 8, 16. The tables will have the data partition as suffix, e.g. event_journal_0, event_journal_1.
2, 4, 8, 16. Each data partition corresponds to a database table. The tables will have the data partition as suffix,
e.g. event_journal_0, event_journal_1.

Those tables can be located in physically separate databases. Number of databases must be a whole number divisor
of number of partitions, and less than or equal to number of partitions. For example, 8 data partitions and 2 databases
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/paradox/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The Akka Persistence R2DBC plugin allows for using SQL database with R2DBC as a
* [PostgreSQL JSON](postgres_json.md)
* [Projection](projection.md)
* [Configuration](config.md)
* [Data partitioning](data-partition.md)
* [Database sharding](data-partition.md)
* [Cleanup tool](cleanup.md)
* [Migration tool](migration.md)
* [Migration Guide](migration-guide.md)
Expand Down

0 comments on commit 3858de2

Please sign in to comment.