Azure Functions are very productive, but they have trade-offs worth knowing. Cold starts - On the Consumption plan, idle apps scale to zero, so the first request after inactivity can take seconds (more for large .NET apps). - Mitigations: the Flex Consumption plan with always-ready instances, the Premium plan with pre-warmed instances, a Dedicated (App Service) plan, smaller dependencies, and the isolated worker model with ReadyToRun compilation. Execution time limits - The Consumption plan defaults to 5 minutes and allows up to 10. HTTP triggers must respond within about 230 seconds because of the load balancer timeout, whatever the plan. - Long work needs Durable Functions, queue-based chunking, or Premium/Dedicated plans with longer or unlimited timeouts. Scaling surprises - Aggressive scale-out can overwhelm downstream databases or APIs (connection limits, rate limits). Control it with maximum instance counts, host.json concurrency settings and batch sizes. - Scaling decisions for some triggers lag behind sudden spikes. Statelessness and connections - No local state between invocations; use Durable Functions, storage or caches. - Creating HttpClient or database clients per invocation exhausts sockets; use static or DI-registered clients. Debugging and observability - Distributed, event-driven flows are harder to trace; you need Application Insights with good correlation. - Local emulation of triggers (Service Bus, Event Hubs) requires extra setup. Platform and versioning - Migration from the in-process model to the isolated worker model (in-process support ends in November 2026) took effort in many projects. - Bindings simplify code but hide details and can be limiting; sometimes using SDKs directly is clearer. Cost and networking - At constant high load, a Function App may cost more than a container or App Service. - VNet integration and private endpoints require Premium or Flex Consumption plans. Retries and duplicates - Triggers deliver at least once; functions must be idempotent, and poison messages need handling. In an interview, pick one or two you actually met — for example cold starts on an HTTP API, or a database overwhelmed by scale-out — and explain how you fixed them.
Ravindra Wadile · · 0 likes