Why Azure function class is static by default?
public static async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "get")] HttpRequest req,
ILogger log)
Is it because, Azure function based out of serverless architecture, using static or single class instance should result in saving compute resources? or 'static' decision is made for any other technical reasons?
I know Azure function class can be non-static as well from 2019 onwards but here my question is different what is Microsoft's technical decision behind, declaring the Azure function class as static by default. Knowing this reason or justification would be helpful in my software designing as well. Curious.
Again re-iterating my question as some of the folks answering Azure function class can also be non-static. My question is NOT whether Azure function class can be non-static? but why it is declared as static by default?