SlideShare a Scribd company logo
@nicolas_frankel
3 performance improvements in your
microservices architecture
Nicolas Fränkel
@nicolas_frankel
Me, myself and I
 Former developer, team lead, architect,
blah-blah
 Developer Advocate
 Used to Enterprise stacks
@nicolas_frankel
Hazelcast
HAZELCAST IMDG is an operational,
in-memory, distributed computing
platform that manages data using
in-memory storage and performs
execution for breakthrough
and scale.
HAZELCAST JET is the ultra
fast, application embeddable,
3rd generation stream
processing engine for low
latency batch and stream
processing.
@nicolas_frankel
Microservices: a tentative definition
1. Componentization via Services
2. Smart endpoints and dumb pipes
3. Decentralized Governance
4. Decentralized Data Management
5. Infrastructure Automation
6. Design for failure
7. Evolutionary Design
8. Organized around Business Capabilities
9. Products not Projects
https://martinfowler.com/articles/microservices.html
@nicolas_frankel
A benefit: scalability
https://martinfowler.com/articles/microservices.html
@nicolas_frankel
Do you spot the difference?
@nicolas_frankel
Distributed systems
« You have to be in a really unusual spot to see in-process
function calls turn into a performance hot spot these days, but
remote calls are slow. If your service calls half-a-dozen
remote services, each which calls another half-a-dozen remote
services, these response times add up to some horrible
latency characteristics. »
-- https://martinfowler.com/articles/microservice-trade-offs.html
@nicolas_frankel
Fallacies of distributed computing
 The network is reliable
 Latency is zero
 Bandwidth is infinite
 The network is secure
 Topology doesn't change
 There is one administrator
 Transport cost is zero
 The network is homogeneous
https://yourlogicalfallacyis.com/
@nicolas_frankel
More like that…
@nicolas_frankel
No, like that!
@nicolas_frankel
Caching to the rescue
Fast vs. up-to-date
@nicolas_frankel
@nicolas_frankel
Caching?
Let’s use a hash map!
 Unbounded
 No eviction strategy
 No TTL
 etc.
@nicolas_frankel
In-Memory Data Grid
 A distributed object store
 Think distributed data structure
@nicolas_frankel
Caching use-cases in microservices
 Database access
 HTTP call
 Session data
@nicolas_frankel
Hibernate
 Object-Relational Mapping framework
 Quite widespread
 JPA implementation
@nicolas_frankel
Hibernate
 Level 1 cache
• Implemented by default
• Related to the Session object
 Level 2 cache
• Optional
• Multiple integrations available
@nicolas_frankel
Read-through
 The cache doesn’t contain the key
1. Load from the database
2. Put it in the cache
 The cache contains the key
1. Return it
@nicolas_frankel
Write-through
Create or update the cached value
@nicolas_frankel
@nicolas_frankel
Even faster alternative
 The code only interacts with Hazelcast
 Registered listeners allow to write to the
database
 Async
• No guarantee
@nicolas_frankel
HTTP and cache
 Could be implemented manually
 But there’s a Java API for that!
@nicolas_frankel
JCache
 Specification
 Multiple implementations
 Integrated with Spring
@nicolas_frankel
E-commerce architecture
 Catalog service
 Stock service
 Pricing service
 Cart service
 Recommendation service
 Payment service
 etc.
@nicolas_frankel
@nicolas_frankel
Session data in cluster nodes
@nicolas_frankel
Standards?
@nicolas_frankel
Hazelcast to the rescue!
1. Filter-based
2. Spring Session integration
3. Direct Tomcat integration
• Per-node configuration
• Or through Spring Boot embedded
4. Direct Jetty integration
@nicolas_frankel
@nicolas_frankel
Takeaways
 Scalability and performance are not the same
 Caching helps performance
• The cost is stale data
 Hazelcast IMDG provides several integration-points for caching
across different areas
• Database access
• HTTP call
• Session data
@nicolas_frankel
Thanks for your attention!
 https://blog.frankel.ch/
 @nicolas_frankel
 https://hazelcast.org/
 https://bit.ly/micro-perf

