Hello. I don’t understand how the “numHistoryShards” configuration works.
E.g:
persistence:
defaultStore: mysql
visibilityStore: mysql
numHistoryShards: 5
datastores:
mysql-default:
sql:
....
How can I setup multiple db for it?
I found example for cadence, but this is not suitable for temporal.io.
persistence:
...
datastores:
datastore1:
sql:
pluginName: "mysql" -- name of the go sql plugin
connectProtocol: "tcp" -- connection protocol, tcp or anything that SQL Data Source Name accepts
maxConnLifetime: "1h" -- max connection lifetime before it is discarded (optional)
useMultipleDatabases: true -- this enabled the multiple SQL databases as sharded SQL cluster
nShards: 4 -- the number of shards -- in this mode, it needs to be greater than one and equalt to the length of multipleDatabasesConfig
multipleDatabasesConfig: -- each entry will represent a shard of the cluster
- user: "root"
password: "cadence"
connectAddr: "127.0.0.1:3306"
databaseName: "cadence0"
- user: "root"
password: "cadence"
connectAddr: "127.0.0.1:3306"
databaseName: "cadence1"
- user: "root"
password: "cadence"
connectAddr: "127.0.0.1:3306"
databaseName: "cadence2"
- user: "root"
password: "cadence"
connectAddr: "127.0.0.1:3306"
databaseName: "cadence3"