Page 1 of 1

Faas Best Practices:

Posted: Sat Apr 19, 2025 6:05 am
by bithee975
1- Reuse connections (HTTP, database, etc.) that were established in previous function calls. 2- Use environment variables to pass parameters to the function. For example, to configure access to storage. 3- Have control over your function's libraries, avoid belarus mobile database and updates that change some behavior. 4- Reduce the complexity of dependencies, prefer simple and fast-loading frameworks. 5- Avoid recursive code (the function calling itself), because of the risk of loss of control in function calls.
Some critical points of FaaS:
Below, we highlight the critical points of using FaaS, so that it is clear whether its use is strategic for the business, even with some obstacles: 1- Being tied to a single cloud provider, since the companies we mentioned provide the FaaS implementation as they see fit and changing clouds can be complicated. 2- “Cold Start” phenomenon in which a function takes a long time to start responding. This occurs in two situations. When you have just published or updated a function, because the cloud is bringing up the execution environment. In the second case, your function has not had any calls for a long time and the execution environment ended up being closed by the cloud provider. 3- You pay per call - the good side of the low price in Production, can end up being a high price during Development, Testing and Homologation, because you are paying for each call in the same way. 4- Each provider chooses how the logs will be collected or displayed and may have a hidden cost for using monitoring services. FaaS is promising, as it diversifies the options for improving application development. In a future article, we will discuss another view of the FaaS model linked to Docker. Follow our blog and stay up to date with the latest news.