supertokens-core
supertokens-core copied to clipboard
Set the default thread pool size based on number of cores in the system
- Also consider number of virtual cores?
- Does this affect the db connection pool size as well?
setting based on number of cores would lead to oversizing the DB connection pool size. DB connection pool size is to be configured based on connection usage, which is dependent on active-number of users.
So this is the setting of the connection pool size on each core instance. We use apache tomcat, which means that each request is served on a new thread. The size of that thread pool should be = to the number of (virtual) cores in the system. Since each request uses just one connection to the db, it then implies that the connection pool size should also be equal to the number of (virtual) cores.
Would this be accurtate? Or am I missing something? :)