SlideShare a Scribd company logo
Add Title
Subtitle
Building on spring
boot lastminute.com
microservices way
Michele Orsi and Luca Viola @Spring IO, 18-19 May 2017
The relevant and inspiring travel company
2
A tech company to the core
3
● tech department: 300+ people
● applications: ~150
● database: ~180 database schemas and ~50TB of data
● servers: 1400 VMs, 300 physical machines
● locations: Chiasso, Milan, Madrid, London, Bengaluru
At the beginning DEVs created the Monolith
4
credits https://www.flickr.com/photos/southtopia/5702790189
5
List of
flights
What’s the most critical part in the monolith?
Flight
selected
Checkout
page
6
1. identify a feature and a business opportunity
○ new UX on checkout page
2. extract and wrap into a service
3. measure improvements
(Agile procedure to prepare the new development)
The first process of extraction
7
● high coupling from
○ a functional point of view
○ an architectural point of view
● configuration hell
○ Tomcat
○ env variables, properties, etc ..
● dependency hell
○ different libraries/versions
Monolith: the micro-problems
8
● well known inside our company
● simplify development
● bounded configuration
○ application.yaml
○ java-opts.yaml
● self-contained deployability
○ tomcat now inside the jar
Spring boot at the core
9
… and it worked!
credits https://www.pexels.com/photo/hand-thumbs-up-thumb-black-and-white-8252/
Improvements
● conversion improved
● service is easier to
○ maintain
○ make experiment with
○ create
● developer friendly
11
.. ready to follow the micro-service way!
credits https://www.pexels.com/photo/women-standing-on-race-track-while-preparing-for-a-run-race-during-daytime-28554/
Issues (1): low-level
13
● LACK OF alignment across micro-service
○ solutions
○ libraries
○ logging/tracing
○ monitoring/alerting
● LACK OF awareness about OPS
● LACK OF alignment across environments
Issues (2): higher perspective
14
● reinventing the wheel
● different tools for same issues
● weak contribution model
○ many silos
Our objectives
15
● hexagonal architecture at the core
● software alignment
● centralized monitoring/logging, with alerts
● zero downtime deployment
● automation everywhere
A year-long endeavour
16
● build the first company framework
● build a new, modern infrastructure
● migrate the search (flight/hotel) product there
... without:
● impacting the business
Two new teams: platform and devops
17
credits https://www.pexels.com/photo/blue-lego-toy-beside-orange-and-white-lego-toy-standing-during-daytime-105822/
Team objectives
18
● Platform team
○ servant leadership (no ivory tower)
○ develop the framework and common services
○ support adoption
● Devops team
○ focus on automation
■ building pipelines (CI + CD)
Hexagonal Architecture (Port and Adapters)
19
● designed for testability
● independent from tech
(framework, DB, client for
external services)
● independent from UI
Tailored service template (cit. Thoughtworks)
20
[..] which can be used to quickly seed new services,
pre-configured to operate within that organization's
production environment [..] This is a very useful technique
for encouraging collaborative evolution while retaining
lightweight governance
Platform framework: a thin layer
21
● common logging format
● common metrics (monitoring/alerting)
● common tracing format
● centralized dependency management
● smart HTTP Client
● Kubernetes lifecycle (graceful startup/shutdown)
Platform framework: based on Spring Boot
22
● self-contained uber jar
● easier to debug
● configuration is now inside the artifact
● run from command line
● pragmatic test approach, also for integration tests
Complexity in the new infrastructure
23
NODE
1
NODE
70
...
APP3-PRODUCTION
APP2-PRODUCTION
cluster
pod pod
pod
BASE OS
JAVA SRE
START/STOP
JAR APP
Healthy use case: self-healing
24
"When a container is dead I will restart it"
"When a container is ready I will forward traffic to it"
A common solution for all the micro-services
25
/liveness
● when tomcat container is up
● when ratio active/max threads < threshold
/readiness
● all the startup jobs have run
.. ongoing never-ending research ..
Graceful startup: ONE implementation
26
@Autowired(required = false)
private CompletableFuture run(Collection<AsyncJob> jobs)
{
return allOf(jobs.stream().map(job -> runAsync(() -> job.execute()))
.toArray(CompletableFuture[]::new))
.thenAccept(this::raiseReadinessUp)
.exceptionally(this::shutdown);
}
JobsExecutor.java
Platform framework adoption
27
Platform framework adoption
credits https://www.pexels.com/photo/landscape-nature-holiday-vacation-92870/
Platform framework from a team perspective (1)
28
● focus on application domain
● focus on features to develop
● better understanding of what happens inside
Platform framework from a team perspective (2)
29
● always aligned with latest technologies
● lightweight governance
● a platform that encourages contribution
Platform framework from platform engineering perspective
30
● where do the problems lay?
○ not anymore in the smaller components
○ now at the border
● Check how different micro-services work together
○ (Only in case of centralised logging and monitoring)
Innovation: KeyValueStorage port example
31
public interface KeyValueStorageService
{
boolean put(ValueStored data);
ValueStored get(String key);
void delete(String key);
Date findLastUpdateById(String key);
}
KeyValueStorageService.java
Innovation
32
● KeyValueStorage
○ Mysql adapter
○ Google BigTable adapter (in the cloud)
● easy to change tech part, maintaining domain one
● PlatformFw
○ initializes application (main partition)
○ is the platform adapter
Evolution
33
● 1st step: align tech services
○ distributed cache
○ distributed session
● 2nd step: align business components
○ GIS library
○ money library
○ currency library
Platform framework contribution model
34
● initially perceived as a foreign body
○ .. but it really solved problems
● scale
○ on common efforts
○ sharing solutions across organisation
○ in a more structured way
● sandbox model before platform framework
Automate Everything: pipeline DSL
35
microservice = factory.newDeployRequest()
.withArtifact("com.lastminute.application1",2)
.fromGitRepo("git.lastminute.com/team/application")
lmn_deployCanaryStrategy(microservice,"qa")
lmn_deployCanaryStrategy(microservice,"preview")
lmn_deployCanaryStrategy(microservice,"production")
pipeline
Automate Everything: pipeline
36
pull
jar
build
docker
(gate)
QA
canary
(gate)
QA
stable
(gate)
PREV
canary
(gate)
PREV
stable
(gate)
PROD
canary
(gate)
PROD
stable
● git push
○ Continuous Integration
○ Continuous Delivery
Give me the numbers!
37
● app migration in 1/2 weeks, 1/2 people
● 40 micro-services migrated in 6 months
● 5K req/sec generates 1.5M metrics/minute flows
● whole pipeline runs in 16 minutes
Thanks!
michele.orsi@lastminute.com
luca.viola@lastminute.com

