SlideShare a Scribd company logo
From legacy to serverless
history of a transformation
The ladder
Monolith architecture
User interface
Business layer (MVC)
Data interface
Data layerBrowser Web Server
Monolith
The good
● Fewer Cross-cutting
Concerns: logging, security
features such as audit trails, xss
and DOS protection, rate limiting
are shared across the code
base.
● Less Operational Overhead:
Less deployment complexity,
monitoring, testing and logging.
● Development ease: building a
monolithic application is far less
complex and need less
developer resources (also less
specialization)
● Performance: no multiple API
call means less overhead time
that could lead to a better overall
performance
The uglyThe bad Lesson
learned
● Harder to understand: can
have lots of dependencies, side-
effects, and magic which are not
straight forward for the new
comer
● Harder to change: a large
codebase harder to understand
is also harder to change.
● CI/CD: implementing a CI / CD
pipeline leads to a continuous
complete redeployment.
● Scalability: If you need to scale
fast you are in for big bucks,
costs will likely grow
exponentially.
● Poor reliability: a single bug
could take the whole system
down.
● Slowness: as the code base
grows, overall system
performance decreases
● Monolith are the starting point of
any small business and as it
scales up a choice must be
taken, microservices with
monolith core or full
microservices architecture?
The spiral staircase
Microservice architecture with a monolithic core
User interface
Business layer (MVC)x
Data layer
Browser Proxy
Microservice architecture with a monolithic core
Orchestration
Service A
Service B
Service C
Service Z
...
Monolithic
The good
● Scalability: scalability is good,
microservices can be deployed
as a singularity.
● CI/CD: CI / CD can be
implemented with overall
benefits.
● Maintenance: Easier to
understand and maintain
The uglyThe bad Lesson
learned
● More Operational Overhead:
More deployment complexity,
monitoring, testing and logging.
● Monolith database: the
database is still the one from the
monolith architecture
● Shared core: The core is shared
among all microservices
(dependency) this also means
project codebase
● Legacy code: it’s still among us
but this is not the architecture’s
fault.
● REST API can tend to be
developed in an unRESTful way
based on developer “sensitivity”.
Not much control over code
quality due to the stringent scale
up deadlines.
● Lots of bugs at first release.
● It works well, scales well and
with CI/CD in place the quality of
new releases has grown.
Stairway to heaven
Serverless Architecture
We had some issues...
All microservices in our
backend app were
highly dependent on
one another. When a
MS requires a resource
from another MS, the
first must know what
data is needed by the
other one
Tight coupling
All communications
between microservice
were done by a sync
API call. This caused
some issue when
performing heavy
operations on DB (like
importing users).
Blocking sync
execution
There was no standard
procedure to manage
errors occurred while
an event is triggered
and captured by
another service,
Error handling
When an event is
triggered and a
microservice service
fails, the event is lost
and not recoverable,
causing discrepancy in
DB and manual work to
recover missing data.
Rigidity
How to solve them, then?
MESSAGE QUEUES!
Wow, but i don’t
want to pay for
idle… maybe a
“serverless”
service?
But there are so
many services
out there...
Let’s try with an
AWS managed
service
Simple Queue Service
AKA - The Bread and Butter of AWS services Messaging
Ease of use
Read Throughput
No consumers coordination, no scaling out
management, no special libraries needed
It dynamically increase read throughput by
scaling number of tasks reading from a
queue
Single consumer
Message replayability
Once a message is processed by a
consumer, it is removed from the queue
SQS does not support replaying messages
that have already been published
Main use cases
Application integration
Decoupling microservices
Allocate tasks to multiple worker nodes
Decouple live user requests from intensive
background work
Batch messages for future processing
and so on...
Bonus: SQS CAN TRIGGER LAMBDA FUNCTIONS!
The benefits of serverless
No servers to
provision or manage
Never pay for idle
Scales with usage
Availability and fault
tolerance built in
Serverless doesn’t mean that servers are no longer involved. Serverless means:
Introducing the Event Bus
Main SQS stream
queue in which
already validated
events are put.
Docebo microservices
put events here via a
shared library.
Global Queue
Lambda functions that
saves a map between
event types and
service queues. The
subscriptions are
stored in Elasticache
(Redis).
Subscriber
The orchestrator that
pushes the events
from the main stream
into the subscribed
service queues. It
reads subscriptions
map from Redis
Dispatcher
Services queues that can
implement different
strategies/services (SQS,
DynamoDB, streams,
etc…). Each lambda reads
the “stream” and call the
subscribed webhooks for
each event.
Service Queues
The real subscribers of
all events that are
processed by Event Bus.
Consumers must be
both Docebo
microservices or internal
webhooks.
Consumers
Event Bus modules
Each module has its own responsibility
The good
● Scalability: scalability at its best,
functions and services can be
deployed as a singularity
● CI/CD: CI / CD can be
implemented with overall
benefits.
● Maintenance: ~ ZERO effort in
maintain a serverless
architecture
● Developers only do their job:
write code
The uglyThe (almost)
bad
Lesson
learned
● Cold starts (latency triggering
a function): if there is no idle
container available waiting to run
the code..
● Not 100% predictable costs: be
careful to keep running time low
and find the right amount of
memory allocated for the
function
● Nothing (for now) ● Eventual consistency is not safe,
and that’s OK!
● No bugs at first release
● Developers can focus on writing
high quality code
● Automatic tests are essential
From idea to production
The “Legacy” way
Choose Language
+ framework
Master Language
+ framework
How to realize
microservices?
Capacity Planning
Figure out
deployment
Configure CI/CD Configure AMI
Configure ELB
Configure
autoscaling
Over provision for
launch
idea production
From idea to production
The “ ” way
Choose Language
+ framework
Master Language
+ framework
How to realize
microservices?
Capacity Planning
Figure out
deployment
Configure CI/CD Configure AMI
Configure ELB
Configure
autoscaling
Over provision for
launch
idea production
Serverless is not our goal
But it’s the “stairway” to reach our goals:
Build a product
that customers
love to use
Test ideas
against the
market quickly
Iterate on good
ideas
Deliver
frequently,
deliver quickly
Focus on
creating
Business Values
Thank You!
Fabio Pirovano, Alberto Galimberti
Ad

