Modern Azure applications rely heavily on serverless compute and event-driven messaging. Review these common Azure Serverless interview questions and answers.
1. How do Azure Functions hosting plans differ?
Answer: The Consumption (and Flex Consumption) plan scales automatically and bills per execution, with potential cold starts. The Premium plan provides pre-warmed instances, VNet integration, and longer timeouts. The Dedicated (App Service) plan runs Functions on existing App Service VMs for predictable billing or underutilized compute.
2. When should you choose Azure Functions vs. Azure Logic Apps?
Answer: Choose Azure Functions for code-first custom business logic, complex data processing, and developer-centric workflows. Choose Azure Logic Apps for visual, low-code orchestration connecting hundreds of SaaS and enterprise connectors (such as SAP, Salesforce, Teams, and SharePoint) out of the box.
3. How does Azure Event Grid differ from Azure Event Hubs?
Answer: Azure Event Grid is a reactive pub/sub event router for discrete state-change events (such as a new blob upload) with sub-second push delivery. Azure Event Hubs is a high-throughput big-data streaming ingestion pipeline designed to buffer millions of telemetry events per second for pull-based consumers.
4. What are Durable Functions, and when are they used?
Answer: Durable Functions extend Azure Functions to write stateful workflows in code using orchestrator and activity functions. They handle function chaining, fan-out/fan-in, async HTTP APIs, and human-interaction timeouts with automatic state checkpointing.
5. What role does Azure API Management (APIM) play in serverless architectures?
Answer: Azure API Management acts as a unified API gateway in front of Azure Functions, Container Apps, and backend services, providing rate limiting, OAuth/JWT validation, caching, request transformation, and a developer portal.

