Skip to content

Commit 479cbe3

Browse files
authored
doc: Clarification of sharding vs partitioning (#576)
1 parent f0a5759 commit 479cbe3

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

docs/src/main/paradox/data-partition.md

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ Using a single non-distributed database can become a bottleneck for applications
44
requirements. To be able to spread the load over more than one database the event journal, snapshot store and
55
durable state can be split up over multiple tables and physical backend databases.
66

7+
Without any application-level concerns or specific sharding features in the databases the R2DBC plugin has support for:
8+
9+
* database partitioning - vertical database scalability by multiple tables in one physical database
10+
* database sharding - horizontal database scalability by distributing the data across multiple physical databases
11+
712
The data is partitioned by the slices that are used for @ref[`eventsBySlices`](query.md#eventsbyslices) and
813
@extref:[Projections](akka-projection:r2dbc.html). Events are grouped into slices based on a deterministic hash of the persistence identifier of the entity that emitted the event. There are 1024 slices, from 0 to 1023. A projection instance consumes events from a range of slices. For example, running 4 Projection instances the slice ranges would be 0-255, 256-511, 512-767, 768-1023. Changing to 8 slice ranges means that the ranges would be 0-127, 128-255, 256-383, …, 768-895, 896-1023.
914

docs/src/main/paradox/getting-started.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -208,4 +208,4 @@ H2 runs in the JVM process, either using a database directly in memory or in a l
208208

209209
The database for H2 is created on first connection. Additional database schema creation or changes can be applied using the setting `additional-init` setting.
210210

211-
Note that it is not possible to share the file based database storage between processes, usage in an Akka cluster is not possible. For other usages where several processes may run at the same time (for example a CI server) it is important to make sure each new process will use a separate file not shared with other processes.
211+
Note that it is not possible to share the file based database storage between processes, usage in an Akka cluster is not possible. For other usages where several processes may run at the same time (for example a CI server) it is important to make sure each new process will use a separate file not shared with other processes.

0 commit comments

Comments
 (0)