More Related Content

What's hot (20)

Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
Srinivasan Nanduri
 
Microservices - opportunities, dilemmas and problems
Microservices - opportunities, dilemmas and problemsMicroservices - opportunities, dilemmas and problems
Microservices - opportunities, dilemmas and problems
Łukasz Sowa
 
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
Binary Studio
 
Microservice Architecture 101
Microservice Architecture 101Microservice Architecture 101
Microservice Architecture 101
Kochih Wu
 
WSO2Con ASIA 2016: DevOps & Cloud: Lessons & Stories
WSO2Con ASIA 2016: DevOps & Cloud: Lessons & StoriesWSO2Con ASIA 2016: DevOps & Cloud: Lessons & Stories
WSO2Con ASIA 2016: DevOps & Cloud: Lessons & Stories
WSO2
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
Anil Allewar
 
Orchestration Patterns for Microservices with Messaging by RabbitMQ
Orchestration Patterns for Microservices with Messaging by RabbitMQOrchestration Patterns for Microservices with Messaging by RabbitMQ
Orchestration Patterns for Microservices with Messaging by RabbitMQ
VMware Tanzu
 
Service mesh in Microservice World to Manage end to end service communications
Service mesh in Microservice World to Manage end to end service communicationsService mesh in Microservice World to Manage end to end service communications
Service mesh in Microservice World to Manage end to end service communications
Satya Syam
 
Modern Cloud Fundamentals: Misconceptions and Industry Trends
Modern Cloud Fundamentals: Misconceptions and Industry TrendsModern Cloud Fundamentals: Misconceptions and Industry Trends
Modern Cloud Fundamentals: Misconceptions and Industry Trends
Christopher Bennage
 
Accelerate DevOps/Microservices and Kubernetes
Accelerate DevOps/Microservices and KubernetesAccelerate DevOps/Microservices and Kubernetes
Accelerate DevOps/Microservices and Kubernetes
Rick Hightower
 
9 patterns of microservices
9 patterns of microservices9 patterns of microservices
9 patterns of microservices
Al Sayed Gamal
 