More Related Content

What's hot

The Other WatchKit
The Other WatchKitThe Other WatchKit
The Other WatchKit
Alexsander Akers
 
Marble Virtual Globe for Developers - Factsheet
Marble Virtual Globe for Developers - FactsheetMarble Virtual Globe for Developers - Factsheet
Marble Virtual Globe for Developers - Factsheet
Marble Virtual Globe
 
Building container images - Dockerfiles, Google/Kaniko, Projectatomic/buildah...
Building container images - Dockerfiles, Google/Kaniko, Projectatomic/buildah...Building container images - Dockerfiles, Google/Kaniko, Projectatomic/buildah...
Building container images - Dockerfiles, Google/Kaniko, Projectatomic/buildah...
CloudYuga
 
Kolla Project Update (Vancouver 2018)
Kolla Project Update (Vancouver 2018)Kolla Project Update (Vancouver 2018)
Kolla Project Update (Vancouver 2018)
Paul Bourke
 
Cloud Computing in practice with OpenNebula ~ Develer workshop 2012
Cloud Computing in practice with OpenNebula ~ Develer workshop 2012Cloud Computing in practice with OpenNebula ~ Develer workshop 2012
Cloud Computing in practice with OpenNebula ~ Develer workshop 2012Giovanni Toraldo
 
Is WebAssembly the killer of JavaScript?
Is WebAssembly the killer of JavaScript?Is WebAssembly the killer of JavaScript?
Is WebAssembly the killer of JavaScript?
Boyan Mihaylov
 
WKP 2.4 Delivers GitOps Anywhere
WKP 2.4 Delivers GitOps AnywhereWKP 2.4 Delivers GitOps Anywhere
WKP 2.4 Delivers GitOps Anywhere
Weaveworks
 
Eclipse Buildship DemoCamp Hamburg (June 2015) with additional screenshots
Eclipse Buildship DemoCamp Hamburg (June 2015)  with additional screenshotsEclipse Buildship DemoCamp Hamburg (June 2015)  with additional screenshots
Eclipse Buildship DemoCamp Hamburg (June 2015) with additional screenshots
simonscholz
 