More Related Content

What's hot (18)

PPTX
Streaming datasets for personalization
Shriya Arora
 
PPTX
Modern Web-site Development Pipeline
GlobalLogic Ukraine
 
PDF
AWS Big Data in everyday use at Yle
Rolf Koski
 
PPTX
AWS Finland March meetup 2017 - selecting enterprise IoT platform
Rolf Koski
 
PDF
Automatize a detecção de ameaças e evite falsos positivos
Elasticsearch
 
PPTX
Big Data Berlin v8.0 Stream Processing with Apache Apex
Apache Apex
 
PPTX
Zsolt Várnai, Principal Software Engineer at Skyscanner - "The advantages of...
Dataconomy Media
 
PDF
How a Data Mesh is Driving our Platform | Trey Hicks, Gloo
HostedbyConfluent
 
PDF
Migrating a legacy logging system: Etsy’s journey to Elastic Cloud
Elasticsearch
 
PDF
WWW19: SGX-PySpark: Secure Distributed Data Analytics
LEGATO project
 
PPTX
Development of Cloud-Agnostic IoT Solutions
GlobalLogic Ukraine
 
PDF
Reactive Integrations - Caveats and bumps in the road explained
Markus Eisele
 
PDF
Siscale Lightning Talk: Automated Root Cause Analysis with Elastic Stack
Elasticsearch
 
PPTX
Closing Keynote
Neo4j
 
PDF
Logz.io Jenkins Meetup
GrigoryAvsyuk
 
PPTX
Evgen Kostenko "How to process 80 million events per day and build relational...
Fwdays
 
PPTX
Artik cloud deview 2016
NAVER D2
 
PPTX
Ratpack and Grails 3 (and Spring Boot) SpringOne 2GX 2014
Lari Hotari
 
Streaming datasets for personalization
Shriya Arora
 
Modern Web-site Development Pipeline
GlobalLogic Ukraine
 
AWS Big Data in everyday use at Yle
Rolf Koski
 
AWS Finland March meetup 2017 - selecting enterprise IoT platform
Rolf Koski
 
Automatize a detecção de ameaças e evite falsos positivos
Elasticsearch
 
Big Data Berlin v8.0 Stream Processing with Apache Apex
Apache Apex
 
Zsolt Várnai, Principal Software Engineer at Skyscanner - "The advantages of...
Dataconomy Media
 
How a Data Mesh is Driving our Platform | Trey Hicks, Gloo
HostedbyConfluent
 
Migrating a legacy logging system: Etsy’s journey to Elastic Cloud
Elasticsearch
 
WWW19: SGX-PySpark: Secure Distributed Data Analytics
LEGATO project
 
Development of Cloud-Agnostic IoT Solutions
GlobalLogic Ukraine
 
Reactive Integrations - Caveats and bumps in the road explained
Markus Eisele
 
Siscale Lightning Talk: Automated Root Cause Analysis with Elastic Stack
Elasticsearch
 
Closing Keynote
Neo4j
 
Logz.io Jenkins Meetup
GrigoryAvsyuk
 
Evgen Kostenko "How to process 80 million events per day and build relational...
Fwdays
 
Artik cloud deview 2016
NAVER D2
 
Ratpack and Grails 3 (and Spring Boot) SpringOne 2GX 2014
Lari Hotari
 

Similar to JavaDay Istanbul - 3 improvements in your microservices architecture (20)

PPTX
YAJUG - 3 Idées d’amélioration pour vos Architectures Microservices
Nicolas Fränkel
 
PPTX
Devclub.lv - Introduction to stream processing
Nicolas Fränkel
 
PPTX
Zero-downtime deployment on Kubernetes with Hazelcast
Nicolas Fränkel
 
PPTX
JFuture - Battle of the circuit breakers
Nicolas Fränkel
 
PPTX
Kubernetes Online Meetup - Battle of the Circuit Breakers
Nicolas Fränkel
 
PPTX
BigData conference - Introduction to stream processing
Nicolas Fränkel
 
PPTX
GOTO Berlin - Battle of the Circuit Breakers: Resilience4J vs Istio
Nicolas Fränkel
 
