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 Culture

44 views

Published on

Session on serverless culture at AWS Community Day, Bangalore 2019

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Serverless Culture

  1. 1. Microservices
  2. 2. • Chose Framework • Define Principles • Develop • Deploy – CI/CD - ELB - Capacity Planning…
  3. 3. Adopting Serverless Architecture
  4. 4. Adopting Serverless Culture Architecture
  5. 5. Guruprasad Holla Founder, Quiznext Head of Engineering @Vidyanext Principle Architect @Harman, @ADITI 15+Years building solutions for ISVs, B2B and B2C
  6. 6. QuizNext- 3x Practice App for CBSE&ICSE • Gamified learning app • Supports real time 1:1 challenges, Delivers Quizzes, Live completions for CBSE/ICSE 6-10 • Backed completely by serverless • ~100K users • 10M+ Server calls
  7. 7. QuizNext Architecture (AWS) AWS Cloud AWS Lambda Amazon CloudWatch Cloud Watch Events Amazon Cognito AWS S3 GraphQL AWS AppSync Amazon DynamoDB Amazon Pinpoint Amazon Simple Notification Service Amazon Simple Queue Service Amazon Athena
  8. 8. QuizNext Architecture (AWS) AWS Cloud AWS Lambda Amazon CloudWatch Cloud Watch Events Amazon Cognito AWS S3 GraphQL AWS AppSync Amazon DynamoDB Amazon Pinpoint Amazon Simple Notification Service Amazon Simple Queue Service Amazon Athena • Amplify client for GraphQL • Two API end points • Content Access • Quiz Service - user data, performance, points, challenges etc • Subscriptions for live challenges and leader board updates • In app notifications • GraphQL - Offline access to data AWS AppSync
  9. 9. QuizNext Architecture (AWS) AWS Cloud AWS Lambda Amazon CloudWatch Cloud Watch Events Amazon Cognito AWS S3 GraphQL AWS AppSync Amazon DynamoDB Amazon Pinpoint Amazon Simple Notification Service Amazon Simple Queue Service Amazon Athena • User authentication • Phone number validation • OTP Verification(SNS) Amazon Cognito
  10. 10. QuizNext Architecture (AWS) AWS Cloud AWS Lambda Amazon CloudWatch Cloud Watch Events Amazon Cognito AWS S3 GraphQL AWS AppSync Amazon DynamoDB Amazon Pinpoint Amazon Simple Notification Service Amazon Simple Queue Service Amazon Athena • User data, Challenges data, recommendations and some content meta data • Most of direct CRUD operations are driven by Appsync – dynamo db templates • Some data access is routed through lambda functions Amazon DynamoDB
  11. 11. QuizNext Architecture (AWS) AWS Cloud AWS Lambda Amazon CloudWatch Cloud Watch Events Amazon Cognito AWS S3 GraphQL AWS AppSync Amazon DynamoDB Amazon Pinpoint Amazon Simple Notification Service Amazon Simple Queue Service Amazon Athena • Question Content storage • Question Templates, Live quiz questions • Dynamo DB archived elements • App Images AWS S3
  12. 12. QuizNext Architecture (AWS) AWS Cloud AWS Lambda Amazon CloudWatch Cloud Watch Events Amazon Cognito AWS S3 GraphQL AWS AppSync Amazon DynamoDB Amazon Pinpoint Amazon Simple Notification Service Amazon Simple Queue Service Amazon Athena • Triggered from appsync • Event driven cleanup jobs • ranking jobs • test creation jobs etc • Recommendation generations • SQS based auto respond jobs • In memory cache AWS Lambda
  13. 13. QuizNext Architecture (AWS) AWS Cloud AWS Lambda Amazon CloudWatch Cloud Watch Events Amazon Cognito AWS S3 GraphQL AWS AppSync Amazon DynamoDB Amazon Pinpoint Amazon Simple Notification Service Amazon Simple Queue Service Amazon Athena
  14. 14. QuizNext Architecture (AWS) AWS Cloud AWS Lambda Amazon CloudWatch Cloud Watch Events Amazon Cognito AWS S3 GraphQL AWS AppSync Amazon DynamoDB Amazon Pinpoint Amazon Simple Notification Service Amazon Simple Queue Service Amazon Athena
  15. 15. QuizNext Architecture (AWS) AWS Cloud AWS Lambda Amazon CloudWatch Cloud Watch Events Amazon Cognito AWS S3 GraphQL AWS AppSync Amazon DynamoDB Amazon Pinpoint Amazon Simple Notification Service Amazon Simple Queue Service Amazon Athena
  16. 16. QuizNext Architecture (AWS) AWS Cloud AWS Lambda Amazon CloudWatch Cloud Watch Events Amazon Cognito AWS S3 GraphQL AWS AppSync Amazon DynamoDB Amazon Pinpoint Amazon Simple Notification Service Amazon Simple Queue Service Amazon Athena
  17. 17. QuizNext Architecture AWS Cloud AWS Lambda Cloud Watch Events Amazon Cognito AWS S3 GraphQL AWS AppSync Amazon DynamoDB Amazon Pinpoint SNS SQS Amazon Athena Amazon EC2
  18. 18. How did we land here?
  19. 19. Webhooks for CRM • HA Service for sales reversal • Not too simple, not too complex • Unpredictable load • Internal CRM Users • Stateless Amazon API Gateway AWS Lambda
  20. 20. Payment Receiver Webhook • HA Service • Used only during end of the month • High traceability and logging • Independent DB • CRM Integration Amazon API Gateway AWS Lambda Amazon DynamoDB
  21. 21. Today at QuizNext < 100$/Month to support 20K active users AppSync 10M server calls a month for 20$ 0 downtime Incremental deployments No peak time panics No log cleaning, disc overrun etc 3 environments automated by cloud formation All configurations are backed on Git
  22. 22. What did we learn?
  23. 23. “Change the way we look at services”
  24. 24. FaaS Function 1 Function 2 Function 3 Function 4 Function 5 + BaaS
  25. 25. Think about scale on day 1 • Is your implementation scalable? • Can code run multi instance? • Will your code timeout? • DynamoDB Scan vs Query • Indexes, Composite keys • Host affinity?
  26. 26. Think about atomicity • Triggers are not evil • Resources as packages • Explore SQS, S3, Cloudwatch etc Update Score Calculate Rank Update Score Trigger Ranker Calculate Rank
  27. 27. Think of micro jobs • Explore triggers • Can we delay this? • Can we clean it up later? • Aggregation, rollups etc • Look for timeouts Update Score Calculate Rank
  28. 28. MVP at architecture level • Know your extension options • Throwing hardware/resource is easy and cheaper • Cost of redesign is smaller Resolver Templates
  29. 29. Think about cost • Understand how you are billed • Its complicated - so tag resources • Use cost explorer and breakdown costing data • Set min capacity for dev/test environment
  30. 30. Think about UX • Are you writing critical data? • When do you need confirmations • What can be delay executed Update Score Calculate Rank Update Score Trigger Ranker Calculate Rank
  31. 31. Be script ready Everything is programmable • Migrations are easy • You can modify resources • You can modify configs Do not overengineer • You can do it later Explore tooling
  32. 32. Questions?
  33. 33. Thank you g p r a s a d h o l l a Guruprasad Holla #serverless #aws #gamification #edtech

×