SlideShare a Scribd company logo
1 of 45
Download to read offline
MONOLITHIC TO MICROSERVICES
MIGRATION JOURNEY
of iyzico with Spring Cloud
ABOUT US
ZEYNEL KOÇAK
@zeynelkocak
@zeynelkck
@zeynelkocak
MUSTAFA CAN TEKIR
@mustafacantekir
@mustafacantekir
@mustafacantekir
AGENGA
Limitations of Monolithic Architecture

Centralized Configuration Management

Netflix OSS

Authentication & Authorization

What is Next?

Q&A
NETFLIX OSS
LIMITATIONS OF MONOLITHIC ARCHITECTURE
• Lots of challenges to manage services right now

• Large code base

• Many Components, no clear ownership

• Quick adaptation to different business needs

• Long deployment cycles

• Auto scaling and healing

• Managing the config of the environments
MONOLITHIC TO MICROSERVICES
• YAGNI (You Aren't Gonna Need It)

• Exposing new restful apis to front-end

• Current API project count in backend : 40+ and growing
MICROSERVICES
Front-End (React App)
Apı Gateway
LB
Apı Gateway
1
Apı Gateway
2
Settlement
Reporting API
1
Settlement
Reporting API
2
Payment
Reporting API
1
Payment
Reporting API
2
Merchant
API 2
Merchant
API 1
Confing
Server LB
Confing
Server 1
Confing
Server 2
Discovery
Server 1
Discovery
Server 1
Auth
Server 1
Auth
Server 1
Elastic
searchRedisMySql
Bitbucket
(Config Repo)
CONFIG SERVER
CONFIG SERVER
• Centralized 

• Configuration First

• Git for Storage
Service A
Service B
Load Balancer
Config
Server -1
Config
Server -2
Git
• Key / Value

• Exposes Rest APIs

• Encrypt / Decrypt

• Fail Fast, Force Pull

• Retry

• Refresh properties in runtime

curl –X POST http://localhost:8080/refresh
CONFIG SERVER
CONFIG SERVER
Encrypt / Decrypt

curl localhost:8080/encrypt -d value

8eb5cb42dc80d5aad09c67861e0fdad2534b05680adf9939502c3e57d0345
c01

curl localhost:8080/encrypt -d value

bb96c622456bb8d2af70b68bc30d00a4ebb915bce98628dd64f842af458a7
27a



username: '{cipher}
bb96c622456bb8d2af70b68bc30d00a4ebb915bce98628dd64f842af458a7
27a '
API GATEWAY
API GATEWAY / BACKEND FOR FRONTEND
• An edge service, gatekeeper for micro services

• Adapter layer for specific devices

• Some services might not be friendly

• Another component to make holy available
MICROSERVICES
Front-End (React App)
Apı Gateway
LB
Apı Gateway
1
Apı Gateway
2
Settlement
Reporting API
1
Settlement
Reporting API
2
Payment
Reporting API
1
Payment
Reporting API
2
Merchant
API 2
Merchant
API 1
Confing
Server LB
Confing
Server 1
Confing
Server 2
Discovery
Server 1
Discovery
Server 1
Auth
Server 1
Auth
Server 1
Elastic
searchRedisMySql
Bitbucket
(Config Repo)
NETFLIX ZUUL
• Easy setup
• Used by many tech companies in production

• Rate limiting or logging filters vs.

• Authentication 

• Smart Load Balancing

• Attack Detection & Prevention

• Difficult to manage timeout with gateway and apis together

• Keep business logic out of gateway :)
ZUUL FILTER TYPES
ALTERNATIVES
• Nginx and zuul 1.0 is blocking

• Zuul 2.0 , Spring Cloud Gateway , Linkerd , Envoy is non blocking

➤ Asynchronus Programming
➤ Event – Loop Pattern
➤ High Performance -> CPU Utilization
➤ Improve Resiliency –> Connection Scaling
➤ Difficult tracing and debug
•
BLOCKING – NON BLOCKING
SERVICE
DISCOVERY
SERVICE DISCOVERY
• Number of service instances and locations
changes dynamically (on-demand scalability)

