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