Ce diaporama a bien été signalé.
Le téléchargement de votre SlideShare est en cours. ×

Azure Serverless Toolbox

Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité

Consultez-les par la suite

1 sur 62 Publicité

Plus De Contenu Connexe

Diaporamas pour vous (20)

Similaire à Azure Serverless Toolbox (20)

Publicité

Plus récents (20)

Azure Serverless Toolbox

  1. 1. Johan Eriksson johan.eriksson@stratiteq.com
  2. 2. • Evolution of serverless • Vendor comparison • Azure serverless toolbox • 2 customer cases • Durable Functions Outline
  3. 3. Business Logic/Value Availability Pay for what you use Auto scale
  4. 4. </> </> </> </> </> </> </> </> </> Bare Metal Virtual Machines Containers Functions Decreasing infrastructural concerns Increasingfocusonbusinesslogic • Virtualizes the hardware • VMs as unit of scaling VM • Virtualizes the OS • Applications as unit of scaling • Virtualizes the Runtime • Functions as unit of scaling
  5. 5. Disruptions ? Containers – Just a Distraction? Devops – Noops ? “We just got here. We just moved to the cloud. We moved our physical servers to instances. We moved our databases as well. Even though we lost a little visibility into the underpinning infrastructure, we gained some cool new features and abilities. Now, they go ahead and pull the rug out from under us with this whole functions serverless thing. Can’t we just pause for a little bit?” “Serverless is being driven by mainstream enterprises. We see them leapfrogging containers so they can take something off the shelf and move quickly” A disruptive technology is one that displaces an established technology and shakes up the industry or a ground- breaking product that creates a completely new industry. (Airbnb, Spotify Smartphones, Cloud, Uber …)
  6. 6. Vendors 2014 AWS Lambda 2016 Google Cloud Functions 2016 Azure Functions 2016 IBM OpenWhisk
  7. 7. Feature AWS Lambda Google Cloud Functions (BETA!!) Azure Functions Scalability & availability Automatic scaling (transparently) Automatic scaling Manual or metered scaling (App Service Plan), or sub-second automatic scaling (Consumption Plan) Max # of functions Unlimited functions 1000 functions per project Unlimited functions Concurrent executions 1000 parallel executions per account, per region (soft limit) No limit No limit Max execution 300 sec (5 min) 540 seconds (9 minutes) Default 300 sec (5 min) or configurable to 10 min Supported languages JavaScript, Java, C# (.NET Core) and Python JavaScript C#, JavaScript, F#, TypeScript, Python, Java, Bash, Batch, PHP and PowerShell Dependencies Deployment Packages npm package.json Npm, NuGet Deployments ZIP upload (to Lambda or S3) ZIP upload, Cloud Storage or Cloud Source Repositories Visual Studio Team Services, OneDrive, Local Git repository, GitHub, Bitbucket, Dropbox, External repository, Visual Studio, Visual Studio Code, ZIP Upload Environment variables Yes Not yet App Settings and Connection Strings from App Services Versioning Versions and aliases Cloud Source branch/tag Cloud Source branch/tag Event-driven S3, SNS, SES, DynamoDB, Kinesis, CloudWatch, Cognito, API Gateway, CodeCommit, etc. Cloud Pub/Sub or Cloud Storage Object Change Notifications Blob, EventHub, Generic WebHook, GitHub WebHook, Queue, Http, ServiceBus Queue, Service Bus Topic, Cosmos DB, Timer triggers, Event Grid, etc. HTTP(S) invocation API Gateway HTTP trigger HTTP trigger Orchestration AWS Step Functions Not yet Azure Logic Apps, Azure Durable Functions Logging CloudWatch Logs Stackdriver Logging App Services monitoring, Application Insights Monitoring CloudWatch & X-Ray Stackdriver Monitoring Application Insights Pricing 1 million requests for free, then $0.20/1M invocations, plus $0.00001667/GB-sec 1 million requests for free, then $0.40/1M invocations, plus $0.00000231/GB-sec 1 million requests for free, then $0.20/1M invocations, plus $0.000016/GB-s
  8. 8. Azure Functions Functions – Execute code
  9. 9. Azure Functions Function App A FunctionA1 FunctionA2 FunctionA3 Function App B FunctionB1 FunctionB2 FunctionB3 Settings Settings
  10. 10. Azure Functions
  11. 11. Azure Functions CODE Inputs Outputs Trigger Bindings Bindings
  12. 12. Azure Functions Supported bindings Blob Storage Cosmos DB Event Grid Event Hubs External File External Table HTTP Microsoft Graph Excel tables Microsoft Graph OneDrive files Microsoft Graph Outlook email Microsoft Graph Events Microsoft Graph Auth tokens Mobile Apps Notification Hubs Queue storage SendGrid Service Bus Table storage Timer Twilio Webhooks Custom
  13. 13. Azure Logic Apps Logic Apps – Connectivity and workflow
  14. 14. Azure Logic Apps
  15. 15. Azure Event Grid Event broker
  16. 16. Event Grid Capabilities •Reliability - Utilize 24-hour retry with exponential backoff to ensure events are delivered. •Pay-per-event - Pay only for the amount you use Event Grid. •High throughput - Build high-volume workloads on Event Grid with support for millions of events per second.
  17. 17. Azure Event Grid
  18. 18. Azure Event Grid
  19. 19. Azure Event Grid
  20. 20. Azure Functions Proxies API Surface for functions
  21. 21. Azure Functions Proxies products.azurewebsites.net customers.azurewebsites.net orders.azurewebsites.net
  22. 22. Azure Functions Proxies /customers /products /orders Function App A customers.azurewebsites.net Function App B products.azurewebsites.net Function App C orders.azurewebsites.net eshop.azurewebsites.net
  23. 23. Azure Service Bus Message broker
  24. 24. Azure Service Bus
  25. 25. Azure Serverless Toolbox • Functions: Execute code • Logic Apps: Connectivity and workflow • Event Grid: Event broker • Functions Proxy: API Surface for functions • Service Bus: Message broker
  26. 26. Event programming model #2#1
  27. 27. Event programming model #2#1
  28. 28. Event programming model #2#1 #3
  29. 29. Event programming model #2#1
  30. 30. Event programming model #2#1
  31. 31. Event programming model #2#1 #3
  32. 32. Event driven architecture
  33. 33. • OnPrem legacy system • OnPrem Biztalk 2016 (!) • --------------------------------- • Service Bus • Logic App • Azure Functions • D365 Customer Case #1 Integrate OnPrem legacy system with cloud Dynamics 365. Both ways.
  34. 34. OnPrem Legacy 1 2
  35. 35. • OnPrem legacy system • OnPrem SQL Server • ---------------------------------- • Azure Easy Auth • Azure Functions Proxy • Azure Functions • D365 Customer Case #2 Integrate OnPrem legacy system with cloud Dynamics 365. 1-way (main) integration Sales App that creates Quotes. Fully authenticated and authorized access
  36. 36. OnPrem …
  37. 37. OnPrem 1 2
  38. 38. So what's the problem ?
  39. 39. What are these Durable Functions? •Write stateful processes in a serverless environment •“Run” for weeks, still only pay for execution time •Workflows in code •Reliable execution of orchestrations
  40. 40. Durable Functions – Avoid ! •Orchestrator code must be deterministic •Non-blocking: no I/O calls or Thread.Sleep •No async operations. Use the API •Avoid infinite loops
  41. 41. Charge Customers Card (PSP) Mail Receipt to customer Update Inventory System Checkout Workflow
  42. 42. Charge Customers Card (PSP) Mail Receipt to customer Update Inventory System Checkout Workflow
  43. 43. Charge Customers Card (PSP) Mail Receipt to customer Update Inventory System Checkout Workflow Process Manager
  44. 44. Process Manager – Orchestrator pattern in Azure Durable Functions Charge Customers Card (PSP) Mail Receipt to customer Update Inventory System Checkout Workflow
  45. 45. Orchestrations and Actions •StartNewAsync HTTP Trigger •Orchestrator •Activity
  46. 46. Shopping Cart 2FA Checkout
  47. 47. Pattern: External Events
  48. 48. Pattern: Function Chaining
  49. 49. Pattern: Human Interaction
  50. 50. Azure Durable Functions takeaways Code Stateful Durable Sleeping = not billed Automatically wake up Scalable

×