In several places (1, 2) I find the following statement as to why I should use the pool package (https://github.com/rstudio/pool) to manage my database connections in a Shiny app:
Opening only one connection per app … cannot handle simultaneous requests (e.g. two sessions open, both querying the database at the same time);
My understanding of shiny apps is that they run in a single-threaded R process, hence there can never be two requests at the same time. Do I miss something here? Why would I want a pool of multiple connections per app if only a single one is used at any time anyways?
(I understand that a pool with a single connection may still be useful as the pool package handles automatic re-connection in case the connection drops.)
-- Thanks, David