PPTX
OSAD - Battle of the Circuit Breakers
Nicolas Fränkel
 
PPTX
London Java Community - An Experiment in Continuous Deployment of JVM applica...
Nicolas Fränkel
 
PPTX
DevTernity - OOP in the enterprise
Nicolas Fränkel
 
PPTX
OSCONF Koshi - Zero downtime deployment with Kubernetes, Flyway and Spring Boot
Nicolas Fränkel
 
PPTX
GeekOut - Configuration Management with Kubernetes, a Spring-Boot use-case
Nicolas Fränkel
 
PPTX
London In-Memory Computing Meetup - A Change-Data-Capture use-case: designing...
Nicolas Fränkel
 
PPTX
AllTheTalks.online - A Streaming Use-Case: And Experiment in Continuous Deplo...
Nicolas Fränkel
 
PPTX
OSCONF Hyderabad - Shorten all URLs!
Nicolas Fränkel
 
PPTX
OSCONF Jaipur - A Hitchhiker's Tour to Containerizing a Java application
Nicolas Fränkel
 
PDF
Shorten All URLs
Jakarta_EE
 
PPTX
XP Days Ukraine - Zero-downtime deployment with Kubernetes, Spring Boot and F...
Nicolas Fränkel
 
PDF
Zero-downtime Deployment on Kubernetes
All Things Open
 
PPTX
VoxxedDays Cluj - Zero-downtime deployment with Kubernetes, Spring Boot and F...
Nicolas Fränkel
 
YAJUG - 3 Idées d’amélioration pour vos Architectures Microservices
Nicolas Fränkel
 
Devclub.lv - Introduction to stream processing
Nicolas Fränkel
 
Zero-downtime deployment on Kubernetes with Hazelcast
Nicolas Fränkel
 
JFuture - Battle of the circuit breakers
Nicolas Fränkel
 
Kubernetes Online Meetup - Battle of the Circuit Breakers
Nicolas Fränkel
 
BigData conference - Introduction to stream processing
Nicolas Fränkel
 
GOTO Berlin - Battle of the Circuit Breakers: Resilience4J vs Istio
Nicolas Fränkel
 
OSAD - Battle of the Circuit Breakers
Nicolas Fränkel
 
London Java Community - An Experiment in Continuous Deployment of JVM applica...
Nicolas Fränkel
 
DevTernity - OOP in the enterprise
Nicolas Fränkel
 
OSCONF Koshi - Zero downtime deployment with Kubernetes, Flyway and Spring Boot
Nicolas Fränkel
 
GeekOut - Configuration Management with Kubernetes, a Spring-Boot use-case
Nicolas Fränkel
 
London In-Memory Computing Meetup - A Change-Data-Capture use-case: designing...
Nicolas Fränkel
 
AllTheTalks.online - A Streaming Use-Case: And Experiment in Continuous Deplo...
Nicolas Fränkel
 
OSCONF Hyderabad - Shorten all URLs!
Nicolas Fränkel
 
OSCONF Jaipur - A Hitchhiker's Tour to Containerizing a Java application
Nicolas Fränkel
 
Shorten All URLs
Jakarta_EE
 
XP Days Ukraine - Zero-downtime deployment with Kubernetes, Spring Boot and F...
Nicolas Fränkel
 
Zero-downtime Deployment on Kubernetes
All Things Open
 
VoxxedDays Cluj - Zero-downtime deployment with Kubernetes, Spring Boot and F...
Nicolas Fränkel
 
Ad

More from Nicolas Fränkel (16)

PPTX
SnowCamp - Adding search to a legacy application
Nicolas Fränkel
 
PPTX
Un CV de dévelopeur toujours a jour
Nicolas Fränkel
 
PDF
jLove - A Change-Data-Capture use-case: designing an evergreen cache
Nicolas Fränkel
 
PPTX
ADDO - Your own Kubernetes controller, not only in Go
Nicolas Fränkel
 
PPTX
TestCon Europe - Mutation Testing to the Rescue of Your Tests
Nicolas Fränkel
 