• So hard to manage lots of microservices in a
cloud native world with DNS and Load
Balancers

• Maintains registry of client with metadata (host,
port, name)

• Client heartbeats
• Client code is simpler just a request to
the router

• Router is another component to install,
configure and make highly available

• More network hops are required than
client-side

• AWS Elastic Load Balancer is an example
SERVER SIDE DISCOVERY
• Client code is simpler just a request to
the router

• Router is another component to install,
configure and make highly available

• More network hops are required than
client-side

• AWS Elastic Load Balancer is an example
CLIENT SIDE DISCOVERY
MICROSERVICES
Front-End (React App)
Apı Gateway
LB
Apı Gateway
1
Apı Gateway
2
Settlement
Reporting API
1
Settlement
Reporting API
2
Payment
Reporting API
1
Payment
Reporting API
2
Merchant
API 2
Merchant
API 1
Confing
Server LB
Confing
Server 1
Confing
Server 2
Discovery
Server 1
Discovery
Server 1
Auth
Server 1
Auth
Server 1
Elastic
searchRedisMySql
Bitbucket
(Config Repo)
• Uses client-side discovery

• Provides rest api to query service
instances

• All nodes sync with eventually consistent
approach
NETFLIX EUREKA
Register : register at startup

Fetch Registry : provide client-side registry cache

Heartbeat : heartbeat every 30 seconds
NETFLIX EUREKA DASHBOARD
WHY WE CHOOSE EUREKA
• Easy setup

• Rest based service registry

• Support replication

• Caches on client

• Fast but not consistent

• Discovery server client interface (abstraction)
CHALLANGES IN REGISTERING EUREKA
• Client Registration

• Server Response Cache 

• Client Cache Refresh

• LoadBalancer Refresh
• Declarative rest client with interfaces

• It makes writing web service clients easier (no implementation code)

• @FeignClient annotation

• Spring Cloud will implement it at run-time

• Uses ribbon load balancer and hystrix circuit breaker

• No more implements client projects
•
FEIGN CLIENT
RIBBON
• Client side load balancer

• Load Balancing Algorithms

• Fault Tolerance

• Eureka, Hystrix

• Good set of configuration
SLEUTH
• Traceability Problem in Microservices

• Distributed Tracing Solution 

• TraceId, SpanId

• Zipkin

• Hystrix, Rest Template, Feign Client, WebClient,
WebFlux , Zuul
SLEUTH
SLEUTH
• [appName,traceId,spanId,exportable]

• [gateway,3304850e78ef339d,3304850e78ef339d,false] 

• [reporting-api,3304850e78ef339d,3c3d599eb7acb79b,false]

• [reporting-api,3304850e78ef339d,3c3d599eb7acb79b,false]

• [dispute-api,3304850e78ef339d,6a891d5ed4f59aa8,false] 

• [dispute-api,3304850e78ef339d,6a891d5ed4f59aa8,false] 

• [dispute-api,3304850e78ef339d,6a891d5ed4f59aa8,false] 

• [reporting-api,3304850e78ef339d,3c3d599eb7acb79b,false]

• [gateway,3304850e78ef339d,3304850e78ef339d,false]
CIRCUIT BREAKER
CIRCUIT BREAKER
HYSTRIX
• Netflix OSS

• Failures Will Happen

• Prevent Domino Effect

• Hystrix Properties

• Fallback Method

• Hystrix Dashboard
HYSTRIX DASHBOARD
• Need a token-based approach to talk to front-
end

• Need to authenticate a single request in all
microservices

• Authorize requests according to user
permissions
•
AUTHENTICATION & AUTHORIZATION
MICROSERVICES
Front-End (React App)
Apı Gateway
LB
Apı Gateway
1
Apı Gateway
2
Settlement
Reporting API
1
Settlement
Reporting API
2
Payment
Reporting API
1
Payment
Reporting API
2
Merchant
API 2
Merchant
API 1
Confing
Server LB
Confing
Server 1
Confing
Server 2
Discovery
Server 1
Discovery
Server 1
Auth
Server 1
Auth
Server 1
Elastic
searchRedisMySql
Bitbucket
(Config Repo)
• Open standard authorization protocol
specification