[SC London] "Testing Microservices: from Development to Production
[SC London] "Testing Microservices: from Development to Production[SC London] "Testing Microservices: from Development to Production
[SC London] "Testing Microservices: from Development to Production
Daniel Bryant
 
Continuous delivery by sergey seletsky
Continuous delivery by sergey seletskyContinuous delivery by sergey seletsky
Continuous delivery by sergey seletsky
Sergey Seletsky
 
#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture
Chris Richardson
 
Microservices with Node and Docker
Microservices with Node and DockerMicroservices with Node and Docker
Microservices with Node and Docker
Tony Pujals
 
NServiceBus introduction
NServiceBus introductionNServiceBus introduction
NServiceBus introduction
Ladendirekt OÜ
 
Leveraging Microservices and Apache Kafka to Scale Developer Productivity
Leveraging Microservices and Apache Kafka to Scale Developer ProductivityLeveraging Microservices and Apache Kafka to Scale Developer Productivity
Leveraging Microservices and Apache Kafka to Scale Developer Productivity
confluent
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architecture
Abdelghani Azri
 
Hosting rails apps
Hosting rails appsHosting rails apps
Hosting rails apps
Pravin Mishra
 
[WSO2Con EU 2017] Container-native Architecture
[WSO2Con EU 2017] Container-native Architecture[WSO2Con EU 2017] Container-native Architecture
[WSO2Con EU 2017] Container-native Architecture
WSO2
 
Microservices - opportunities, dilemmas and problems
Microservices - opportunities, dilemmas and problemsMicroservices - opportunities, dilemmas and problems
Microservices - opportunities, dilemmas and problems
Łukasz Sowa
 
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
Binary Studio
 
Microservice Architecture 101
Microservice Architecture 101Microservice Architecture 101
Microservice Architecture 101
Kochih Wu
 
WSO2Con ASIA 2016: DevOps & Cloud: Lessons & Stories
WSO2Con ASIA 2016: DevOps & Cloud: Lessons & StoriesWSO2Con ASIA 2016: DevOps & Cloud: Lessons & Stories
WSO2Con ASIA 2016: DevOps & Cloud: Lessons & Stories
WSO2
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
Anil Allewar
 
Orchestration Patterns for Microservices with Messaging by RabbitMQ
Orchestration Patterns for Microservices with Messaging by RabbitMQOrchestration Patterns for Microservices with Messaging by RabbitMQ
Orchestration Patterns for Microservices with Messaging by RabbitMQ
VMware Tanzu
 
Service mesh in Microservice World to Manage end to end service communications
Service mesh in Microservice World to Manage end to end service communicationsService mesh in Microservice World to Manage end to end service communications
Service mesh in Microservice World to Manage end to end service communications
Satya Syam
 
Modern Cloud Fundamentals: Misconceptions and Industry Trends
Modern Cloud Fundamentals: Misconceptions and Industry TrendsModern Cloud Fundamentals: Misconceptions and Industry Trends
Modern Cloud Fundamentals: Misconceptions and Industry Trends
Christopher Bennage
 
Accelerate DevOps/Microservices and Kubernetes
Accelerate DevOps/Microservices and KubernetesAccelerate DevOps/Microservices and Kubernetes
Accelerate DevOps/Microservices and Kubernetes
Rick Hightower
 
9 patterns of microservices
9 patterns of microservices9 patterns of microservices
9 patterns of microservices
Al Sayed Gamal
 
[SC London] "Testing Microservices: from Development to Production
[SC London] "Testing Microservices: from Development to Production[SC London] "Testing Microservices: from Development to Production
[SC London] "Testing Microservices: from Development to Production
Daniel Bryant
 
Continuous delivery by sergey seletsky
Continuous delivery by sergey seletskyContinuous delivery by sergey seletsky
Continuous delivery by sergey seletsky
Sergey Seletsky
 
#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture
Chris Richardson
 
Microservices with Node and Docker
Microservices with Node and DockerMicroservices with Node and Docker
Microservices with Node and Docker
Tony Pujals
 
NServiceBus introduction
NServiceBus introductionNServiceBus introduction
NServiceBus introduction
Ladendirekt OÜ
 
