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.

New Serverless World, Cloud Native Apps

662 views

Published on

This was a presentation held at DevTalks in Cluj-Napoca.

Published in: Technology
  • Login to see the comments

New Serverless World, Cloud Native Apps

  1. 1. New Serverless World Cloud Native Apps MELANIA ANDRISAN SOLUTION ARCHITECT AT HAUFE-GROUP
  2. 2. Serverless You “play” with functions, You build a function, deploy it as a single unit and the ”Cloud” takes care of everything else. That functions can handle events, save data in your storage or return the data from that storage. Function Event FasS User
  3. 3. … To Cloud Native Apps Monolith – Microservices – Serverless From Servers to Serverless Cloud providers offers Serverless Framework & Amazon SAM Challenges ◦ Authorization ◦ Orchestration ◦ Security ◦ Logging and Monitoring ◦ SQL and NoSQL
  4. 4. Monolith Source: http://www.goodtoknow.co.uk/family/baby-names
  5. 5. Microservice Source: http://www.roypetitfils.com/understanding-normal-vs-abnormal-teenager-behavior/
  6. 6. Serverless Source: http://www.glamour.com/story/how-to-be-a-great-manager
  7. 7. From Monolith to Serverless You take care of everything Checking if everything is ok Handle all the overload Hard to change and with a lot of effort Deploy once run forever Monolith Is self aware You manage containers Easy to change and maintain and scale Needs orchestration You need to take care of aggregation… Deploy once run forever Microservices Is independent You take care of your stuff he takes care of his Less Control comes with Less Responsibility Easier to interact with Deploy once run a couple of minutes Serverless
  8. 8. Why Serverless? BECAUSE IN OUR DAYS REQUIREMENTS ARE CHANGING EVERY DAY AND WITH SO FINE GRANULARITY YOU HAVE THE FLEXIBILITY TO SUPPORT THIS FLOW OF REQUIREMENT WITHOUT A LOT OF INVESTMENT.
  9. 9. Serverless Keeping micro-services stateless and immutable Focus more on product then infrastructure Less Control Less Responsibility Increased Automation Continuous scaling No pay for idle
  10. 10. 3-tier Architecture Web Site API Gateway Functions Cloud Logic Data Storage Web Site Storage Browser
  11. 11. Use… as Cloud Logic Layer Google Cloud Functions AWS Lambda Functions Azure Cloud Functions IBM OpenWhisk
  12. 12. Amazon Serverless Offer… S3 API Gateway AWS Lambda Functions Browser DynamoDB
  13. 13. Costs… [1] COGNITO IS FREE FOR < 50K MAUS AND $0.00550/MAU ONWARDS. [2] LAMBDA IS FREE FOR < 1M REQUESTS AND 400000GB-SECS OF COMPUTE. [3] DYNAMODB GIVES 25GB OF FREE STORAGE. [4] S3 GIVES 1GB OF FREE TRANSFER.
  14. 14. Service Rate Cost Cognito Free[1] $0.00 API Gateway $3.5/M reqs + $0.09/GB transfer $2.20 Lambda Free[2] $0.00 DynamoDB $0.0065/hr 10 write units, $0.0065/hr 50 read units[3] $2.80 S3 $0.023/GB storage, $0.005/K PUT, $0.004/10K GET, $0.0025/M objects[4] $0.24 CloudFront (CDN) $0.085/GB transfer + $0.01/10K reqs $0.86 Route53 (DNS) $0.50 per hosted zone + $0.40/M queries $0.50 Certificate Manager Free $0.00 Total $6.10 *1000 daily active users making 20 requests per day to our API and storing around 10MB of files on S3. 6.10$ Per Month. Source: http://serverless-stack.com/chapters/why-create-serverless-apps.html
  15. 15. Microsoft Serverless Offer… Browser Azure Cloud Functions Azure CDN API Management Cosmos DB Azure Blob Storage
  16. 16. Google Serverless Offer… Browser Google Cloud Functions Cloud CDN Cloud Storage Cloud Endpoints Google Cloud BigTable
  17. 17. Let’s put them all together…
  18. 18. Cloud Formation Azure Resource Manager Template and Azure Function project Google Deployment Manager
  19. 19. SAM(AWS Serverless Application Model)
  20. 20. How they work on AWS
  21. 21. JSON/ YML Template Predefined scripts Cloud Formation API Gateway Lambda Functions Dynamo DB Source Code
  22. 22. Challenges DEV, AUTHENTICATION, SECURITY, LOGGING AND MONITORING, SQL AND NOSQL
  23. 23. Development YOU CAN DEVELOP LOCALLY USING SERVERLESS-OFFLINE AND DYNAMODB OFFLINE
  24. 24. Be a service Customer DESIGN FOR FAILURE PLAN TO BE THROTTLED PLAN TO RETRY (429) CACHE WHEN APPROPRIATE https://www.youtube.com/watch?v=oRIYtOsAlzk
  25. 25. You can be a Service Provider PUBLISH STANDARD METRICS IMPLEMENTATION DETAILS ARE PRIVATE MAKE BACKWARDS COMPATIBILITY
  26. 26. Cold Start … … AND STEP FUNCTIONS
  27. 27. Step Functions
  28. 28. Authentication & Authorization COGNITO & IDENTITY AND ACCESS MANAGEMENT
  29. 29. Security SECURITY AT DIFFERENT LEVELS
  30. 30. Security Firewalls ( network firewalls, application firewalls) Encryption with TLS (Transport Layer Security) across all services DDoS (Distributed Denial of Service) Mitigation Identity and Access Control ◦ IAM(Identity and Access Management) ◦ Multi-factor authentication Penetration Testing … https://d0.awsstatic.com/whitepapers/Security/DDoS_White_Paper.pdf
  31. 31. Monitoring BUILT IN MONITORING OR OTHERS LIKE NEW RELIC X-RAY DEAD LETTER QUEUE
  32. 32. AWS CloudTail
  33. 33. Logging USER STANDARD LOGGING IN YOU APP (DATE-TIME, MODULE, ID, [INFO, DEBUG, ERROR])
  34. 34. SQL vs. NoSQL SYNCHRONIZING UPDATES DENORMALIZED DB THINK IN TERMS OF QUERIES NOT IN TERMS OF OBJECTS
  35. 35. DB Transactions BEGIN TRANSACTION. PUT ITEM #1. … PUT ITEM #N. COMMIT TRANSACTION. https://aws.amazon.com/blogs/aws/dynamodb-transaction-library/
  36. 36. …>25% from Proper Microservices Architecture Security Monitoring and Alerting Continuous Deployment Network and Traffic Configuration Service and Resource Discovery
  37. 37. AWS
  38. 38. Azure
  39. 39. Google Cloud
  40. 40. Recap Different mind set Good citizenship Build software with grown up solutions Build Infrastructure as code using solutions like Serverless Framework Focus on building extraordinary products not state of the art infrastructure Many offers, many possibilities, you can even combine then The non-functional challenges can be overcome with services
  41. 41. Resources Serverless Architecture AWS Lambda vs. Azure Cloud Functions Immutable Infrastructure Azure BlobStorage vs. Amazon S3 From Monolith to Microservices Serverless Architectural Patterns

×