• Enables access without sharing credentials

•
OAUTH2
• Used by many tech companies

• Support Single Sign-On

•
• An open standard for securely sending
information between parties

• Consists 3 parts. Header, payload(claims)
and the signature xxxxx.yyyyy.zzzzz

• Encoded not encrypted

• JWTs can be signed using a secret (with the 
HMACSHA256  algorithm) or a public/private
key pair using RSA.

• Stateless authentication

• Customize token
JWT (JSON WEB TOKEN )
BASIC AUTH & OAUTH2 TOGETHER
MIGRATION
STEP BY STEP
STEP BY STEP MIGRATION
1. Sprint Cloud Dependencies

2. Move configs to config repo

3. OAuth Integration

4. Log Execution Interceptor

5. Enable Discovery Client

6. Exception Handling

7. Configurations
FUTURE ROAD MAP
Registration First
Spring Cloud Bus
Migration To Microservice
Databases
Event Based
Dockerize
Kubernetes
QUESTIONS

More Related Content

What's hot

Simplify Microservices with the NGINX Application Platform
Simplify Microservices with the NGINX Application PlatformSimplify Microservices with the NGINX Application Platform
Simplify Microservices with the NGINX Application PlatformNGINX, Inc.
 
Jax london - Battle-tested event-driven patterns for your microservices archi...
Jax london - Battle-tested event-driven patterns for your microservices archi...Jax london - Battle-tested event-driven patterns for your microservices archi...
Jax london - Battle-tested event-driven patterns for your microservices archi...Natan Silnitsky
 
Microservices with NGINX pdf
Microservices with NGINX pdfMicroservices with NGINX pdf
Microservices with NGINX pdfKatherine Bagood
 
Spring Cloud: API gateway upgrade & configuration in the cloud
Spring Cloud: API gateway upgrade & configuration in the cloudSpring Cloud: API gateway upgrade & configuration in the cloud
Spring Cloud: API gateway upgrade & configuration in the cloudOrkhan Gasimov
 
«Real Time» Web Applications with SignalR in ASP.NET
«Real Time» Web Applications with SignalR in ASP.NET«Real Time» Web Applications with SignalR in ASP.NET
«Real Time» Web Applications with SignalR in ASP.NETAlessandro Giorgetti
 
API Gateway: Nginx way
API Gateway: Nginx wayAPI Gateway: Nginx way
API Gateway: Nginx wayinovia
 
NGINX, Istio, and the Move to Microservices and Service Mesh
NGINX, Istio, and the Move to Microservices and Service MeshNGINX, Istio, and the Move to Microservices and Service Mesh
NGINX, Istio, and the Move to Microservices and Service MeshNGINX, Inc.
 
Scale your application to new heights with NGINX and AWS
Scale your application to new heights with NGINX and AWSScale your application to new heights with NGINX and AWS
Scale your application to new heights with NGINX and AWSNGINX, Inc.
 
APIs: Intelligent Routing, Security, & Management
APIs: Intelligent Routing, Security, & ManagementAPIs: Intelligent Routing, Security, & Management
APIs: Intelligent Routing, Security, & ManagementNGINX, Inc.
 
Serverless architecture: introduction & first steps
Serverless architecture: introduction & first stepsServerless architecture: introduction & first steps
Serverless architecture: introduction & first stepsThe Software House
 
NGINX Amplify: Monitoring NGINX with Advanced Filters and Custom Dashboards
NGINX Amplify: Monitoring NGINX with Advanced Filters and Custom DashboardsNGINX Amplify: Monitoring NGINX with Advanced Filters and Custom Dashboards
NGINX Amplify: Monitoring NGINX with Advanced Filters and Custom DashboardsNGINX, Inc.
 
SignalR With ASP.Net part1
SignalR With ASP.Net part1SignalR With ASP.Net part1
SignalR With ASP.Net part1Esraa Ammar
 