Leveraging Microservices and Apache Kafka to Scale Developer Productivity
Leveraging Microservices and Apache Kafka to Scale Developer ProductivityLeveraging Microservices and Apache Kafka to Scale Developer Productivity
Leveraging Microservices and Apache Kafka to Scale Developer Productivity
confluent
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architecture
Abdelghani Azri
 
[WSO2Con EU 2017] Container-native Architecture
[WSO2Con EU 2017] Container-native Architecture[WSO2Con EU 2017] Container-native Architecture
[WSO2Con EU 2017] Container-native Architecture
WSO2
 

Similar to Docebo: history of a journey from legacy to serverless (20)

Practical Thin Server Architecture With Dojo Sapo Codebits 2008
Practical Thin Server Architecture With Dojo Sapo Codebits 2008Practical Thin Server Architecture With Dojo Sapo Codebits 2008
Practical Thin Server Architecture With Dojo Sapo Codebits 2008
codebits
 
Practical Thin Server Architecture With Dojo Peter Svensson
Practical Thin Server Architecture With Dojo Peter SvenssonPractical Thin Server Architecture With Dojo Peter Svensson
Practical Thin Server Architecture With Dojo Peter Svensson
rajivmordani
 
Application Modernisation through Event-Driven Microservices
Application Modernisation through Event-Driven Microservices Application Modernisation through Event-Driven Microservices
Application Modernisation through Event-Driven Microservices
confluent
 
When to use serverless computing.pdf
When to use serverless computing.pdfWhen to use serverless computing.pdf
When to use serverless computing.pdf
seo18
 
Going Serverless on AWS
Going Serverless on AWSGoing Serverless on AWS
Going Serverless on AWS
Aleksandr Maklakov
 
Jeffrey Richter
Jeffrey RichterJeffrey Richter
Jeffrey Richter
CodeFest
 
Get the Message Across: Seamlessly Transport Data to Apps, Anywhere
Get the Message Across: Seamlessly Transport Data to Apps, AnywhereGet the Message Across: Seamlessly Transport Data to Apps, Anywhere
Get the Message Across: Seamlessly Transport Data to Apps, Anywhere
VMware Tanzu
 
Full lifecycle of a microservice
Full lifecycle of a microserviceFull lifecycle of a microservice
Full lifecycle of a microservice
Luigi Bennardis
 
'How to build efficient backend based on microservice architecture' by Anton ...
'How to build efficient backend based on microservice architecture' by Anton ...'How to build efficient backend based on microservice architecture' by Anton ...
'How to build efficient backend based on microservice architecture' by Anton ...
OdessaJS Conf
 
When to use serverless computing.pdf
When to use serverless computing.pdfWhen to use serverless computing.pdf
When to use serverless computing.pdf
SGBSeo
 
Service-Mesh-Presentation.pdf
Service-Mesh-Presentation.pdfService-Mesh-Presentation.pdf
Service-Mesh-Presentation.pdf
chanhluc2112
 
Do You Need A Service Mesh?
Do You Need A Service Mesh?Do You Need A Service Mesh?
Do You Need A Service Mesh?
NGINX, Inc.
 
Arsitektur Aplikasi Modern - Faisal Henry Susanto
Arsitektur Aplikasi Modern - Faisal Henry SusantoArsitektur Aplikasi Modern - Faisal Henry Susanto
Arsitektur Aplikasi Modern - Faisal Henry Susanto
DicodingEvent
 
Cloud-native Data: Every Microservice Needs a Cache
Cloud-native Data: Every Microservice Needs a CacheCloud-native Data: Every Microservice Needs a Cache
Cloud-native Data: Every Microservice Needs a Cache
cornelia davis
 
Nginx Conference 2016 - Learnings and State of the Industry
Nginx Conference 2016 - Learnings and State of the IndustryNginx Conference 2016 - Learnings and State of the Industry
Nginx Conference 2016 - Learnings and State of the Industry
Benjamin Scholler
 
Exposing Lambda Functions as Managed APIs
Exposing Lambda Functions as Managed APIsExposing Lambda Functions as Managed APIs
Exposing Lambda Functions as Managed APIs
WSO2
 