What's hot (8)

The Other WatchKit
The Other WatchKitThe Other WatchKit
The Other WatchKit
 
Marble Virtual Globe for Developers - Factsheet
Marble Virtual Globe for Developers - FactsheetMarble Virtual Globe for Developers - Factsheet
Marble Virtual Globe for Developers - Factsheet
 
Building container images - Dockerfiles, Google/Kaniko, Projectatomic/buildah...
Building container images - Dockerfiles, Google/Kaniko, Projectatomic/buildah...Building container images - Dockerfiles, Google/Kaniko, Projectatomic/buildah...
Building container images - Dockerfiles, Google/Kaniko, Projectatomic/buildah...
 
Kolla Project Update (Vancouver 2018)
Kolla Project Update (Vancouver 2018)Kolla Project Update (Vancouver 2018)
Kolla Project Update (Vancouver 2018)
 
Cloud Computing in practice with OpenNebula ~ Develer workshop 2012
Cloud Computing in practice with OpenNebula ~ Develer workshop 2012Cloud Computing in practice with OpenNebula ~ Develer workshop 2012
Cloud Computing in practice with OpenNebula ~ Develer workshop 2012
 
Is WebAssembly the killer of JavaScript?
Is WebAssembly the killer of JavaScript?Is WebAssembly the killer of JavaScript?
Is WebAssembly the killer of JavaScript?
 
WKP 2.4 Delivers GitOps Anywhere
WKP 2.4 Delivers GitOps AnywhereWKP 2.4 Delivers GitOps Anywhere
WKP 2.4 Delivers GitOps Anywhere
 
Eclipse Buildship DemoCamp Hamburg (June 2015) with additional screenshots
Eclipse Buildship DemoCamp Hamburg (June 2015)  with additional screenshotsEclipse Buildship DemoCamp Hamburg (June 2015)  with additional screenshots
Eclipse Buildship DemoCamp Hamburg (June 2015) with additional screenshots
 

Similar to Building on spring boot lastminute.com microservices way (Spring IO Barcelona 2017)

SACON NY 19: "Creating an effective developer experience for cloud-native apps"
SACON NY 19: "Creating an effective developer experience for cloud-native apps"SACON NY 19: "Creating an effective developer experience for cloud-native apps"
SACON NY 19: "Creating an effective developer experience for cloud-native apps"
Daniel Bryant
 
Sprint 68
Sprint 68Sprint 68
Sprint 68
ManageIQ
 
muCon 2019: "Creating an Effective Developer Experience for Cloud-Native Apps"
muCon 2019: "Creating an Effective Developer Experience for Cloud-Native Apps"muCon 2019: "Creating an Effective Developer Experience for Cloud-Native Apps"
muCon 2019: "Creating an Effective Developer Experience for Cloud-Native Apps"
Daniel Bryant
 
microXchg 2019: "Creating an Effective Developer Experience for Cloud-Native ...
microXchg 2019: "Creating an Effective Developer Experience for Cloud-Native ...microXchg 2019: "Creating an Effective Developer Experience for Cloud-Native ...
microXchg 2019: "Creating an Effective Developer Experience for Cloud-Native ...
Daniel Bryant
 
Sprint 62
Sprint 62Sprint 62
Sprint 62
ManageIQ
 
Sprint 54
Sprint 54Sprint 54
Sprint 54
ManageIQ
 
Velocity NY 2018 "The Cloud Native Developer Workflow"
Velocity NY 2018 "The Cloud Native Developer Workflow"Velocity NY 2018 "The Cloud Native Developer Workflow"
Velocity NY 2018 "The Cloud Native Developer Workflow"
Daniel Bryant
 
Sprint 60
Sprint 60Sprint 60
Sprint 60
ManageIQ
 
CloudNativeLondon 2018: "In Search of the Perfect Cloud Native Developer Expe...
CloudNativeLondon 2018: "In Search of the Perfect Cloud Native Developer Expe...CloudNativeLondon 2018: "In Search of the Perfect Cloud Native Developer Expe...
CloudNativeLondon 2018: "In Search of the Perfect Cloud Native Developer Expe...
Daniel Bryant
 
Anypoint Tools and MuleSoft Automation (DRAFT).pptx
Anypoint Tools and MuleSoft Automation (DRAFT).pptxAnypoint Tools and MuleSoft Automation (DRAFT).pptx
Anypoint Tools and MuleSoft Automation (DRAFT).pptx
Akshata Sawant
 