Standardizing Microservice Management With a Service Mesh
Standardizing Microservice Management With a Service MeshStandardizing Microservice Management With a Service Mesh
Standardizing Microservice Management With a Service MeshAspen Mesh
 
Advanced Caching Patterns used by 2000 microservices - Api World
Advanced Caching Patterns used by 2000 microservices - Api WorldAdvanced Caching Patterns used by 2000 microservices - Api World
Advanced Caching Patterns used by 2000 microservices - Api WorldNatan Silnitsky
 
Icinga Camp Bangalore - Icinga2 and Ansible
Icinga Camp Bangalore - Icinga2 and AnsibleIcinga Camp Bangalore - Icinga2 and Ansible
Icinga Camp Bangalore - Icinga2 and AnsibleIcinga
 
Signalr with ASP.Net part2
Signalr with ASP.Net part2Signalr with ASP.Net part2
Signalr with ASP.Net part2Esraa Ammar
 
Api gateway in microservices
Api gateway in microservicesApi gateway in microservices
Api gateway in microservicesKunal Hire
 
Introducing the Microservices Reference Architecture Version 1.2
Introducing the Microservices Reference Architecture Version 1.2Introducing the Microservices Reference Architecture Version 1.2
Introducing the Microservices Reference Architecture Version 1.2NGINX, Inc.
 
Kubernetes and the NGINX Plus Ingress Controller
Kubernetes and the NGINX Plus Ingress ControllerKubernetes and the NGINX Plus Ingress Controller
Kubernetes and the NGINX Plus Ingress ControllerKatherine Bagood
 

What's hot (20)

Simplify Microservices with the NGINX Application Platform
Simplify Microservices with the NGINX Application PlatformSimplify Microservices with the NGINX Application Platform
Simplify Microservices with the NGINX Application Platform
 
Jax london - Battle-tested event-driven patterns for your microservices archi...
Jax london - Battle-tested event-driven patterns for your microservices archi...Jax london - Battle-tested event-driven patterns for your microservices archi...
Jax london - Battle-tested event-driven patterns for your microservices archi...
 
Microservices with NGINX pdf
Microservices with NGINX pdfMicroservices with NGINX pdf
Microservices with NGINX pdf
 
Spring Cloud: API gateway upgrade & configuration in the cloud
Spring Cloud: API gateway upgrade & configuration in the cloudSpring Cloud: API gateway upgrade & configuration in the cloud
Spring Cloud: API gateway upgrade & configuration in the cloud
 
«Real Time» Web Applications with SignalR in ASP.NET
«Real Time» Web Applications with SignalR in ASP.NET«Real Time» Web Applications with SignalR in ASP.NET
«Real Time» Web Applications with SignalR in ASP.NET
 
API Gateway: Nginx way
API Gateway: Nginx wayAPI Gateway: Nginx way
API Gateway: Nginx way
 
NGINX, Istio, and the Move to Microservices and Service Mesh
NGINX, Istio, and the Move to Microservices and Service MeshNGINX, Istio, and the Move to Microservices and Service Mesh
NGINX, Istio, and the Move to Microservices and Service Mesh
 
Scale your application to new heights with NGINX and AWS
Scale your application to new heights with NGINX and AWSScale your application to new heights with NGINX and AWS
Scale your application to new heights with NGINX and AWS
 
APIs: Intelligent Routing, Security, & Management
APIs: Intelligent Routing, Security, & ManagementAPIs: Intelligent Routing, Security, & Management
APIs: Intelligent Routing, Security, & Management
 
Serverless architecture: introduction & first steps
Serverless architecture: introduction & first stepsServerless architecture: introduction & first steps
Serverless architecture: introduction & first steps
 
NGINX Amplify: Monitoring NGINX with Advanced Filters and Custom Dashboards
NGINX Amplify: Monitoring NGINX with Advanced Filters and Custom DashboardsNGINX Amplify: Monitoring NGINX with Advanced Filters and Custom Dashboards
NGINX Amplify: Monitoring NGINX with Advanced Filters and Custom Dashboards
 
SignalR With ASP.Net part1
SignalR With ASP.Net part1SignalR With ASP.Net part1
SignalR With ASP.Net part1
 
