Startups without Servers
-
Upload
amazon-web-services -
Category
Business
-
view
4.206 -
download
0
Transcript of Startups without Servers
![Page 1: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/1.jpg)
Startups Without ServersDean Bryen - Solutions Architect - AWS
Shaun Pearce - VP of Engineering - Gousto
![Page 2: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/2.jpg)
Priorities for Startups
![Page 3: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/3.jpg)
3
Racing within a window of time
![Page 4: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/4.jpg)
4
Focus is on solving a problem
![Page 5: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/5.jpg)
5
Skills are in Development not Infrastructure
![Page 6: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/6.jpg)
6
Over-Engineering vs Re-Engineering
![Page 7: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/7.jpg)
7
Biggest fear is being a victim of your own success
![Page 8: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/8.jpg)
The Evolution of Architecture
![Page 9: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/9.jpg)
9
The Monolith
![Page 10: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/10.jpg)
10
Micro Services
![Page 11: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/11.jpg)
11
API Driven Development
![Page 12: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/12.jpg)
The Evolution of Compute and Storage
![Page 13: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/13.jpg)
13
Physical Servers / Disks / VM’s
![Page 14: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/14.jpg)
14
Containers
![Page 15: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/15.jpg)
15
Platform Level Services
![Page 16: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/16.jpg)
Dean’s AWS London Loft Challenge
![Page 17: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/17.jpg)
Build an image processing microservice that…..
Scales per request
Requires no deployment effort
Fault Tolerant
Has a RESTful API interface with a Web client
![Page 18: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/18.jpg)
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…
![Page 19: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/19.jpg)
What Services Could we use?
![Page 20: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/20.jpg)
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
![Page 21: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/21.jpg)
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
![Page 22: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/22.jpg)
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
![Page 23: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/23.jpg)
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
![Page 24: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/24.jpg)
Putting it all together
![Page 25: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/25.jpg)
The Service Itself
Static Site in S3
Web Client API Gateway Lambda Function + ImageMagic
![Page 26: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/26.jpg)
Auto Deployment
Uploads new version to S3Developer AWS Lambda
Deployment functionUpdateFunction API Call
to AWS Lambda
![Page 27: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/27.jpg)
Unit and Load Testing
HTTPS Invoke Function Image ProcessingFunction
Unit Test Function
Result Stored in DynamoDB
BONUS
![Page 28: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/28.jpg)
BONUS
![Page 29: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/29.jpg)
Let’s Get Building
![Page 30: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/30.jpg)
First, the MicroService itself
![Page 31: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/31.jpg)
Create the Image Processing Lambda Function
Static Site in S3
Web Client API Gateway Lambda Function + ImageMagic
![Page 32: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/32.jpg)
Build the API
Static Site in S3
Web Client API Gateway Lambda Function + ImageMagic
![Page 33: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/33.jpg)
Static site in S3
Static Site in S3
Web Client API Gateway Lambda Function + ImageMagic
![Page 34: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/34.jpg)
Test out the Web Client
Static Site in S3
Web Client API Gateway Lambda Function + ImageMagic
![Page 35: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/35.jpg)
Next, Set up Auto Deployment
![Page 36: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/36.jpg)
Create the Deployment Function
Uploads new version to S3Developer AWS Lambda
Deployment functionUpdateFunction API Call
to AWS Lambda
![Page 37: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/37.jpg)
Upload a new version to S3 to test
Uploads new version to S3Developer AWS Lambda
Deployment functionUpdateFunction API Call
to AWS Lambda
![Page 38: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/38.jpg)
Summary and Next Steps
![Page 39: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/39.jpg)
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
![Page 40: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/40.jpg)
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
![Page 41: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/41.jpg)
Lambda @ GoustoShaun Pearce
VP Engineering
![Page 42: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/42.jpg)
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
![Page 43: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/43.jpg)
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
![Page 44: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/44.jpg)
Roadmap to a Microservices Architecture
Web Site
API Gateway
Users
Recommendation API
(Lambda)Menu
Service (EC2)CustomerService . . .
RecommendationData
MenuData
CustomerData
. . .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
![Page 45: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/45.jpg)
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
![Page 46: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/46.jpg)
Thank You also… we’re recruiting [email protected]
![Page 47: Startups without Servers](https://reader036.fdocuments.us/reader036/viewer/2022081414/589f46d81a28ab490c8b7319/html5/thumbnails/47.jpg)
Thank YouDean Bryen - Solutions Architect - AWS
Shaun Pearce - VP of Engineering - Gousto