Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Serverless API with Azure Functions

100 views

Published on

Presentation on deep dive into developing serverless REST API on Azure functions with a real-time example, explore tooling options, testing and deploying alongside a discussion on different ways of securing the APIs.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Serverless API with Azure Functions

  1. 1. Serverless API with Azure Functions Analben Mehta 14+ years of experience in designing and developing enterprise applications https://aanuwizard.com @aanuwizard
  2. 2. Agenda 1. What is Serverless? 2. Azure Functions – Intro 3. Demo – Hello World 4. Tooling options, test and deploy 5. Demo – Real-time app 6. Azure functions Proxies 7. Demo -Proxies 8. Securing azure functions 9. Serverless Mindset
  3. 3. What is Serverless?
  4. 4. Benefits of Serverless
  5. 5. Evolution of Application
  6. 6. Evolution of Application
  7. 7. Azure Functions Serverless code – triggered by events and bindings
  8. 8. Functions - Programming Model
  9. 9. Functions - Programming Model
  10. 10. Supported Bindings Type Service Trigger Input Output Timer/Schedule Azure Functions ✔ HTTP (REST or WebHook) Azure Functions ✔ ✔ Blob Storage Azure Storage ✔ ✔ ✔ Queues Azure Storage ✔ ✔ Tables Azure Storage ✔ ✔ NoSQL DB Azure CosmosDB ✔ ✔ ✔ Streams Azure Event Hubs ✔ ✔ Push Notifications Azure Notification Hubs ✔ Bot Framework(Preview) Azure Bot Service ✔ Twilio SMS Text Twilio ✔ SendGrid E-Mail SendGrid ✔ Excel Tables Microsoft Graph ✔ ✔ OneDrive Files Microsoft Graph ✔ ✔ Outlook E-Mail Microsoft Graph ✔ Microsoft Graph Events Microsoft Graph ✔ ✔ ✔ Auth Tokens Microsoft Graph ✔ (* The HTTP output binding requires an HTTP trigger.)
  11. 11. Supported Languages  Languages:  JavaScript, C#, F# scripting options such as Python, PHP, Bash, Batch, and PowerShell  Experimental support  .NET Core  Linux Containers  Java
  12. 12. Demo: Azure Function Demo – Getting Started
  13. 13. Functions pricing  Regular App Service plan  Consumption Plan Meter Price Free Grant (Per Month) Execution time* £0.000012/GB-s 400,000 GB-s Total executions* £0.15 per million executions 1 million executions
  14. 14. Azure Functions – Develop your way  Code directly in Azure portal  Code in Visual Studio 2017 15.5 or later Install “Azure Development” workload Includes tooling to create Azure Function projects and classes locally and publish Includes Azure CLI (Command Line Interface) which allow you to run and debug your functional locally. Azure Functions extension for Visual Studio Code
  15. 15. Azure Functions – Develop your way
  16. 16. Demo: Booking application – unit test, pre-compile and deploy
  17. 17. Why choose pre-compiled functions? Develop, debug and test locally Better performance when starting cold.
  18. 18. Azure Functions Proxy Light weight API management Have multiple function apps under a single API surface. Mock APIs for developers! Request/Response override Cheaper (pay per use)
  19. 19. Azure Functions – Proxy
  20. 20. Azure Functions – Proxy
  21. 21. Demo: Azure Function Proxy – Override Response
  22. 22. Demo: Azure Function Proxy Serving static content
  23. 23. Securing Azure Functions Use functions key Use in-built authentication with Azure active directory and other identity service provider like Microsoft login, Gmail login etc. Use custom identity provider Create IP based rules in API gateway Use function proxy to override request
  24. 24. Serverless Mindset Don’t overdo it It may not be the right choice for all applications Find the piece of functionality that you can isolate, reuse which need high scalability, fast development mock api to support frontend development Make your function simple, stateless and focus on 1 thing per function.
  25. 25. #EdinburghAzureUserGroup @aanuwizard

×