Standardizing Microservice Management With a Service Mesh
Standardizing Microservice Management With a Service MeshStandardizing Microservice Management With a Service Mesh
Standardizing Microservice Management With a Service Mesh
 
Advanced Caching Patterns used by 2000 microservices - Api World
Advanced Caching Patterns used by 2000 microservices - Api WorldAdvanced Caching Patterns used by 2000 microservices - Api World
Advanced Caching Patterns used by 2000 microservices - Api World
 
Icinga Camp Bangalore - Icinga2 and Ansible
Icinga Camp Bangalore - Icinga2 and AnsibleIcinga Camp Bangalore - Icinga2 and Ansible
Icinga Camp Bangalore - Icinga2 and Ansible
 
Signalr with ASP.Net part2
Signalr with ASP.Net part2Signalr with ASP.Net part2
Signalr with ASP.Net part2
 
Api gateway in microservices
Api gateway in microservicesApi gateway in microservices
Api gateway in microservices
 
Introducing the Microservices Reference Architecture Version 1.2
Introducing the Microservices Reference Architecture Version 1.2Introducing the Microservices Reference Architecture Version 1.2
Introducing the Microservices Reference Architecture Version 1.2
 
Real time web with SignalR
Real time web with SignalRReal time web with SignalR
Real time web with SignalR
 
Kubernetes and the NGINX Plus Ingress Controller
Kubernetes and the NGINX Plus Ingress ControllerKubernetes and the NGINX Plus Ingress Controller
Kubernetes and the NGINX Plus Ingress Controller
 

Similar to Monolithic to microservices migration journey with spring cloud

(SDD302) A Tale of One Thousand Instances - Migrating from Amazon EC2-Classic...
(SDD302) A Tale of One Thousand Instances - Migrating from Amazon EC2-Classic...(SDD302) A Tale of One Thousand Instances - Migrating from Amazon EC2-Classic...
(SDD302) A Tale of One Thousand Instances - Migrating from Amazon EC2-Classic...Amazon Web Services
 
Service Fabric – building tomorrows applications today
Service Fabric – building tomorrows applications todayService Fabric – building tomorrows applications today
Service Fabric – building tomorrows applications todayBizTalk360
 
Service Mesh CTO Forum (Draft 3)
Service Mesh CTO Forum (Draft 3)Service Mesh CTO Forum (Draft 3)
Service Mesh CTO Forum (Draft 3)Rick Hightower
 
2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...
2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...
2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...Ambassador Labs
 
The Need of Cloud-Native Application
The Need of Cloud-Native ApplicationThe Need of Cloud-Native Application
The Need of Cloud-Native ApplicationEmiliano Pecis
 
Node.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel AvivNode.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel AvivRon Perlmuter
 
.NET microservices with Azure Service Fabric
.NET microservices with Azure Service Fabric.NET microservices with Azure Service Fabric
.NET microservices with Azure Service FabricDavide Benvegnù
 
API Gateways are going through an identity crisis
API Gateways are going through an identity crisisAPI Gateways are going through an identity crisis
API Gateways are going through an identity crisisChristian Posta
 
How api management supports the digital transformation process
How api management supports the digital transformation processHow api management supports the digital transformation process
How api management supports the digital transformation processSmartWave
 
Micro Services Architecture
Micro Services ArchitectureMicro Services Architecture
Micro Services ArchitectureRanjan Baisak
 
Service-Level Objective for Serverless Applications
Service-Level Objective for Serverless ApplicationsService-Level Objective for Serverless Applications
Service-Level Objective for Serverless Applicationsalekn
 
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 Cachecornelia davis
 
Concurrency at Scale: Evolution to Micro-Services
Concurrency at Scale:  Evolution to Micro-ServicesConcurrency at Scale:  Evolution to Micro-Services
Concurrency at Scale: Evolution to Micro-ServicesRandy Shoup
 
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.
 
Building a Service Mesh with NGINX Owen Garrett.pptx
Building a Service Mesh with NGINX Owen Garrett.pptxBuilding a Service Mesh with NGINX Owen Garrett.pptx
Building a Service Mesh with NGINX Owen Garrett.pptxPINGXIONG3
 
