The main advantage of serverless architecture is said to be that such programs do not need a dedicated server to run continuously. Then are invoked on a request and stop on exiting the function.
This means that a serverless program will have to be quick to start, for being responsive. How does then it handles time consuming actions such as database connection? Does it connect to database everytime or does it manage the database connection separately to function invocations like it is done in server applications?