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.

Startups without Servers

6,409 views

Published on

Startups without Servers

Published in: Business

Startups without Servers

  1. 1. Startups Without Servers Dean Bryen - Solutions Architect - AWS Shaun Pearce - VP of Engineering - Gousto
  2. 2. Priorities for Startups
  3. 3. 3 Racing within a window of time
  4. 4. 4 Focus is on solving a problem
  5. 5. 5 Skills are in Development not Infrastructure
  6. 6. 6 Over-Engineering vs Re-Engineering
  7. 7. 7 Biggest fear is being a victim of your own success
  8. 8. The Evolution of Architecture
  9. 9. 9 The Monolith
  10. 10. 10 Micro Services
  11. 11. 11 API Driven Development
  12. 12. The Evolution of Compute and Storage
  13. 13. 13 Physical Servers / Disks / VM’s
  14. 14. 14 Containers
  15. 15. 15 Platform Level Services
  16. 16. Dean’s AWS London Loft Challenge
  17. 17. Build an image processing microservice that….. Scales per request Requires no deployment effort Fault Tolerant Has a RESTful API interface with a Web client
  18. 18. The Catch NO Servers NO Monolithic App or Explicit Web Service NO Explicit code for scaling and fault tolerance And do it within 45 minutes…
  19. 19. What Services Could we use?
  20. 20. Static Assets in Amazon S3 Internet scale HTTP/S based object store Inerently Highly Available and Fault Tolerant Designed for 11 9’s of Durability Can host static websites Holds trillions of objects
  21. 21. Serverless micro services with AWS Lambda Event Driven Computing service Never pay for idle Scales per request Supports Node.js and Java (or other JVM based languages) Event triggers from other AWS Services 23 different ‘Power Levels’ of AWS Lambda
  22. 22. A RESTful API with Amazon API Gateway Host multiple versions and stages of your API Create and distribute API Keys to your developers Throttle and Monitor API Calls Cache Responses Transform Data Generate SDK’s (Including Swagger Support)
 Interact directly with AWS Lambda
  23. 23. A NoSQL Data Store with Amazon DynamoDB Managed noSQL Data Store Can be either a Document or Key/Value store Simply provision read and write throughput Enables you to focuss on your data DynamoDB streams enables you to take actions on events Inherently Highly Available and Fault Tolerant
  24. 24. Putting it all together
  25. 25. The Service Itself Static Site in S3 Web Client API Gateway Lambda Function + ImageMagic
  26. 26. Auto Deployment Uploads new 
 version to S3 Developer AWS Lambda
 Deployment function UpdateFunction API Call to AWS Lambda
  27. 27. Unit and Load Testing HTTPS Invoke Function Image Processing
 Function Unit Test Function Result Stored in DynamoDB BONUS
  28. 28. BONUS
  29. 29. Let’s Get Building
  30. 30. First, the MicroService itself
  31. 31. Create the Image Processing Lambda Function Static Site in S3 Web Client API Gateway Lambda Function + ImageMagic
  32. 32. Build the API Static Site in S3 Web Client API Gateway Lambda Function + ImageMagic
  33. 33. Static site in S3 Static Site in S3 Web Client API Gateway Lambda Function + ImageMagic
  34. 34. Test out the Web Client Static Site in S3 Web Client API Gateway Lambda Function + ImageMagic
  35. 35. Next, Set up Auto Deployment
  36. 36. Create the Deployment Function Uploads new version to S3 Developer AWS Lambda
 Deployment function UpdateFunction API Call to AWS Lambda
  37. 37. Upload a new version to S3 to test Uploads new 
 version to S3 Developer AWS Lambda Deployment function UpdateFunction API Call to AWS Lambda
  38. 38. Summary and Next Steps
  39. 39. Summary Utilise Platform Level Services that have built in HA Use a microservices approach Use a common interface for services such as RESTful APIs Store static files in Amazon S3 Use AWS Lambda as the glue between AWS services
  40. 40. Next Steps Sign up for an AWS Account Try out a new server-less ervice Make use of AWS Forums and Support Come and meet an architect at the loft Check out aws.amazon.com for more information
  41. 41. Lambda @ Gousto Shaun Pearce VP Engineering
  42. 42. About Gousto • We are an online recipe box service offering customers the ability to choose up to 4 recipes for 2 or 4 people every week • We deliver all the ingredients you need in exact proportions with step-by-step recipe cards. • No planning, no supermarkets and no food waste – you just cook. • We’re a rapidly growing business, with a diverse set of technology requirements. • Gousto’s tech team are responsible for all consumer facing assets (Web, Mobile App) as well as backend ordering platforms and integrations into ERP, Warehouse Automation, Couriers etc
  43. 43. Gousto’s Platform (early 2015) Web Site (PHP Laravel) Business Logic (PHP Laravel) Users CMS Users Data Scientists Reporting Read Replica Production Database Key Challenges • Large monolithic app covering a broad set of responsibilities (e-commerce, payment processing, courier integration etc.) • Becoming more complex and difficult to maintain over time (hard to upgrade) • Increased risk of change starting to slow progress • A growing development team working on a single code base – diminishing returns on tech investment • Concerns a single database will become a performance bottleneck REST
  44. 44. Roadmap to a Microservices Architecture Web Site API Gateway Users Recommenda tion API (Lambda) Menu Service (EC2) Customer Service . . . Recommendation Data Menu Data Customer Data . . . Data CMS CMS Users Key Enhancements • Each area of concern is broken into a separate, independent service • We use CloudFormation & Ansible to heavily automate and standardise our microservice deployments • Where data can be easily extracted from the existing schema a Lambda / DynamoDB implementation will be preferred • Where data remains relational these services are being written in Node.js or PHP and deployed onto EC2 REST
  45. 45. Asynchronous Notifications Pattern Customer Service Amazon SNS Topic Payment Service Delivery Schedule Service . . . • Increase performance for customers • Reduce synchronous dependencies between services • Lower the impact of failure of any one service I’ve changed address Got it, thanks. <address change> Subscribe to addr changes Subscribe to addr changes Subscribe to addr changes Amazon SQS Queues 1 3 2 4 5 n
  46. 46. Thank You
 
 also… we’re recruiting
 shaun@gousto.co.uk
  47. 47. Thank You Dean Bryen - Solutions Architect - AWS Shaun Pearce - VP of Engineering - Gousto

×