DEVNET-1184 Microservices Patterns
DEVNET-1184	Microservices PatternsDEVNET-1184	Microservices Patterns
DEVNET-1184 Microservices PatternsCisco DevNet
 

Similar to Monolithic to microservices migration journey with spring cloud (20)

(SDD302) A Tale of One Thousand Instances - Migrating from Amazon EC2-Classic...
(SDD302) A Tale of One Thousand Instances - Migrating from Amazon EC2-Classic...(SDD302) A Tale of One Thousand Instances - Migrating from Amazon EC2-Classic...
(SDD302) A Tale of One Thousand Instances - Migrating from Amazon EC2-Classic...
 
Service Fabric – building tomorrows applications today
Service Fabric – building tomorrows applications todayService Fabric – building tomorrows applications today
Service Fabric – building tomorrows applications today
 
Designing microservices
Designing microservicesDesigning microservices
Designing microservices
 
Service Mesh CTO Forum (Draft 3)
Service Mesh CTO Forum (Draft 3)Service Mesh CTO Forum (Draft 3)
Service Mesh CTO Forum (Draft 3)
 
2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...
2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...
2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...
 
The Need of Cloud-Native Application
The Need of Cloud-Native ApplicationThe Need of Cloud-Native Application
The Need of Cloud-Native Application
 
Node.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel AvivNode.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel Aviv
 
.NET microservices with Azure Service Fabric
.NET microservices with Azure Service Fabric.NET microservices with Azure Service Fabric
.NET microservices with Azure Service Fabric
 
Micro services
Micro servicesMicro services
Micro services
 
API Gateways are going through an identity crisis
API Gateways are going through an identity crisisAPI Gateways are going through an identity crisis
API Gateways are going through an identity crisis
 
How api management supports the digital transformation process
How api management supports the digital transformation processHow api management supports the digital transformation process
How api management supports the digital transformation process
 
Micro Services Architecture
Micro Services ArchitectureMicro Services Architecture
Micro Services Architecture
 
Service-Level Objective for Serverless Applications
Service-Level Objective for Serverless ApplicationsService-Level Objective for Serverless Applications
Service-Level Objective for Serverless Applications
 
Spring cloud
Spring cloudSpring cloud
Spring cloud
 
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
 
Global Windows Azure Bootcamp - San Diego
Global Windows Azure Bootcamp - San DiegoGlobal Windows Azure Bootcamp - San Diego
Global Windows Azure Bootcamp - San Diego
 
Concurrency at Scale: Evolution to Micro-Services
Concurrency at Scale:  Evolution to Micro-ServicesConcurrency at Scale:  Evolution to Micro-Services
Concurrency at Scale: Evolution to Micro-Services
 
Do You Need A Service Mesh?
Do You Need A Service Mesh?Do You Need A Service Mesh?
Do You Need A Service Mesh?
 
Building a Service Mesh with NGINX Owen Garrett.pptx
Building a Service Mesh with NGINX Owen Garrett.pptxBuilding a Service Mesh with NGINX Owen Garrett.pptx
Building a Service Mesh with NGINX Owen Garrett.pptx
 
DEVNET-1184 Microservices Patterns
DEVNET-1184	Microservices PatternsDEVNET-1184	Microservices Patterns
DEVNET-1184 Microservices Patterns
 

Recently uploaded

Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
How To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROHow To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROmotivationalword821
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 

Recently uploaded (20)

Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
How To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROHow To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTRO
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 