MuleSoft Meetup #9 - Anypoint Tools and MuleSoft Automation (FINAL).pptx
MuleSoft Meetup #9 - Anypoint Tools and MuleSoft Automation (FINAL).pptxMuleSoft Meetup #9 - Anypoint Tools and MuleSoft Automation (FINAL).pptx
MuleSoft Meetup #9 - Anypoint Tools and MuleSoft Automation (FINAL).pptx
Steve Clarke
 
JAX DevOps 2019: "Creating an Effective Developer Experience for Cloud-native...
JAX DevOps 2019: "Creating an Effective Developer Experience for Cloud-native...JAX DevOps 2019: "Creating an Effective Developer Experience for Cloud-native...
JAX DevOps 2019: "Creating an Effective Developer Experience for Cloud-native...
Daniel Bryant
 
Sprint 53
Sprint 53Sprint 53
Sprint 53
ManageIQ
 
Apache Airflow in Production
Apache Airflow in ProductionApache Airflow in Production
Apache Airflow in Production
Robert Sanders
 
Sprint 50 review
Sprint 50 reviewSprint 50 review
Sprint 50 review
ManageIQ
 
Sprint 65
Sprint 65Sprint 65
Sprint 65
ManageIQ
 
FORWARD 5 Key Highlights and Product Updates - Philadelphia Chapter
FORWARD 5 Key Highlights and Product Updates - Philadelphia ChapterFORWARD 5 Key Highlights and Product Updates - Philadelphia Chapter
FORWARD 5 Key Highlights and Product Updates - Philadelphia Chapter
Diana Gray, MBA
 
Transforming mission-critical applications on mainframes for innovation
Transforming mission-critical applications on mainframes for innovationTransforming mission-critical applications on mainframes for innovation
Transforming mission-critical applications on mainframes for innovation
Eranea
 
Journey to Containerized Application / Google Container Engine
Journey to Containerized Application / Google Container EngineJourney to Containerized Application / Google Container Engine
Journey to Containerized Application / Google Container Engine
Google Cloud Platform - Japan
 
Promise of DevOps
Promise of DevOpsPromise of DevOps
Promise of DevOps
Juraj Hantak
 

Similar to Building on spring boot lastminute.com microservices way (Spring IO Barcelona 2017) (20)

SACON NY 19: "Creating an effective developer experience for cloud-native apps"
SACON NY 19: "Creating an effective developer experience for cloud-native apps"SACON NY 19: "Creating an effective developer experience for cloud-native apps"
SACON NY 19: "Creating an effective developer experience for cloud-native apps"
 
Sprint 68
Sprint 68Sprint 68
Sprint 68
 
muCon 2019: "Creating an Effective Developer Experience for Cloud-Native Apps"
muCon 2019: "Creating an Effective Developer Experience for Cloud-Native Apps"muCon 2019: "Creating an Effective Developer Experience for Cloud-Native Apps"
muCon 2019: "Creating an Effective Developer Experience for Cloud-Native Apps"
 
microXchg 2019: "Creating an Effective Developer Experience for Cloud-Native ...
microXchg 2019: "Creating an Effective Developer Experience for Cloud-Native ...microXchg 2019: "Creating an Effective Developer Experience for Cloud-Native ...
microXchg 2019: "Creating an Effective Developer Experience for Cloud-Native ...
 
Sprint 62
Sprint 62Sprint 62
Sprint 62
 
Sprint 54
Sprint 54Sprint 54
Sprint 54
 
Velocity NY 2018 "The Cloud Native Developer Workflow"
Velocity NY 2018 "The Cloud Native Developer Workflow"Velocity NY 2018 "The Cloud Native Developer Workflow"
Velocity NY 2018 "The Cloud Native Developer Workflow"
 
Sprint 60
Sprint 60Sprint 60
Sprint 60
 
CloudNativeLondon 2018: "In Search of the Perfect Cloud Native Developer Expe...
CloudNativeLondon 2018: "In Search of the Perfect Cloud Native Developer Expe...CloudNativeLondon 2018: "In Search of the Perfect Cloud Native Developer Expe...
CloudNativeLondon 2018: "In Search of the Perfect Cloud Native Developer Expe...
 
Anypoint Tools and MuleSoft Automation (DRAFT).pptx
Anypoint Tools and MuleSoft Automation (DRAFT).pptxAnypoint Tools and MuleSoft Automation (DRAFT).pptx
Anypoint Tools and MuleSoft Automation (DRAFT).pptx
 
