Won't it take time for the server to first connect to the Mongodb server and then fetch data.
Is there any way by which we are connected to the Mongodb server forever and when request will be sent to it. It just has to fetch the data and return to the nextjs server function.