Building a Serverless API with Azure Functions

What to expect from this workshop
-
Setting common understanding
-
What, Why and How
-
- Demo
- Explore the Demo Project
- Create Azure Serverless services
- Azure Functions,CosmosDb, APIM
- Recreate the Demo project
- Download and Run Angular17 template
- Add Azure Functions App to project
- Deploy Azure functions from VS code
- Secure the endpoints using APIM
- Q & A

Ryan Niño Dizon

linkedin.com/in/ryanninodizon

sessionize.com/ryanninodizon

youtube.com/@LearnWithJon

medium.com/@ryanninodizon

github.com/ryannninodizon
Evolution of Computing
Physical Server
Virtual Machines
2.
PaaS
3.
Containerization
4.
Serverless
5.
1.
What is Serverless
No infrastructure management
Using fully managed services enables developers to avoid administrative tasks and focus on core business logic. With a serverless platform, you simply deploy your code, and it runs with high availability.
Dynamic scalability
With serverless computing, the infrastructure dynamically scales up and down within seconds to match the demands of any workload.
Faster time to market
Serverless applications reduce the operations dependencies on each development cycle, increasing development teams’ agility to deliver more functionality in less time.
More efficient use of resources
Shifting to serverless technologies helps organizations reduce Total Cost of Ownership (TCO) and reallocate resources to accelerate the pace of innovation.
What is Serverless
Serverless Computing vs. Traditional Computing
backend/service/api


{Id:123,Name:"Ryan",LastName:"Dizon"}
backend/service/api
{Id:123,Name:"Ryan",LastName:"Dizon"}
(Runtime: 100ms)
(Uptime: 72h)
Azure Function Apps

Events

Code

Output
Azure Function Apps


Web/Mobile Apps Backends

Scheduled Task Automations

Workflows and Orchestrations

IoT Connected Backends

Stream Processing

Machine Learning
FaaS is at the center of serverless
Single Responsibility
Functions are simple, reusable bits of code that do a specific job, take an input and give back a result.
Short-Lived
Functions don't stay after they finish doing their job, making resources available for more tasks.
Stateless
Functions don't remember things or depend on what other tasks are doing.
Event-driven and scalable
Functions react to set events and quickly make copies as many times as necessary.
Workflow and orchestration with Durable Functions






Manageable sequencing
External events correlation
Process Monitoring
Fanning out and fanning in
Http-based async long-running APIs
Human Interaction
Function Chaining/sequencing

Fan out/fan in

Evolution of .NET on Functions
- Bind to new types from the latest Azure SDKs
- You own main() and all dependencies
- Improved reliability
- Modernized .NET model
- Rich dependency injection
- Invocation middleware
- Better extensibility
- Performance gains
- OpenTelemetry support
- Deeper ASP.NET integration
- more to come
https://github.com/Azure/Azure-Functions
Azure Function is open-source
Retirements
-
Support for .NET 6 ends on Nov 12, 2024
-
Support for .NET 7 ends on May 14, 2024
-
Support for the in-process model for .NET apps in Azure Functions ends on Nov 10, 2026
-
Update to Azure Functions Service Bus externsions v5.x by 31 March 2025 for continued support
https://aka.ms/Azure/AzureFunctionsNews
Hosting Plans
Consumption Plan
Event-driven scaling(to zero)
Only pay for what you use
Premium Plan
Event-driven scaling
Pre-warmed instances
Additional networking options
App Service Plan
CPU/memory scaling
Always on
Additional networking options
App Service Environment
CPU/memory scaling
Always on
Most robust netwrorking options and isolation
Add Azure SDK Tools

Let's start creating Serverless API!

{DEMO}
-
- Explore the Demo Project
- Create Azure Serverless services
- Azure Functions,CosmosDb, APIM
- Recreate the Demo project
- Download and Run Angular17 template
- Add Azure Functions App to project
- Deploy Azure functions from VS code
- Secure the endpoints using APIM
Building Serverless API with Azure Function
By Ryan Niño Dizon
Building Serverless API with Azure Function
- 5