Skip to content

Commit c8f4371

Browse files
Merge pull request #392 from HarperFast/sharded-config
Add information on using sharded setting in replication databases
2 parents 0cf1023 + 0f7df27 commit c8f4371

File tree

4 files changed

+56
-12
lines changed

4 files changed

+56
-12
lines changed

docs/deployments/configuration.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,13 +458,24 @@ The URL of the current Harper instance.
458458

459459
`databases` - _Type_: string/array; _Default_: "\*" (all databases)
460460

461-
Configure which databases to replicate. This can be a string for all database or an array for specific databases.
461+
Configure which databases to replicate. This can be a string for all database or an array for specific databases. The list can be a simple array of database names:
462462

463463
```yaml
464464
replication:
465465
databases:
466-
- db1
467-
- db2
466+
- system
467+
- data
468+
- mydb
469+
```
470+
471+
The database list can also specify databases that are purely "sharded" databases. For databases that are marked as sharded, replication will _only_ create database subscription connections to nodes in the same shard. Sharding can still function without this setting, since the residency location for sharding can be determined for each table or each record. However, using this setting will reduce the overhead of connections in situations where all data is uniformly sharded, creating a simpler and more efficient replication topology. To mark databases as sharded, you can specify a list of databases with a `name` and `sharded` flag:
472+
473+
```yaml
474+
replication:
475+
databases:
476+
- name: system
477+
- name: data
478+
sharded: true
468479
```
469480

470481
`routes` - _Type_: array;

versioned_docs/version-4.5/deployments/configuration.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,13 +230,24 @@ The URL of the current Harper instance.
230230

231231
`databases` - _Type_: string/array; _Default_: "\*" (all databases)
232232

233-
Configure which databases to replicate. This can be a string for all database or an array for specific databases.
233+
Configure which databases to replicate. This can be a string for all database or an array for specific databases. The list can be a simple array of database names:
234234

235235
```yaml
236236
replication:
237237
databases:
238-
- db1
239-
- db2
238+
- system
239+
- data
240+
- mydb
241+
```
242+
243+
The database list can also specify databases that are purely "sharded" databases. For databases that are marked as sharded, replication will _only_ create database subscription connections to nodes in the same shard. Sharding can still function without this setting, since the residency location for sharding can be determined for each table or each record. However, using this setting will reduce the overhead of connections in situations where all data is uniformly sharded, creating a simpler and more efficient replication topology. To mark databases as sharded, you can specify a list of databases with a `name` and `sharded` flag:
244+
245+
```yaml
246+
replication:
247+
databases:
248+
- name: system
249+
- name: data
250+
sharded: true
240251
```
241252

242253
`routes` - _Type_: array;

versioned_docs/version-4.6/deployments/configuration.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,13 +230,24 @@ The URL of the current Harper instance.
230230

231231
`databases` - _Type_: string/array; _Default_: "\*" (all databases)
232232

233-
Configure which databases to replicate. This can be a string for all database or an array for specific databases.
233+
Configure which databases to replicate. This can be a string for all database or an array for specific databases. The list can be a simple array of database names:
234234

235235
```yaml
236236
replication:
237237
databases:
238-
- db1
239-
- db2
238+
- system
239+
- data
240+
- mydb
241+
```
242+
243+
The database list can also specify databases that are purely "sharded" databases. For databases that are marked as sharded, replication will _only_ create database subscription connections to nodes in the same shard. Sharding can still function without this setting, since the residency location for sharding can be determined for each table or each record. However, using this setting will reduce the overhead of connections in situations where all data is uniformly sharded, creating a simpler and more efficient replication topology. To mark databases as sharded, you can specify a list of databases with a `name` and `sharded` flag:
244+
245+
```yaml
246+
replication:
247+
databases:
248+
- name: system
249+
- name: data
250+
sharded: true
240251
```
241252

242253
`routes` - _Type_: array;

versioned_docs/version-4.7/deployments/configuration.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,13 +303,24 @@ The URL of the current Harper instance.
303303

304304
`databases` - _Type_: string/array; _Default_: "\*" (all databases)
305305

306-
Configure which databases to replicate. This can be a string for all database or an array for specific databases.
306+
Configure which databases to replicate. This can be a string for all database or an array for specific databases. The list can be a simple array of database names:
307307

308308
```yaml
309309
replication:
310310
databases:
311-
- db1
312-
- db2
311+
- system
312+
- data
313+
- mydb
314+
```
315+
316+
The database list can also specify databases that are purely "sharded" databases. For databases that are marked as sharded, replication will _only_ create database subscription connections to nodes in the same shard. Sharding can still function without this setting, since the residency location for sharding can be determined for each table or each record. However, using this setting will reduce the overhead of connections in situations where all data is uniformly sharded, creating a simpler and more efficient replication topology. To mark databases as sharded, you can specify a list of databases with a `name` and `sharded` flag:
317+
318+
```yaml
319+
replication:
320+
databases:
321+
- name: system
322+
- name: data
323+
sharded: true
313324
```
314325

315326
`routes` - _Type_: array;

0 commit comments

Comments
 (0)