Build A Scalable Mobile App
Build A Scalable Mobile App Build A Scalable Mobile App
Build A Scalable Mobile App
Mohamed Aboul-Fotouh
 
Deconstructing Monoliths with Domain Driven Design
Deconstructing Monoliths with Domain Driven DesignDeconstructing Monoliths with Domain Driven Design
Deconstructing Monoliths with Domain Driven Design
VMware Tanzu
 
Advanced Full Stack Development: Scaling, Deployment, and Maintenance
Advanced Full Stack Development: Scaling, Deployment, and MaintenanceAdvanced Full Stack Development: Scaling, Deployment, and Maintenance
Advanced Full Stack Development: Scaling, Deployment, and Maintenance
saniakhan8105
 
Internet applications unit1
Internet applications unit1Internet applications unit1
Internet applications unit1
MSc CST
 
Practical Thin Server Architecture With Dojo Sapo Codebits 2008
Practical Thin Server Architecture With Dojo Sapo Codebits 2008Practical Thin Server Architecture With Dojo Sapo Codebits 2008
Practical Thin Server Architecture With Dojo Sapo Codebits 2008
codebits
 
Practical Thin Server Architecture With Dojo Peter Svensson
Practical Thin Server Architecture With Dojo Peter SvenssonPractical Thin Server Architecture With Dojo Peter Svensson
Practical Thin Server Architecture With Dojo Peter Svensson
rajivmordani
 
Application Modernisation through Event-Driven Microservices
Application Modernisation through Event-Driven Microservices Application Modernisation through Event-Driven Microservices
Application Modernisation through Event-Driven Microservices
confluent
 
When to use serverless computing.pdf
When to use serverless computing.pdfWhen to use serverless computing.pdf
When to use serverless computing.pdf
seo18
 
Jeffrey Richter
Jeffrey RichterJeffrey Richter
Jeffrey Richter
CodeFest
 
Get the Message Across: Seamlessly Transport Data to Apps, Anywhere
Get the Message Across: Seamlessly Transport Data to Apps, AnywhereGet the Message Across: Seamlessly Transport Data to Apps, Anywhere
Get the Message Across: Seamlessly Transport Data to Apps, Anywhere
VMware Tanzu
 
Full lifecycle of a microservice
Full lifecycle of a microserviceFull lifecycle of a microservice
Full lifecycle of a microservice
Luigi Bennardis
 
'How to build efficient backend based on microservice architecture' by Anton ...
'How to build efficient backend based on microservice architecture' by Anton ...'How to build efficient backend based on microservice architecture' by Anton ...
'How to build efficient backend based on microservice architecture' by Anton ...
OdessaJS Conf
 
When to use serverless computing.pdf
When to use serverless computing.pdfWhen to use serverless computing.pdf
When to use serverless computing.pdf
SGBSeo
 
Service-Mesh-Presentation.pdf
Service-Mesh-Presentation.pdfService-Mesh-Presentation.pdf
Service-Mesh-Presentation.pdf
chanhluc2112
 
Do You Need A Service Mesh?
Do You Need A Service Mesh?Do You Need A Service Mesh?
Do You Need A Service Mesh?
NGINX, Inc.
 
Arsitektur Aplikasi Modern - Faisal Henry Susanto
Arsitektur Aplikasi Modern - Faisal Henry SusantoArsitektur Aplikasi Modern - Faisal Henry Susanto
Arsitektur Aplikasi Modern - Faisal Henry Susanto
DicodingEvent
 
Cloud-native Data: Every Microservice Needs a Cache
Cloud-native Data: Every Microservice Needs a CacheCloud-native Data: Every Microservice Needs a Cache
Cloud-native Data: Every Microservice Needs a Cache
cornelia davis
 
Nginx Conference 2016 - Learnings and State of the Industry
Nginx Conference 2016 - Learnings and State of the IndustryNginx Conference 2016 - Learnings and State of the Industry
Nginx Conference 2016 - Learnings and State of the Industry
Benjamin Scholler
 
Exposing Lambda Functions as Managed APIs
Exposing Lambda Functions as Managed APIsExposing Lambda Functions as Managed APIs
Exposing Lambda Functions as Managed APIs
WSO2
 