MuleSoft Meetup #9 - Anypoint Tools and MuleSoft Automation (FINAL).pptx
MuleSoft Meetup #9 - Anypoint Tools and MuleSoft Automation (FINAL).pptxMuleSoft Meetup #9 - Anypoint Tools and MuleSoft Automation (FINAL).pptx
MuleSoft Meetup #9 - Anypoint Tools and MuleSoft Automation (FINAL).pptx
 
JAX DevOps 2019: "Creating an Effective Developer Experience for Cloud-native...
JAX DevOps 2019: "Creating an Effective Developer Experience for Cloud-native...JAX DevOps 2019: "Creating an Effective Developer Experience for Cloud-native...
JAX DevOps 2019: "Creating an Effective Developer Experience for Cloud-native...
 
Sprint 53
Sprint 53Sprint 53
Sprint 53
 
Apache Airflow in Production
Apache Airflow in ProductionApache Airflow in Production
Apache Airflow in Production
 
Sprint 50 review
Sprint 50 reviewSprint 50 review
Sprint 50 review
 
Sprint 65
Sprint 65Sprint 65
Sprint 65
 
FORWARD 5 Key Highlights and Product Updates - Philadelphia Chapter
FORWARD 5 Key Highlights and Product Updates - Philadelphia ChapterFORWARD 5 Key Highlights and Product Updates - Philadelphia Chapter
FORWARD 5 Key Highlights and Product Updates - Philadelphia Chapter
 
Transforming mission-critical applications on mainframes for innovation
Transforming mission-critical applications on mainframes for innovationTransforming mission-critical applications on mainframes for innovation
Transforming mission-critical applications on mainframes for innovation
 
Journey to Containerized Application / Google Container Engine
Journey to Containerized Application / Google Container EngineJourney to Containerized Application / Google Container Engine
Journey to Containerized Application / Google Container Engine
 
Promise of DevOps
Promise of DevOpsPromise of DevOps
Promise of DevOps
 

Recently uploaded

20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 

Recently uploaded (20)

20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 

