SessionPoolOptions
Index
Properties
optionalcreateSessionFunction
optionalid
Unique identifier for this session pool instance. Used to generate a unique
persistence key when persistStateKey is not provided.
If not provided, an auto-incrementing ID is used.
optionalmaxPoolSize
Maximum size of the pool. Indicates how many sessions are rotated.
optionalpersistenceOptions
Control how and when to persist the state of the session pool.
optionalpersistStateKey
Session pool persists its state under this key in Key value store.
optionalpersistStateKeyValueStoreId
Name or Id of KeyValueStore where is the SessionPool state stored.
optionalsessionOptions
The configuration options for Session instances.
optionalsessionReuseStrategy
Strategy for picking sessions from the pool.
'random'(default): fills the pool up tomaxPoolSize, then picks a random usable session'round-robin': fills the pool up tomaxPoolSize, then reuses sessions cycling through them in order'use-until-failure': always reuses the same session until it is retired, then moves to the next one
Custom function that should return a
Sessioninstance, or a promise resolving to such instance. Any error thrown from this function will terminate the process. Receives{ sessionOptions }already merged from the pool-wide defaults and the per-call overrides.