Monolithic to microservices migration journey with spring cloud

  • 1. MONOLITHIC TO MICROSERVICES MIGRATION JOURNEY of iyzico with Spring Cloud
  • 2. ABOUT US ZEYNEL KOÇAK @zeynelkocak @zeynelkck @zeynelkocak MUSTAFA CAN TEKIR @mustafacantekir @mustafacantekir @mustafacantekir
  • 3. AGENGA Limitations of Monolithic Architecture Centralized Configuration Management Netflix OSS Authentication & Authorization What is Next? Q&A
  • 5. LIMITATIONS OF MONOLITHIC ARCHITECTURE • Lots of challenges to manage services right now • Large code base • Many Components, no clear ownership • Quick adaptation to different business needs • Long deployment cycles • Auto scaling and healing • Managing the config of the environments
  • 6. MONOLITHIC TO MICROSERVICES • YAGNI (You Aren't Gonna Need It) • Exposing new restful apis to front-end • Current API project count in backend : 40+ and growing
  • 7. MICROSERVICES Front-End (React App) Apı Gateway LB Apı Gateway 1 Apı Gateway 2 Settlement Reporting API 1 Settlement Reporting API 2 Payment Reporting API 1 Payment Reporting API 2 Merchant API 2 Merchant API 1 Confing Server LB Confing Server 1 Confing Server 2 Discovery Server 1 Discovery Server 1 Auth Server 1 Auth Server 1 Elastic searchRedisMySql Bitbucket (Config Repo)
  • 9. CONFIG SERVER • Centralized • Configuration First • Git for Storage Service A Service B Load Balancer Config Server -1 Config Server -2 Git
  • 10. • Key / Value • Exposes Rest APIs • Encrypt / Decrypt • Fail Fast, Force Pull • Retry • Refresh properties in runtime
 curl –X POST http://localhost:8080/refresh CONFIG SERVER
  • 11. CONFIG SERVER Encrypt / Decrypt
 curl localhost:8080/encrypt -d value
 8eb5cb42dc80d5aad09c67861e0fdad2534b05680adf9939502c3e57d0345 c01
 curl localhost:8080/encrypt -d value
 bb96c622456bb8d2af70b68bc30d00a4ebb915bce98628dd64f842af458a7 27a
 
 username: '{cipher} bb96c622456bb8d2af70b68bc30d00a4ebb915bce98628dd64f842af458a7 27a '
  • 13. API GATEWAY / BACKEND FOR FRONTEND • An edge service, gatekeeper for micro services • Adapter layer for specific devices • Some services might not be friendly • Another component to make holy available
  • 14. MICROSERVICES Front-End (React App) Apı Gateway LB Apı Gateway 1 Apı Gateway 2 Settlement Reporting API 1 Settlement Reporting API 2 Payment Reporting API 1 Payment Reporting API 2 Merchant API 2 Merchant API 1 Confing Server LB Confing Server 1 Confing Server 2 Discovery Server 1 Discovery Server 1 Auth Server 1 Auth Server 1 Elastic searchRedisMySql Bitbucket (Config Repo)
  • 15. NETFLIX ZUUL • Easy setup • Used by many tech companies in production • Rate limiting or logging filters vs. • Authentication • Smart Load Balancing • Attack Detection & Prevention • Difficult to manage timeout with gateway and apis together • Keep business logic out of gateway :)
  • 17. ALTERNATIVES • Nginx and zuul 1.0 is blocking • Zuul 2.0 , Spring Cloud Gateway , Linkerd , Envoy is non blocking ➤ Asynchronus Programming ➤ Event – Loop Pattern ➤ High Performance -> CPU Utilization ➤ Improve Resiliency –> Connection Scaling ➤ Difficult tracing and debug •
  • 18. BLOCKING – NON BLOCKING
  • 20. SERVICE DISCOVERY • Number of service instances and locations changes dynamically (on-demand scalability) • So hard to manage lots of microservices in a cloud native world with DNS and Load Balancers • Maintains registry of client with metadata (host, port, name) • Client heartbeats
  • 21. • Client code is simpler just a request to the router • Router is another component to install, configure and make highly available • More network hops are required than client-side • AWS Elastic Load Balancer is an example SERVER SIDE DISCOVERY
  • 22. • Client code is simpler just a request to the router • Router is another component to install, configure and make highly available • More network hops are required than client-side • AWS Elastic Load Balancer is an example CLIENT SIDE DISCOVERY
  • 23. MICROSERVICES Front-End (React App) Apı Gateway LB Apı Gateway 1 Apı Gateway 2 Settlement Reporting API 1 Settlement Reporting API 2 Payment Reporting API 1 Payment Reporting API 2 Merchant API 2 Merchant API 1 Confing Server LB Confing Server 1 Confing Server 2 Discovery Server 1 Discovery Server 1 Auth Server 1 Auth Server 1 Elastic searchRedisMySql Bitbucket (Config Repo)
  • 24. • Uses client-side discovery • Provides rest api to query service instances • All nodes sync with eventually consistent approach NETFLIX EUREKA Register : register at startup Fetch Registry : provide client-side registry cache Heartbeat : heartbeat every 30 seconds
  • 26. WHY WE CHOOSE EUREKA • Easy setup • Rest based service registry • Support replication • Caches on client • Fast but not consistent • Discovery server client interface (abstraction)
  • 27. CHALLANGES IN REGISTERING EUREKA • Client Registration • Server Response Cache  • Client Cache Refresh • LoadBalancer Refresh
  • 28. • Declarative rest client with interfaces • It makes writing web service clients easier (no implementation code) • @FeignClient annotation • Spring Cloud will implement it at run-time • Uses ribbon load balancer and hystrix circuit breaker • No more implements client projects • FEIGN CLIENT
  • 29. RIBBON • Client side load balancer • Load Balancing Algorithms • Fault Tolerance • Eureka, Hystrix • Good set of configuration
  • 30. SLEUTH • Traceability Problem in Microservices • Distributed Tracing Solution • TraceId, SpanId • Zipkin • Hystrix, Rest Template, Feign Client, WebClient, WebFlux , Zuul
  • 32. SLEUTH • [appName,traceId,spanId,exportable] • [gateway,3304850e78ef339d,3304850e78ef339d,false] • [reporting-api,3304850e78ef339d,3c3d599eb7acb79b,false] • [reporting-api,3304850e78ef339d,3c3d599eb7acb79b,false] • [dispute-api,3304850e78ef339d,6a891d5ed4f59aa8,false] • [dispute-api,3304850e78ef339d,6a891d5ed4f59aa8,false] • [dispute-api,3304850e78ef339d,6a891d5ed4f59aa8,false] • [reporting-api,3304850e78ef339d,3c3d599eb7acb79b,false] • [gateway,3304850e78ef339d,3304850e78ef339d,false]
  • 35. HYSTRIX • Netflix OSS • Failures Will Happen • Prevent Domino Effect • Hystrix Properties • Fallback Method • Hystrix Dashboard
  • 37. • Need a token-based approach to talk to front- end • Need to authenticate a single request in all microservices • Authorize requests according to user permissions • AUTHENTICATION & AUTHORIZATION
  • 38. MICROSERVICES Front-End (React App) Apı Gateway LB Apı Gateway 1 Apı Gateway 2 Settlement Reporting API 1 Settlement Reporting API 2 Payment Reporting API 1 Payment Reporting API 2 Merchant API 2 Merchant API 1 Confing Server LB Confing Server 1 Confing Server 2 Discovery Server 1 Discovery Server 1 Auth Server 1 Auth Server 1 Elastic searchRedisMySql Bitbucket (Config Repo)
  • 39. • Open standard authorization protocol specification • Enables access without sharing credentials • OAUTH2 • Used by many tech companies • Support Single Sign-On •
  • 40. • An open standard for securely sending information between parties • Consists 3 parts. Header, payload(claims) and the signature xxxxx.yyyyy.zzzzz • Encoded not encrypted • JWTs can be signed using a secret (with the  HMACSHA256  algorithm) or a public/private key pair using RSA. • Stateless authentication • Customize token JWT (JSON WEB TOKEN )
  • 41. BASIC AUTH & OAUTH2 TOGETHER
  • 43. STEP BY STEP MIGRATION 1. Sprint Cloud Dependencies 2. Move configs to config repo 3. OAuth Integration 4. Log Execution Interceptor 5. Enable Discovery Client 6. Exception Handling 7. Configurations
  • 44. FUTURE ROAD MAP Registration First Spring Cloud Bus Migration To Microservice Databases Event Based Dockerize Kubernetes