Serverless needs no introduction these days. It is viewed as a magic recipe for organisations moving to cloud and for those moving beyond the container hell.
LEGO.com was migrated from a legacy monolith eCommerce platform onto serverless on AWS. This employed serverless and managed services at its core within an agile development process. Is early success with serverless a springboard to future possibilities? Does serverless really deliver what it promises?
We will look at how serverless helped in the migration and what can it do to the organisation beyond its initial adoption!
9. November 2017 – Migration thoughts
VPC
Node.js
+
React
Elastic Beanstalk
container
Server contents Server contents
Tax
Products CRM
Fulfillment Rewards
VPC
Gateway
503 Service
Unavailable
Corporate
data center
Server contents
14. A journey of a thousand miles
begins with a single step
- Confucius
15. September 2018 – First Lambda function
VPC
Node.js
+
React
Elastic Beanstalk
container
Server contents Server contents
Tax
Products CRM
Fulfillment Rewards
AWS Cloud
SaaS
VPC
Gateway
Server contents
Corporate
data center
Amazon API
Gateway
AWS Lambda
function
17. Serverless requires a "mind-shift" to see the
products as event-driven orchestration of
managed services, knitted with infrastructure
code, to bring the best value
for the customer
- Sheen Brisals
19. AWS Cloud
… cos everything is AWSome
• Number of services
• Support and active community
• Service updates
20. Serverless
… the why matters more than the what
Trigger
Push Trigger
Push Trigger
Push Trigger
Product
Pricing
SKU
an ecosystem of
managed services
granular level
optimisation
ideal for iterative
development
brings engineering
diversity
21. … coz it does what it says on the tin
Managed Services
• Fastrack development
• Event driven & decoupling
• Resilient, secure & scalable
• Native integrations
• Functionless (codeless)
22. … coz bitten badly by the monolith
Microservices
• Start simple (small) and evolve
• Independent deploy pipeline
• API & event driven communication
• Refactor to grow with the technology
• Service ownership
25. … start small. scale fast
Agile and Iterative
daily
standup
retro
planning
grooming
review
• Practical agile
• Speed matters in development
• Focus squads
• Solution first, perfection next
• 2 week sprints
26. … agree fast. act fast
design
review
agree
develop
Design, Review, Decide
• Open mindset for ideas
• Bold approach & quick decisions
• Iterate and improve
• Solution detailing, where needed
• Make engineers architects
27. Architect in set-pieces
… accomplish peace by piece
• Visualise big but focus small
• Event-driven interaction
• Rehearse the design
• PoC but don’t throw away
• Embrace serverless patterns
28. A set-piece is a scene or sequence of scenes whose
execution requires logistical planning
with
LEGO
29. A set-piece is a scene or sequence of scenes whose
execution requires logistical planning
in
Architecture
32. Event-driven data pipeline
Transform
feed
Transformed
feeds queue
Feeds
store
Commerce
platform API
Update
data
Data
feeds Trigger Push Trigger Update
• Feeds in JSON format
• Independent feed flow
• Immediate handling of feeds
• Decoupled processing
• Failure retry process
• Failure notification
DLQ
Thousands per day processed as soon as possible Fine-grained control on throughput and errors
Observability
35. Order placement
Shop
POST
GET
Submit order
API
Submit order
function
Submit order
queue
Process order
function
Update
status
Order status
API
Status provider
function
Order
cache
(TTL)
Order number
Query status
Payment
providers
New
commerce
platform
Frontend visibility Processing Failed Complete
Backend visibility
Validating Validation failed Payment authorized
Payment processing Card declined Sent to fulfillment
36. … cos manual is painful
Automation
• Account separation – Dev, Test, QA, Prod
• Integration tests
• Test in real environment
• Grow the CI/CD pipeline
• Developers towards DevOps
47. … grow serverless engineers
Accelerating with Serverless
▪ Team
▪ Growth & Diversity
▪ Value
▪ Technology
48. https://bit.ly/31zrh1N
Serverless Engineer is a software engineer
who is innovative, efficient, capable of
building secure, cloud first and cost effective
functional solutions, iteratively using
managed services
52. Accelerating with Serverless
▪ Team
▪ Growth & Diversity
▪ DevOps Culture
▪ Value
▪ Technology … you build it. You run it
53. • Engineers perform end to end service delivery
• Become part of the on-call team
• Studying logs and monitoring applications
• Work with infra, security and SR specialists
• Mission Control dashboard for deployment visibility
66. Feature – Upload product images securely to CMS
Authorised
employee
Images,
videos
Assets
store
Process
assets
CMS
Commerce
platform
Store
Index
Delete asset
• Restricted AWS access to assets uploader
• Processed assets must be deleted immediately
Old
CMS
Migrate assets