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.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Advanced serverless application
architecture and...
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Why Serverless?
Image caption 1 Image caption 3
...
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
You want to host a large-scale
blog platform wit...
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
CMS Back-end Architecture
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Authorization of backend users
Cognito
User Pool...
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Website Architecture
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
API
Gateway
Website
API
CloudFront
DynamoDB
Elas...
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Application Components Architecture
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
API
Gateway
CMS API Internal
Request
Handler
Aut...
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Deployment Architecture
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Code
Repository
Services
CMS Routes
Web Routes
A...
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
let userGreeting = "Hello <name>! Have a Nice da...
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
function getUserGreeting() {
return "Hello <name...
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Global Variables
• Lambda will re-use the contai...
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
You have to sent news letters to
thousands of yo...
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
CloudWatch
Rule
Fetch News Letter
Template
News ...
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Cloud Reports Architecture
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ReportersAnalyzersCollectors
Collects Informatio...
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
API
Gateway
DynamoDBLambda Lambda SQS Cloud Repo...
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Loop Prevention:
• Code review
• Data flow revie...
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Monitoring
• Memory Utilization
• Invocation Cou...
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Thank you
Upcoming SlideShare
Loading in …5
×

Advanced serverless application architecture and design considerations

64 views

Published on

Talk by Dilip Kola, Co-Founder of Tensult on the topic "Advanced serverless application architecture and design considerations" at AWS Community Day Bangalore 2018

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Advanced serverless application architecture and design considerations

  1. 1. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Advanced serverless application architecture and design considerations DILIP KUMAR KOLA, Co-founder Tensult | 6th October 2018
  2. 2. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Why Serverless? Image caption 1 Image caption 3 Scalability Reduce Cost AutomationFaster Deployments
  3. 3. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. You want to host a large-scale blog platform with highly dynamic content leveraging, “serverless technology”. How would you do it?
  4. 4. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. CMS Back-end Architecture
  5. 5. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Authorization of backend users Cognito User Pool CMS Application API Gateway CMS API CloudFront Cognito Identity Pool S3 For storing photos and videos DynamoDB Lambda Elastic Search Populating to ES to enable search Lambda S3 Sitemaps and RSS feeders CMS User
  6. 6. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Website Architecture
  7. 7. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. API Gateway Website API CloudFront DynamoDB Elastic Search S3 Web User Sitemaps and RSS feeders Data Retrieval
  8. 8. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Application Components Architecture
  9. 9. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. API Gateway CMS API Internal Request Handler Authentication Handler Authorization Handler Error Handler Routes Services Validations DynamoDB
  10. 10. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Deployment Architecture
  11. 11. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Code Repository Services CMS Routes Web Routes API Gateway API Gateway CMS API Services CMS Routes Web Routes Web API Deploy to CMS API Deploy to Web API CMS API Web API
  12. 12. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. let userGreeting = "Hello <name>! Have a Nice day!!”; exports.handler = async (event) => { console.log("event received", event); userGreeting = userGreeting.replace("<name>", event.name); console.log(userGreeting); return userGreeting; }; Is there any problem with the above lambda function?
  13. 13. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. function getUserGreeting() { return "Hello <name>! Have a Nice day!!"; } exports.handler = async (event) => { console.log("event received", event); let userGreeting = getUserGreeting(); userGreeting = userGreeting.replace("<name>", event.name); console.log(userGreeting); return userGreeting; };
  14. 14. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Global Variables • Lambda will re-use the container to execute the function so, treat everything outside the handler of lambda function as constant • Incase if you want to modify any global variables while executing, wrap it in a function like the example shown before
  15. 15. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. You have to sent news letters to thousands of your blog subscribers, how will you do that?
  16. 16. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. CloudWatch Rule Fetch News Letter Template News Letter Template Cache Elastic Search Fetch List of Users Send News Letter SES SNS Send Token to fetch next User List Newsletter Function
  17. 17. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Cloud Reports Architecture
  18. 18. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ReportersAnalyzersCollectors Collects Information from cloud provider Analyzes Information against best practices Generates Report in Various Formats
  19. 19. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. API Gateway DynamoDBLambda Lambda SQS Cloud Reports Application S3 Validations Storing Meta-Data
  20. 20. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Loop Prevention: • Code review • Data flow review Loop Detection: • Set up an invocation count alarm for each Lambda function and set notification using SNS. • Setting up Billing alerts to monitor resource usage.
  21. 21. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Monitoring • Memory Utilization • Invocation Count • Duration of execution • Load testing with different memory size • Throttling • Dashboards
  22. 22. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Thank you

×