Deconstructing Monoliths with Domain Driven Design
Deconstructing Monoliths with Domain Driven DesignDeconstructing Monoliths with Domain Driven Design
Deconstructing Monoliths with Domain Driven Design
VMware Tanzu
 
Advanced Full Stack Development: Scaling, Deployment, and Maintenance
Advanced Full Stack Development: Scaling, Deployment, and MaintenanceAdvanced Full Stack Development: Scaling, Deployment, and Maintenance
Advanced Full Stack Development: Scaling, Deployment, and Maintenance
saniakhan8105
 
Internet applications unit1
Internet applications unit1Internet applications unit1
Internet applications unit1
MSc CST
 
Ad

Recently uploaded (16)

cxbcxfzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz7.pdf
cxbcxfzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz7.pdfcxbcxfzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz7.pdf
cxbcxfzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz7.pdf
ssuser060b2e1
 
Cyber Safety: security measure about navegating on internet.
Cyber Safety: security measure about navegating on internet.Cyber Safety: security measure about navegating on internet.
Cyber Safety: security measure about navegating on internet.
manugodinhogentil
 
OSI TCP IP Protocol Layers description f
OSI TCP IP Protocol Layers description fOSI TCP IP Protocol Layers description f
OSI TCP IP Protocol Layers description f
cbr49917
 
AI Days 2025_GM1 : Interface in theage of AI
AI Days 2025_GM1 : Interface in theage of AIAI Days 2025_GM1 : Interface in theage of AI
AI Days 2025_GM1 : Interface in theage of AI
Prashant Singh
 
Best web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you businessBest web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you business
steve198109
 
Determining Glass is mechanical textile
Determining  Glass is mechanical textileDetermining  Glass is mechanical textile
Determining Glass is mechanical textile
Azizul Hakim
 
Organizing_Data_Grade4 how to organize.pptx
Organizing_Data_Grade4 how to organize.pptxOrganizing_Data_Grade4 how to organize.pptx
Organizing_Data_Grade4 how to organize.pptx
AllanGuevarra1
 
Grade 7 Google_Sites_Lesson creating website.pptx
Grade 7 Google_Sites_Lesson creating website.pptxGrade 7 Google_Sites_Lesson creating website.pptx
Grade 7 Google_Sites_Lesson creating website.pptx
AllanGuevarra1
 
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHostingTop Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
steve198109
 
project_based_laaaaaaaaaaearning,kelompok 10.pptx
project_based_laaaaaaaaaaearning,kelompok 10.pptxproject_based_laaaaaaaaaaearning,kelompok 10.pptx
project_based_laaaaaaaaaaearning,kelompok 10.pptx
redzuriel13
 
Breaching The Perimeter - Our Most Impactful Bug Bounty Findings.pdf
Breaching The Perimeter - Our Most Impactful Bug Bounty Findings.pdfBreaching The Perimeter - Our Most Impactful Bug Bounty Findings.pdf
Breaching The Perimeter - Our Most Impactful Bug Bounty Findings.pdf
Nirmalthapa24
 
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 SupportReliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
steve198109
 
highend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptxhighend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptx
elhadjcheikhdiop
 
