Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Serverless Challenges

Ebru Cucen
September 25, 2019

Serverless Challenges

Serverless offering does provide unique opportunities such as pay-as-you-go model, event-driven architecture with auto-scale feature built-in, and abstraction of the infrastructure layer with a focus on business value. When you want to implement, there are 3 challenges: application rearchitecting, networking and security. This talk is about how to get around them.

Ebru Cucen

September 25, 2019
Tweet

Other Decks in Programming

Transcript

  1. @ebrucucen 2 Agenda 01 | Why Serverless? 02 | Application

    Challenges 03 | Security Challenges 04 | Networking Challenges
  2. @ebrucucen 3 Key Takeaways • Serverless provides the highest level

    of abstraction to enable focus on business value • As we shift away from non-differentiating infrastructure, old and new challenges at application level still need to be tackled • Azure is on the market offering some interesting features in the serverless space in comparison to AWS
  3. @ebrucucen 6 Serverless Offering Simon Wardley “Serverless enables us, for

    the first time, to put a clear price tag on an application flow, allowing unprecedented visibility and accuracy when designing the supply chain of our businesses.”
  4. @ebrucucen Focus on Your Application and Business Value 8 Data

    Center Networking Storage Servers Virtualisation Runtime Containers Applications Enterprise IT Functions Data Center Networking Storage Servers Virtualisation Runtime Containers Applications IaaS Functions Data Center Networking Storage Servers Virtualisation Runtime Containers Applications CaaS Functions Data Center Networking Storage Servers Virtualisation Runtime Containers Applications PaaS Functions Data Center Networking Storage Servers Virtualisation Runtime Containers Applications Serverless Functions Customer Vendor
  5. @ebrucucen 1 concurrent exec for 1GB Resource Consumption: • 2.2m

    GBs/month • £950.4 Execution: • 1.6m GBs • £8.64/month Migrating More: Year Plan (WestEurope) 12 £959 https://www.slideshare.net/TimWagner/serverlessconf-2018-keynote-debunking-serverless-myths Standard_B2s: (2CPU/4GBRAM) £313/annual Linux VM £939
  6. @ebrucucen 13 Is It Even? • High-Available: x more VMs

    • Load Balancer • Queue Storage • Management Costs
  7. @ebrucucen 1 concurrent exec for 1GB Resource Consumption: • 2.2m

    GBs/month • £950.4 Execution: • 1.6m GBs • £8.64/month VM: £626 (2 Standard_B2s) LB: £240/year £866x3 = WINNER 14 £959 £2.598
  8. Migration Patterns -> Strangler, Abstraction by Branch Application Level Challenges

    18 Language Trade Offs -> Runtime, Triggers A B Debugging -> Logging, Monitoring, Tracing C Caching, Versioning -> API Manager D
  9. Language Options • NET Core (Linux/Windows) • Node.JS (Linux/Windows) •

    Java (Windows) • Powershell Core (Windows) • Python (Linux) 19
  10. @ebrucucen Triggers Input: • Http • Timer • Azure Storage

    • Azure Cosmos DB • Azure Service Bus • Azure Event Grid • Azure Event Hub • Azure IoT Hub 20 Output: • Http • Azure Storage • Excel • Azure Service Bus • Azure Event Hub • SendGrid • Twilio • Outlook Mail
  11. Migration Patterns -> Strangler, Abstraction by Branch Application Level Challenges

    21 Language Trade Offs -> Runtime, Triggers A B Debugging -> Logging, Monitoring, Tracing C Caching, Versioning -> API Manager D
  12. @ebrucucen Postcode Lookup Service Migration 23 Which Pattern First? Verify

    Phone Register Customer Postcode Lookup How to decouple/ migrate?
  13. @ebrucucen Strangler Pattern 25 1. Identify Existing Call Postcode Lookup

    API 2. Move Existing Call Postcode Lookup API Refactor Before / after? New language ?
  14. @ebrucucen 1. Identify Existing Call Postcode Lookup API Strangler Pattern

    2. Move Existing Call Postcode Lookup API Redirected Call Lookup Function 3. Redirect Postcode Lookup API 26 Refactor Before / after? New language ? Leave/ Remove ?
  15. @ebrucucen Postcode Lookup Service Migration 27 How to Connect? Verify

    Phone Register Customer Postcode Lookup Postcode Lookup
  16. @ebrucucen 29 Branch by Abstraction Pattern User Registration Abstraction User

    Registration Phone Verification Postcode Lookup Implements
  17. @ebrucucen 30 Branch by Abstraction Pattern User Registration Abstraction User

    Registration Phone Verification Postcode Lookup Implements
  18. @ebrucucen 31 Branch by Abstraction Pattern User Registration Abstraction User

    Registration Implements Phone Verification Postcode Lookup
  19. @ebrucucen User Registration Abstraction User Registration Phone Verification Postcode Lookup

    Implements 32 Branch by Abstraction Pattern User Registration Abstraction User Registration Implements Phone Verification Postcode Lookup User Registration Abstraction User Registration Phone Verification Postcode Lookup Implements
  20. @ebrucucen 33 Postcode Lookup User Registration User Registration Abstraction New

    User Registration Service Phone Verification Postcode Lookup Implements Serverless Promise: #autoscales So do I need to think about autoscaling of overall system?
  21. @ebrucucen Serverless Design Patterns 35 Onboard User Register User State

    Machine Email Verification Phone Verification Address Lookup
  22. @ebrucucen 36 Azure Durable Functions Email Verification Phone Verification Address

    Verification Orchestrator Activity Functions Orchestrator Client WebApp
  23. Migration Patterns -> Strangler, Abstraction by Branch Application Level Challenges

    37 Language Trade Offs -> Runtime, Triggers A B Debugging -> Logging, Monitoring, Tracing C Caching, Versioning -> API Manager D
  24. @ebrucucen Application Level Challenges 41 Language Options -> Runtime, Triggers

    Migration Patterns -> Strangler, Abstraction by Branch, Chaining, State Machine/Durable Functions Debugging -> Logging, Monitoring, Tracing Caching, Versioning -> API Manager A B C D
  25. @ebrucucen Observability and Tracing • Debugging locally • Portal Kudo

    • Bash/shell into • Process Explorer • Live metrics 42
  26. Language Trade Offs -> Runtime, Triggers Application Level Challenges 50

    Migration Patterns -> Strangler, Abstraction by Branch A B Debugging -> Logging, Monitoring, Tracing C Caching, Versioning -> API Manager D
  27. Secure Http Endpoint: • Use API Management for auth •

    Use Authorization Keys Func Level • Integrate into Identity • Consider Rate throttling • Enable Cost Alerts Security - Top 5 recommendations 56
  28. Network • Castle and moat approach* • Point-to-Point to integrations/Route

    Table • Communicate to back to on-prem? • Life before and after Private Links 62 https://www-microsoft-com.cdn.ampproject.org/c/s/www.microsoft.com/en-us/microsoft-365/blog/2019/09/18/why-banks-adopt-modern-cybersecurity-zero- trust-model/amp/
  29. @ebrucucen 63 Key Takeaways • Serverless provides the highest level

    of abstraction to enable focus on business value • As we shift away from non-differentiating infrastructure, old and new challenges at application level still need to be tackled • Azure is on the market offering some interesting features in the serverless space in comparison to AWS
  30. @ebrucucen References Serverless https://martinfowler.com/articles/serverless.html Serverless Myths: https://www.slideshare.net/TimWagner/serverlessconf-2018-keynote-debunking-serverless-myths Burning Monk Links:

    http://blog.binaris.com/your-guide-to-migrating-existing-microservices-to-serverless/ https://blog.binaris.com/how-to-go-all-in-with-serverless-adoption/ (All) https://medium.com/theburningmonk-com/all-my-posts-on-serverless-aws-lambda-43c17a147f91 65