DEV Community

Discussion on: How do You Structure Your Code When Moving Your API from Express to Serverless Functions?

Collapse
 
_mhoeger profile image
Marie H • Edited

First, I have to apologize because I'm not too familiar with working with MS SQL databases!

Could you connect to your databases with a SqlConnection within your serverless function though? This documentation refers to some things to do to avoid connection limitations from SqlClient connections.

Another thing to keep in mind is that sometimes serverless functions scale too much for a database and hammer a non-scaling database with requests. To address those concerns, you can configure HTTP behavior and impose limits on function app scale out. Even if you constrain scale, you'll still receive the benefits of serverless :)