(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security
aluacharya169
 
5-Ways-To-Future-Proof-Your-SIEM-Securonix[1].pdf
5-Ways-To-Future-Proof-Your-SIEM-Securonix[1].pdf5-Ways-To-Future-Proof-Your-SIEM-Securonix[1].pdf
5-Ways-To-Future-Proof-Your-SIEM-Securonix[1].pdf
AndrHenrique77
 
Seminar.MAJor presentation for final project viva
Seminar.MAJor presentation for final project vivaSeminar.MAJor presentation for final project viva
Seminar.MAJor presentation for final project viva
daditya2501
 
cxbcxfzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz7.pdf
cxbcxfzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz7.pdfcxbcxfzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz7.pdf
cxbcxfzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz7.pdf
ssuser060b2e1
 
Cyber Safety: security measure about navegating on internet.
Cyber Safety: security measure about navegating on internet.Cyber Safety: security measure about navegating on internet.
Cyber Safety: security measure about navegating on internet.
manugodinhogentil
 
OSI TCP IP Protocol Layers description f
OSI TCP IP Protocol Layers description fOSI TCP IP Protocol Layers description f
OSI TCP IP Protocol Layers description f
cbr49917
 
AI Days 2025_GM1 : Interface in theage of AI
AI Days 2025_GM1 : Interface in theage of AIAI Days 2025_GM1 : Interface in theage of AI
AI Days 2025_GM1 : Interface in theage of AI
Prashant Singh
 
Best web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you businessBest web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you business
steve198109
 
Determining Glass is mechanical textile
Determining  Glass is mechanical textileDetermining  Glass is mechanical textile
Determining Glass is mechanical textile
Azizul Hakim
 
Organizing_Data_Grade4 how to organize.pptx
Organizing_Data_Grade4 how to organize.pptxOrganizing_Data_Grade4 how to organize.pptx
Organizing_Data_Grade4 how to organize.pptx
AllanGuevarra1
 
Grade 7 Google_Sites_Lesson creating website.pptx
Grade 7 Google_Sites_Lesson creating website.pptxGrade 7 Google_Sites_Lesson creating website.pptx
Grade 7 Google_Sites_Lesson creating website.pptx
AllanGuevarra1
 
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHostingTop Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
steve198109
 
project_based_laaaaaaaaaaearning,kelompok 10.pptx
project_based_laaaaaaaaaaearning,kelompok 10.pptxproject_based_laaaaaaaaaaearning,kelompok 10.pptx
project_based_laaaaaaaaaaearning,kelompok 10.pptx
redzuriel13
 
Breaching The Perimeter - Our Most Impactful Bug Bounty Findings.pdf
Breaching The Perimeter - Our Most Impactful Bug Bounty Findings.pdfBreaching The Perimeter - Our Most Impactful Bug Bounty Findings.pdf
Breaching The Perimeter - Our Most Impactful Bug Bounty Findings.pdf
Nirmalthapa24
 
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 SupportReliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
steve198109
 
highend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptxhighend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptx
elhadjcheikhdiop
 
(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security
aluacharya169
 
5-Ways-To-Future-Proof-Your-SIEM-Securonix[1].pdf
5-Ways-To-Future-Proof-Your-SIEM-Securonix[1].pdf5-Ways-To-Future-Proof-Your-SIEM-Securonix[1].pdf
5-Ways-To-Future-Proof-Your-SIEM-Securonix[1].pdf
AndrHenrique77
 
Seminar.MAJor presentation for final project viva
Seminar.MAJor presentation for final project vivaSeminar.MAJor presentation for final project viva
Seminar.MAJor presentation for final project viva
daditya2501
 
Ad

Docebo: history of a journey from legacy to serverless

  • 1. From legacy to serverless history of a transformation
  • 3. User interface Business layer (MVC) Data interface Data layerBrowser Web Server Monolith
  • 4. The good ● Fewer Cross-cutting Concerns: logging, security features such as audit trails, xss and DOS protection, rate limiting are shared across the code base. ● Less Operational Overhead: Less deployment complexity, monitoring, testing and logging. ● Development ease: building a monolithic application is far less complex and need less developer resources (also less specialization) ● Performance: no multiple API call means less overhead time that could lead to a better overall performance The uglyThe bad Lesson learned ● Harder to understand: can have lots of dependencies, side- effects, and magic which are not straight forward for the new comer ● Harder to change: a large codebase harder to understand is also harder to change. ● CI/CD: implementing a CI / CD pipeline leads to a continuous complete redeployment. ● Scalability: If you need to scale fast you are in for big bucks, costs will likely grow exponentially. ● Poor reliability: a single bug could take the whole system down. ● Slowness: as the code base grows, overall system performance decreases ● Monolith are the starting point of any small business and as it scales up a choice must be taken, microservices with monolith core or full microservices architecture?
  • 5. The spiral staircase Microservice architecture with a monolithic core
  • 6. User interface Business layer (MVC)x Data layer Browser Proxy Microservice architecture with a monolithic core Orchestration Service A Service B Service C Service Z ... Monolithic
  • 7. The good ● Scalability: scalability is good, microservices can be deployed as a singularity. ● CI/CD: CI / CD can be implemented with overall benefits. ● Maintenance: Easier to understand and maintain The uglyThe bad Lesson learned ● More Operational Overhead: More deployment complexity, monitoring, testing and logging. ● Monolith database: the database is still the one from the monolith architecture ● Shared core: The core is shared among all microservices (dependency) this also means project codebase ● Legacy code: it’s still among us but this is not the architecture’s fault. ● REST API can tend to be developed in an unRESTful way based on developer “sensitivity”. Not much control over code quality due to the stringent scale up deadlines. ● Lots of bugs at first release. ● It works well, scales well and with CI/CD in place the quality of new releases has grown.
  • 9. We had some issues... All microservices in our backend app were highly dependent on one another. When a MS requires a resource from another MS, the first must know what data is needed by the other one Tight coupling All communications between microservice were done by a sync API call. This caused some issue when performing heavy operations on DB (like importing users). Blocking sync execution There was no standard procedure to manage errors occurred while an event is triggered and captured by another service, Error handling When an event is triggered and a microservice service fails, the event is lost and not recoverable, causing discrepancy in DB and manual work to recover missing data. Rigidity
  • 10. How to solve them, then? MESSAGE QUEUES! Wow, but i don’t want to pay for idle… maybe a “serverless” service? But there are so many services out there... Let’s try with an AWS managed service
  • 11. Simple Queue Service AKA - The Bread and Butter of AWS services Messaging Ease of use Read Throughput No consumers coordination, no scaling out management, no special libraries needed It dynamically increase read throughput by scaling number of tasks reading from a queue Single consumer Message replayability Once a message is processed by a consumer, it is removed from the queue SQS does not support replaying messages that have already been published Main use cases Application integration Decoupling microservices Allocate tasks to multiple worker nodes Decouple live user requests from intensive background work Batch messages for future processing and so on... Bonus: SQS CAN TRIGGER LAMBDA FUNCTIONS!
  • 12. The benefits of serverless No servers to provision or manage Never pay for idle Scales with usage Availability and fault tolerance built in Serverless doesn’t mean that servers are no longer involved. Serverless means:
  • 14. Main SQS stream queue in which already validated events are put. Docebo microservices put events here via a shared library. Global Queue Lambda functions that saves a map between event types and service queues. The subscriptions are stored in Elasticache (Redis). Subscriber The orchestrator that pushes the events from the main stream into the subscribed service queues. It reads subscriptions map from Redis Dispatcher Services queues that can implement different strategies/services (SQS, DynamoDB, streams, etc…). Each lambda reads the “stream” and call the subscribed webhooks for each event. Service Queues The real subscribers of all events that are processed by Event Bus. Consumers must be both Docebo microservices or internal webhooks. Consumers Event Bus modules Each module has its own responsibility
  • 15. The good ● Scalability: scalability at its best, functions and services can be deployed as a singularity ● CI/CD: CI / CD can be implemented with overall benefits. ● Maintenance: ~ ZERO effort in maintain a serverless architecture ● Developers only do their job: write code The uglyThe (almost) bad Lesson learned ● Cold starts (latency triggering a function): if there is no idle container available waiting to run the code.. ● Not 100% predictable costs: be careful to keep running time low and find the right amount of memory allocated for the function ● Nothing (for now) ● Eventual consistency is not safe, and that’s OK! ● No bugs at first release ● Developers can focus on writing high quality code ● Automatic tests are essential
  • 16. From idea to production The “Legacy” way Choose Language + framework Master Language + framework How to realize microservices? Capacity Planning Figure out deployment Configure CI/CD Configure AMI Configure ELB Configure autoscaling Over provision for launch idea production
  • 17. From idea to production The “ ” way Choose Language + framework Master Language + framework How to realize microservices? Capacity Planning Figure out deployment Configure CI/CD Configure AMI Configure ELB Configure autoscaling Over provision for launch idea production
  • 18. Serverless is not our goal But it’s the “stairway” to reach our goals: Build a product that customers love to use Test ideas against the market quickly Iterate on good ideas Deliver frequently, deliver quickly Focus on creating Business Values
  • 19. Thank You! Fabio Pirovano, Alberto Galimberti