Building on spring boot lastminute.com microservices way (Spring IO Barcelona 2017)

  • 1. Add Title Subtitle Building on spring boot lastminute.com microservices way Michele Orsi and Luca Viola @Spring IO, 18-19 May 2017
  • 2. The relevant and inspiring travel company 2
  • 3. A tech company to the core 3 ● tech department: 300+ people ● applications: ~150 ● database: ~180 database schemas and ~50TB of data ● servers: 1400 VMs, 300 physical machines ● locations: Chiasso, Milan, Madrid, London, Bengaluru
  • 4. At the beginning DEVs created the Monolith 4 credits https://www.flickr.com/photos/southtopia/5702790189
  • 5. 5
  • 6. List of flights What’s the most critical part in the monolith? Flight selected Checkout page 6
  • 7. 1. identify a feature and a business opportunity ○ new UX on checkout page 2. extract and wrap into a service 3. measure improvements (Agile procedure to prepare the new development) The first process of extraction 7
  • 8. ● high coupling from ○ a functional point of view ○ an architectural point of view ● configuration hell ○ Tomcat ○ env variables, properties, etc .. ● dependency hell ○ different libraries/versions Monolith: the micro-problems 8
  • 9. ● well known inside our company ● simplify development ● bounded configuration ○ application.yaml ○ java-opts.yaml ● self-contained deployability ○ tomcat now inside the jar Spring boot at the core 9
  • 10. … and it worked! credits https://www.pexels.com/photo/hand-thumbs-up-thumb-black-and-white-8252/
  • 11. Improvements ● conversion improved ● service is easier to ○ maintain ○ make experiment with ○ create ● developer friendly 11
  • 12. .. ready to follow the micro-service way! credits https://www.pexels.com/photo/women-standing-on-race-track-while-preparing-for-a-run-race-during-daytime-28554/
  • 13. Issues (1): low-level 13 ● LACK OF alignment across micro-service ○ solutions ○ libraries ○ logging/tracing ○ monitoring/alerting ● LACK OF awareness about OPS ● LACK OF alignment across environments
  • 14. Issues (2): higher perspective 14 ● reinventing the wheel ● different tools for same issues ● weak contribution model ○ many silos
  • 15. Our objectives 15 ● hexagonal architecture at the core ● software alignment ● centralized monitoring/logging, with alerts ● zero downtime deployment ● automation everywhere
  • 16. A year-long endeavour 16 ● build the first company framework ● build a new, modern infrastructure ● migrate the search (flight/hotel) product there ... without: ● impacting the business
  • 17. Two new teams: platform and devops 17 credits https://www.pexels.com/photo/blue-lego-toy-beside-orange-and-white-lego-toy-standing-during-daytime-105822/
  • 18. Team objectives 18 ● Platform team ○ servant leadership (no ivory tower) ○ develop the framework and common services ○ support adoption ● Devops team ○ focus on automation ■ building pipelines (CI + CD)
  • 19. Hexagonal Architecture (Port and Adapters) 19 ● designed for testability ● independent from tech (framework, DB, client for external services) ● independent from UI
  • 20. Tailored service template (cit. Thoughtworks) 20 [..] which can be used to quickly seed new services, pre-configured to operate within that organization's production environment [..] This is a very useful technique for encouraging collaborative evolution while retaining lightweight governance
  • 21. Platform framework: a thin layer 21 ● common logging format ● common metrics (monitoring/alerting) ● common tracing format ● centralized dependency management ● smart HTTP Client ● Kubernetes lifecycle (graceful startup/shutdown)
  • 22. Platform framework: based on Spring Boot 22 ● self-contained uber jar ● easier to debug ● configuration is now inside the artifact ● run from command line ● pragmatic test approach, also for integration tests
  • 23. Complexity in the new infrastructure 23 NODE 1 NODE 70 ... APP3-PRODUCTION APP2-PRODUCTION cluster pod pod pod BASE OS JAVA SRE START/STOP JAR APP
  • 24. Healthy use case: self-healing 24 "When a container is dead I will restart it" "When a container is ready I will forward traffic to it"
  • 25. A common solution for all the micro-services 25 /liveness ● when tomcat container is up ● when ratio active/max threads < threshold /readiness ● all the startup jobs have run .. ongoing never-ending research ..
  • 26. Graceful startup: ONE implementation 26 @Autowired(required = false) private CompletableFuture run(Collection<AsyncJob> jobs) { return allOf(jobs.stream().map(job -> runAsync(() -> job.execute())) .toArray(CompletableFuture[]::new)) .thenAccept(this::raiseReadinessUp) .exceptionally(this::shutdown); } JobsExecutor.java
  • 27. Platform framework adoption 27 Platform framework adoption credits https://www.pexels.com/photo/landscape-nature-holiday-vacation-92870/
  • 28. Platform framework from a team perspective (1) 28 ● focus on application domain ● focus on features to develop ● better understanding of what happens inside
  • 29. Platform framework from a team perspective (2) 29 ● always aligned with latest technologies ● lightweight governance ● a platform that encourages contribution
  • 30. Platform framework from platform engineering perspective 30 ● where do the problems lay? ○ not anymore in the smaller components ○ now at the border ● Check how different micro-services work together ○ (Only in case of centralised logging and monitoring)
  • 31. Innovation: KeyValueStorage port example 31 public interface KeyValueStorageService { boolean put(ValueStored data); ValueStored get(String key); void delete(String key); Date findLastUpdateById(String key); } KeyValueStorageService.java
  • 32. Innovation 32 ● KeyValueStorage ○ Mysql adapter ○ Google BigTable adapter (in the cloud) ● easy to change tech part, maintaining domain one ● PlatformFw ○ initializes application (main partition) ○ is the platform adapter
  • 33. Evolution 33 ● 1st step: align tech services ○ distributed cache ○ distributed session ● 2nd step: align business components ○ GIS library ○ money library ○ currency library
  • 34. Platform framework contribution model 34 ● initially perceived as a foreign body ○ .. but it really solved problems ● scale ○ on common efforts ○ sharing solutions across organisation ○ in a more structured way ● sandbox model before platform framework
  • 35. Automate Everything: pipeline DSL 35 microservice = factory.newDeployRequest() .withArtifact("com.lastminute.application1",2) .fromGitRepo("git.lastminute.com/team/application") lmn_deployCanaryStrategy(microservice,"qa") lmn_deployCanaryStrategy(microservice,"preview") lmn_deployCanaryStrategy(microservice,"production") pipeline
  • 37. Give me the numbers! 37 ● app migration in 1/2 weeks, 1/2 people ● 40 micro-services migrated in 6 months ● 5K req/sec generates 1.5M metrics/minute flows ● whole pipeline runs in 16 minutes