This is the presentation I used at Microsoft Startup Bootcamp to cover a Serverless app development approach on Azure including various tools but primarily focusing on Azure Functions and Azure API Management.
Serverless != Microservices • You can have a fleet of EC2 instances, running containers, orchestrating and still worry about infrastructure. • You can have dozens of functions tightly coupled and delivered as a behemoth.
Where? • Azure Public Cloud • Azure Arc everywhere (AWS, GCP, On-Prem) • Wherever you have Kubernetes through KEDA • Self scale with custom containers. • On my machine!
Billing Model? • Consumption Plan • Execution Time GB-s • Execution Count • Premium Plan • VNet Access • vCPU / Second (Min 1) • Memory Allocated (Second) • Functions on Kubernetes – Kind of Free • Functions in App Service Plan – Kind of Free
Function Triggers and Bindings • A trigger defines how a function is invoked. • Triggers have associated data, which is usually the payload that triggered the function. • Input and output bindings provide a declarative way to connect to data from within your code.
What you can do with timer triggers? • Run at explicitly specified intervals, like every day at 2:00 am using CRON expressions, like “0 */5 * * * *“ (every 5 minutes) • Can send information to other systems, but typically don’t “return” information, only write to logs • Great for redundant cleanup and data management • Great for checking state of services • Can be combined with other functions
Problem 1 : Function Chaining • No visualization to show relationship between functions and queues. • Middle queues are an implementation detail – conceptual overhead. • Error handling adds a lot more complexity.
Problem 2 : Fan-out/Fan-in • Fanning-out is easy, but fanning-in is more complicated. • Functions offers no help with this scenario today • All the same problems of the previous pattern
Eventing! Event Hub • Receiver polls • Retention up to 7 days • Ability to playback • Big data guy. • Low latency • At least once delivery Event Grid • Sends HTTP to receiver • Distributes (dead-lettering optional, 1 day retry) • No delivery order guarantee • Deeply integrated into Azure. • At least once delivery • Low cost • Serverless
Messaging • Service Bus on stage! • Reliable asynchronous message delivery • Requires polling • FIFO, transactions, routing, duplicate detection and so on.