PPTX
GeekcampSG 2020 - A Change-Data-Capture use-case: designing an evergreen cache
Nicolas Fränkel
 
PPTX
JOnConf - A CDC use-case: designing an Evergreen Cache
Nicolas Fränkel
 
PPTX
JUG Tirana - Introduction to data streaming
Nicolas Fränkel
 
PPTX
Java.IL - Your own Kubernetes controller, not only in Go!
Nicolas Fränkel
 
PPTX
vJUG - Introduction to data streaming
Nicolas Fränkel
 
PPTX
OSCONF - Your own Kubernetes controller: not only in Go
Nicolas Fränkel
 
PPTX
vKUG - Migrating Spring Boot apps from annotation-based config to Functional
Nicolas Fränkel
 
PPTX
ING Meetup - Migrating Spring Boot Config Annotations to Functional with Kotlin
Nicolas Fränkel
 
PPTX
JUG SF - Introduction to data streaming
Nicolas Fränkel
 
PPTX
SCALE - Stream processing and Open Data, a match made in Heaven
Nicolas Fränkel
 
PPTX
DevOpsDays Madrid - Zero-downtime deployment with Kubernetes, Spring Boot and...
Nicolas Fränkel
 
SnowCamp - Adding search to a legacy application
Nicolas Fränkel
 
Un CV de dévelopeur toujours a jour
Nicolas Fränkel
 
jLove - A Change-Data-Capture use-case: designing an evergreen cache
Nicolas Fränkel
 
ADDO - Your own Kubernetes controller, not only in Go
Nicolas Fränkel
 
TestCon Europe - Mutation Testing to the Rescue of Your Tests
Nicolas Fränkel
 
GeekcampSG 2020 - A Change-Data-Capture use-case: designing an evergreen cache
Nicolas Fränkel
 
JOnConf - A CDC use-case: designing an Evergreen Cache
Nicolas Fränkel
 
JUG Tirana - Introduction to data streaming
Nicolas Fränkel
 
Java.IL - Your own Kubernetes controller, not only in Go!
Nicolas Fränkel
 
vJUG - Introduction to data streaming
Nicolas Fränkel
 
OSCONF - Your own Kubernetes controller: not only in Go
Nicolas Fränkel
 
vKUG - Migrating Spring Boot apps from annotation-based config to Functional
Nicolas Fränkel
 
ING Meetup - Migrating Spring Boot Config Annotations to Functional with Kotlin
Nicolas Fränkel
 
JUG SF - Introduction to data streaming
Nicolas Fränkel
 
SCALE - Stream processing and Open Data, a match made in Heaven
Nicolas Fränkel
 
DevOpsDays Madrid - Zero-downtime deployment with Kubernetes, Spring Boot and...
Nicolas Fränkel
 
Ad

Recently uploaded (20)

PDF
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
PPTX
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PDF
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
PDF
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
PDF
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
PPTX
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
PPTX
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
PDF
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
PDF
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
PPTX
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
PDF
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
PDF
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
PDF
Add Background Images to Charts in IBM SPSS Statistics Version 31.pdf
Version 1 Analytics
 
PDF
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
PPTX
Coefficient of Variance in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
Add Background Images to Charts in IBM SPSS Statistics Version 31.pdf
Version 1 Analytics
 
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
Coefficient of Variance in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 

JavaDay Istanbul - 3 improvements in your microservices architecture

Editor's Notes

  • #10: @startuml participant "a:A" as a boundary "Layer X" as x boundary "Layer Y" as y boundary "Layer Z" as z participant "b:B" as b activate a a -> x: call() activate x x -> y: call() activate y y -> z: call() activate z z -> b: call() hide footbox @enduml
  • #11: participant "a:A" as a boundary "Layer X" as x boundary "Layer Y" as y boundary "Layer Z" as z participant "b:B" as b activate a a -> x: call() activate x x -> y: call() activate y y -> z: call() activate z z -> b: call() z <-- b y <-- z deactivate z x <-- y deactivate y a <-- x deactivate x deactivate a skinparam dpi 300 hide footbox