make the number of connections configurable
This commit is contained in:
parent
41e910b57e
commit
3c1a727b6a
3 changed files with 14 additions and 5 deletions
|
@ -77,18 +77,23 @@ db:
|
|||
# # appear in their home timeline.
|
||||
# #
|
||||
# # (default 14)
|
||||
# sparseTimelineDays: 14
|
||||
# #sparseTimelineDays: 14
|
||||
#
|
||||
# # <queryLimit> determines the number of maximum rows read within one pagination.
|
||||
# # You may need to make [max_clustering_key_restrictions_per_query] larger for ScyllaDB
|
||||
# # if you want to set this value larger than 100.
|
||||
# # (default 100, max 5000, min 1)
|
||||
# queryLimit: 100
|
||||
# #queryLimit: 100
|
||||
#
|
||||
# # Credentials for authentication (leave blank if not needed)
|
||||
# #credentials:
|
||||
# # username: username
|
||||
# # password: password
|
||||
#
|
||||
# # Number of pooled connections per host
|
||||
# #connections:
|
||||
# # local: 2
|
||||
# # remote: 1
|
||||
|
||||
|
||||
# ┌─────────────────────┐
|
||||
|
|
|
@ -27,7 +27,11 @@ export type Source = {
|
|||
credentials?: {
|
||||
username: string;
|
||||
password: string;
|
||||
}
|
||||
};
|
||||
connections?: {
|
||||
local: number;
|
||||
remote: number;
|
||||
};
|
||||
};
|
||||
redis: {
|
||||
host: string;
|
||||
|
|
|
@ -29,8 +29,8 @@ function newClient(): Client | null {
|
|||
keyspace: config.scylla.keyspace,
|
||||
pooling: {
|
||||
coreConnectionsPerHost: {
|
||||
[types.distance.local]: 2,
|
||||
[types.distance.remote]: 1,
|
||||
[types.distance.local]: config.scylla.connections?.local || 2,
|
||||
[types.distance.remote]: config.scylla.connections?.remote || 1,
|
||||
},
|
||||
},
|
||||
requestTracker,
|
||||
|
|
Loading…
Reference in a new issue