SlideShare ist ein Scribd-Unternehmen logo
1 von 54
Downloaden Sie, um offline zu lesen
HOW TO BUILD
EFFICIENT BACKEND
BASED ON
MICROSERVICE
ARCHITECTURE
Anton
Cherednikov
Summer. Sea. JavaScript.
1
Topics
Services… How did we get here?
2 Infrastructure
5 GraphQL in micro-service world
3
Micro-services: communication approaches
6 Conclusion
4
Transactions: how to ensure data consistency
between services?
WHAT THE HELL AM I DOING NOW?
Services...
How did we get here?
Monolithic Architecture
Benefits:
● can work very well even for large applications
● easier debugging and testing
● simple to develop/deploy
Monolithic Architecture
Benefits:
● can work very well even for large applications
● easier debugging and testing
● simple to develop/deploy
Tradeoffs:
● becomes too complicated to understand when application scales up
● harder to implement changes
● cannot scale components independently
● cannot deploy components independently
Service-Oriented Architecture
Service orientation is a paradigm that frames what you do. (SOA manifesto: http://www.soa-manifesto.org)
Micro-service Architecture
usually:
● CI/CD as core value
● stateless
● minimize on sharing of components
● low coupling
● native to cloud-based development
● higher scalability and flexibility
● extra complexity: support and set up the connections between all the modules and databases. All
services have to be deployed independently
● system distribution: when creating a new microservices application, we should handle a number of
cross-cutting concerns: logging, metrics, externalized configuration, health checks…
● testing: quality assurance of code, system and contracts
between services is being much harder cause multiple of
independently deployable components
● debugging: holy hell
Infrastructure
How to be cloud-agnostic?
How to be cloud-agnostic?
How to be cloud-agnostic?
How to be cloud-agnostic?
How to be cloud-agnostic?
Anton Grishko - code.store DevOps Architect
“Multi-cloud with Google Anthos and Istio. How to stop worry about infrastructure”
LENS <3
LENS
● circuit breaker from the box
● load balancing
● native to k8s
● request routing by versions or
routing environment
● service discovery (registry)
● canary releases
● decentralization
● independent deployment
● fault Isolation
● services to develop independently
of each other
● invoke serverless functions via
APIs
● transform requests and responses
on the fly
● k8s integration
● authentication and Security
● dynamic Routing
● load balancing
● static response handling
● multiregion resiliency
● insights and monitoring
How Netflix use Zuul
Istio features
Elastic Logstash Kibana
● monitoring and alerting toolkit
● built at SoundCloud
● active scraping, storing, querying, graphing, and alerting
based on time series data
● multidimensional data model with time series data identified
by metric name and key/value pairs
● time series collection happens via a pull model over HTTP
Prometheus
HOW TO FIND BOTTLENECKS?
HOW TO CATCH GATEWAY ERROR CODES?
Environments
Environments
Micro-services
communication approaches
Orchestral approach
Orchestration is a centralized transaction management
usually:
● communicate services via HTTP/gRPC…
● aggregate response from different services
● allows different request flows
● sync/async requests to couple of services
● provide public API
Benefits:
● good way for controlling the flow of the application when there is synchronous
processing
● a good way for controlling the flow of the application
● low coupling
● saving contacts in one place
Tradeoffs:
● think about state
● orchestrator is a single point of failure
● if u use kafka BEWARE OF REBALANCING
NodeJS Orchestration Sample
Choreography approach
usually:
● services are connected to a message brokerё
● services just subscribe channels they are interested in
● once an event series occurs that matters of the service, the service performs the appropriate action.
● now it is easy to add new services to the architecture;
● in the worst case must to ensure that the other services emit the events that the new service requires.
● adding additional events or extending the payload of existing events won’t break existing logic
Kafka is generally used for two broad classes of applications:
● Building real-time streaming data pipelines that reliably get data
between systems or applications
● Building real-time streaming applications that transform or react to
the streams of data
spoiler: rebalancing is beautiful
● Our application can’t use ACID transactions - entities are now spread into multiple databases.
● In case of failure in one of micro-service, state recovery can’t be attained by “two phase
commit” while rollback of transaction
● one to many relationships becomes even more challenging
Challenge!
To ensure the data consistency we need to implement distributed transaction
Transactions
● saga is a sequence of local transactions where each transaction updates data within a single
service
● each service which changes the state of the database in a distributed transaction can generate
an event which can trigger the next micro service
● in case of a failure, the saga triggers a sequence of compensating roll back events from one
service to the other in the reverse direction.
To handle this scenario, saga pattern can be used!
These sagas can be designed using two techniques:
● choreography, in which each service can trigger other service’s event without a central
coordinator
● orchestration, in which a central coordinator makes the decision of triggering the relevant
events in the saga
SAGA
Create order flow
Choreography approach - create order flow
Rollback a distributed transaction doesn’t come for free. We have to implement
another operation/transaction to compensate for what has been done before.
Orchestration approach: create order flow
Orchestration approach - rollback
● Rebalancing
● Prepare to enjoy of rebalancing strategy:
■ ROUND ROBIN
■ RANGE
● Messaging patterns in NodeJS
● SO! You should be ready to implement each pattern by yourself
Patterns of Enterprise Application Architecture
by Martin Fowler
GraphQL
in micro-service world
Apollo Federation overview
● multiple-services as a single graph
● An implementing service can reference a type that's defined by another implementing service.
NOT SO FAST!
● fckn Federation Gateway falls
● k8s rolling update issue
● extended caching
● some of service didn’t respond
● ...
U should be ready to extend Apollo Federation Gateway
SPASIBON

Weitere ähnliche Inhalte

Was ist angesagt?

Modern Tools for Building Progressive Web Apps
Modern Tools for Building Progressive Web AppsModern Tools for Building Progressive Web Apps
Modern Tools for Building Progressive Web AppsAll Things Open
 
How Hootsuite Manages Its Growing Microservice Landscape
How Hootsuite Manages Its Growing Microservice LandscapeHow Hootsuite Manages Its Growing Microservice Landscape
How Hootsuite Manages Its Growing Microservice LandscapeAdam Arsenault
 
Building applications in a Micro-frontends way
Building applications in a Micro-frontends wayBuilding applications in a Micro-frontends way
Building applications in a Micro-frontends wayPrasanna Venkatesan
 
A brief intro to nodejs
A brief intro to nodejsA brief intro to nodejs
A brief intro to nodejsJay Liu
 
Full stack web development with c# and web assembly - Blazor.Net
Full stack web development with c# and web assembly - Blazor.NetFull stack web development with c# and web assembly - Blazor.Net
Full stack web development with c# and web assembly - Blazor.NetRuwantha Ratnayake
 
Common blind spots on the journey to production vijay raghavan aravamudhan
Common blind spots on the journey to production  vijay raghavan aravamudhanCommon blind spots on the journey to production  vijay raghavan aravamudhan
Common blind spots on the journey to production vijay raghavan aravamudhanXP Conference India
 
Embracing Observability in CI/CD with OpenTelemetry
Embracing Observability in CI/CD with OpenTelemetryEmbracing Observability in CI/CD with OpenTelemetry
Embracing Observability in CI/CD with OpenTelemetryCyrille Le Clerc
 
Ahmadabad mule soft_meetup_17april2021_mule4_cryptography
Ahmadabad mule soft_meetup_17april2021_mule4_cryptographyAhmadabad mule soft_meetup_17april2021_mule4_cryptography
Ahmadabad mule soft_meetup_17april2021_mule4_cryptographyShekh Muenuddeen
 
Mumbai MuleSoft Meetup #17 - GraphQL
Mumbai MuleSoft Meetup #17 - GraphQLMumbai MuleSoft Meetup #17 - GraphQL
Mumbai MuleSoft Meetup #17 - GraphQLAkshata Sawant
 
Professional JavaScript Error-Logging
Professional JavaScript Error-LoggingProfessional JavaScript Error-Logging
Professional JavaScript Error-LoggingKai Donato
 
Controle do ciclo de vida do desenvolvimento de software com tfs vsts
Controle do ciclo de vida do desenvolvimento de software com tfs  vstsControle do ciclo de vida do desenvolvimento de software com tfs  vsts
Controle do ciclo de vida do desenvolvimento de software com tfs vstsRodrigo Kono
 
JS digest. November 2017
JS digest. November 2017JS digest. November 2017
JS digest. November 2017ElifTech
 
Gestire i rilasci automatici con azure devops
Gestire i rilasci automatici con azure devopsGestire i rilasci automatici con azure devops
Gestire i rilasci automatici con azure devopsGian Maria Ricci
 
NodeJS_Presentation
NodeJS_PresentationNodeJS_Presentation
NodeJS_PresentationArpita Patel
 
TabTale Architecture Overview
TabTale Architecture OverviewTabTale Architecture Overview
TabTale Architecture OverviewAssaf Gannon
 
Laptop Devops: Putting Modern Infrastructure Automation to Work For Local Dev...
Laptop Devops: Putting Modern Infrastructure Automation to Work For Local Dev...Laptop Devops: Putting Modern Infrastructure Automation to Work For Local Dev...
Laptop Devops: Putting Modern Infrastructure Automation to Work For Local Dev...Thoughtworks
 
NYC Continuous Delivery Meetup - Introducing delta
NYC Continuous Delivery Meetup - Introducing deltaNYC Continuous Delivery Meetup - Introducing delta
NYC Continuous Delivery Meetup - Introducing deltaMichael Bryzek
 
Production - Designing for Testability
Production - Designing for TestabilityProduction - Designing for Testability
Production - Designing for TestabilityMichael Bryzek
 

Was ist angesagt? (20)

Modern Tools for Building Progressive Web Apps
Modern Tools for Building Progressive Web AppsModern Tools for Building Progressive Web Apps
Modern Tools for Building Progressive Web Apps
 
How Hootsuite Manages Its Growing Microservice Landscape
How Hootsuite Manages Its Growing Microservice LandscapeHow Hootsuite Manages Its Growing Microservice Landscape
How Hootsuite Manages Its Growing Microservice Landscape
 
Building applications in a Micro-frontends way
Building applications in a Micro-frontends wayBuilding applications in a Micro-frontends way
Building applications in a Micro-frontends way
 
A brief intro to nodejs
A brief intro to nodejsA brief intro to nodejs
A brief intro to nodejs
 
Micro-frontend
Micro-frontendMicro-frontend
Micro-frontend
 
Enter the Team City
Enter the Team CityEnter the Team City
Enter the Team City
 
Full stack web development with c# and web assembly - Blazor.Net
Full stack web development with c# and web assembly - Blazor.NetFull stack web development with c# and web assembly - Blazor.Net
Full stack web development with c# and web assembly - Blazor.Net
 
Common blind spots on the journey to production vijay raghavan aravamudhan
Common blind spots on the journey to production  vijay raghavan aravamudhanCommon blind spots on the journey to production  vijay raghavan aravamudhan
Common blind spots on the journey to production vijay raghavan aravamudhan
 
Embracing Observability in CI/CD with OpenTelemetry
Embracing Observability in CI/CD with OpenTelemetryEmbracing Observability in CI/CD with OpenTelemetry
Embracing Observability in CI/CD with OpenTelemetry
 
Ahmadabad mule soft_meetup_17april2021_mule4_cryptography
Ahmadabad mule soft_meetup_17april2021_mule4_cryptographyAhmadabad mule soft_meetup_17april2021_mule4_cryptography
Ahmadabad mule soft_meetup_17april2021_mule4_cryptography
 
Mumbai MuleSoft Meetup #17 - GraphQL
Mumbai MuleSoft Meetup #17 - GraphQLMumbai MuleSoft Meetup #17 - GraphQL
Mumbai MuleSoft Meetup #17 - GraphQL
 
Professional JavaScript Error-Logging
Professional JavaScript Error-LoggingProfessional JavaScript Error-Logging
Professional JavaScript Error-Logging
 
Controle do ciclo de vida do desenvolvimento de software com tfs vsts
Controle do ciclo de vida do desenvolvimento de software com tfs  vstsControle do ciclo de vida do desenvolvimento de software com tfs  vsts
Controle do ciclo de vida do desenvolvimento de software com tfs vsts
 
JS digest. November 2017
JS digest. November 2017JS digest. November 2017
JS digest. November 2017
 
Gestire i rilasci automatici con azure devops
Gestire i rilasci automatici con azure devopsGestire i rilasci automatici con azure devops
Gestire i rilasci automatici con azure devops
 
NodeJS_Presentation
NodeJS_PresentationNodeJS_Presentation
NodeJS_Presentation
 
TabTale Architecture Overview
TabTale Architecture OverviewTabTale Architecture Overview
TabTale Architecture Overview
 
Laptop Devops: Putting Modern Infrastructure Automation to Work For Local Dev...
Laptop Devops: Putting Modern Infrastructure Automation to Work For Local Dev...Laptop Devops: Putting Modern Infrastructure Automation to Work For Local Dev...
Laptop Devops: Putting Modern Infrastructure Automation to Work For Local Dev...
 
NYC Continuous Delivery Meetup - Introducing delta
NYC Continuous Delivery Meetup - Introducing deltaNYC Continuous Delivery Meetup - Introducing delta
NYC Continuous Delivery Meetup - Introducing delta
 
Production - Designing for Testability
Production - Designing for TestabilityProduction - Designing for Testability
Production - Designing for Testability
 

Ähnlich wie 'How to build efficient backend based on microservice architecture' by Anton Cherednikov at OdessaJS'2020

JS Fest 2019/Autumn. Anton Cherednikov. Choreographic or orchestral architect...
JS Fest 2019/Autumn. Anton Cherednikov. Choreographic or orchestral architect...JS Fest 2019/Autumn. Anton Cherednikov. Choreographic or orchestral architect...
JS Fest 2019/Autumn. Anton Cherednikov. Choreographic or orchestral architect...JSFestUA
 
Saga transactions msa_ architecture
Saga transactions msa_ architectureSaga transactions msa_ architecture
Saga transactions msa_ architectureMauro Vocale
 
Docebo: history of a journey from legacy to serverless
Docebo: history of a journey from legacy to serverlessDocebo: history of a journey from legacy to serverless
Docebo: history of a journey from legacy to serverlessAWS User Group Italy
 
Reactive programming: Brincando com eficiência, composição e assíncronia
Reactive programming: Brincando com eficiência, composição e assíncroniaReactive programming: Brincando com eficiência, composição e assíncronia
Reactive programming: Brincando com eficiência, composição e assíncroniaFelipe Mamud
 
Agile integration: Decomposing the monolith
Agile integration: Decomposing the monolith Agile integration: Decomposing the monolith
Agile integration: Decomposing the monolith Judy Breedlove
 
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.
 
Microservice Workshop Hands On
Microservice Workshop Hands On Microservice Workshop Hands On
Microservice Workshop Hands On Ram G Suri
 
Software Architecture for Cloud Infrastructure
Software Architecture for Cloud InfrastructureSoftware Architecture for Cloud Infrastructure
Software Architecture for Cloud InfrastructureTapio Rautonen
 
Open Source Networking Days- Service Mesh
Open Source Networking Days- Service MeshOpen Source Networking Days- Service Mesh
Open Source Networking Days- Service MeshCloudOps2005
 
The what, why and how of knative
The what, why and how of knativeThe what, why and how of knative
The what, why and how of knativeMofizur Rahman
 
Lagom : Reactive microservice framework
Lagom : Reactive microservice frameworkLagom : Reactive microservice framework
Lagom : Reactive microservice frameworkFabrice Sznajderman
 
[WSO2Con Asia 2018] Architecting for Container-native Environments
[WSO2Con Asia 2018] Architecting for Container-native Environments[WSO2Con Asia 2018] Architecting for Container-native Environments
[WSO2Con Asia 2018] Architecting for Container-native EnvironmentsWSO2
 
Manage the Digital Transformation with Machine Learning in a Reactive Microse...
Manage the Digital Transformation with Machine Learning in a Reactive Microse...Manage the Digital Transformation with Machine Learning in a Reactive Microse...
Manage the Digital Transformation with Machine Learning in a Reactive Microse...DataWorks Summit
 
08 hopex v next service fabric
08 hopex v next   service fabric08 hopex v next   service fabric
08 hopex v next service fabricMichel Bruchet
 
Exposing Lambda Functions as Managed APIs
Exposing Lambda Functions as Managed APIsExposing Lambda Functions as Managed APIs
Exposing Lambda Functions as Managed APIsWSO2
 
API Microservices with Node.js and Docker
API Microservices with Node.js and DockerAPI Microservices with Node.js and Docker
API Microservices with Node.js and DockerApigee | Google Cloud
 
Microservices and developer pattern saga
Microservices and developer pattern sagaMicroservices and developer pattern saga
Microservices and developer pattern sagaviktorklyuster
 

Ähnlich wie 'How to build efficient backend based on microservice architecture' by Anton Cherednikov at OdessaJS'2020 (20)

JS Fest 2019/Autumn. Anton Cherednikov. Choreographic or orchestral architect...
JS Fest 2019/Autumn. Anton Cherednikov. Choreographic or orchestral architect...JS Fest 2019/Autumn. Anton Cherednikov. Choreographic or orchestral architect...
JS Fest 2019/Autumn. Anton Cherednikov. Choreographic or orchestral architect...
 
Saga transactions msa_ architecture
Saga transactions msa_ architectureSaga transactions msa_ architecture
Saga transactions msa_ architecture
 
Docebo: history of a journey from legacy to serverless
Docebo: history of a journey from legacy to serverlessDocebo: history of a journey from legacy to serverless
Docebo: history of a journey from legacy to serverless
 
Reactive programming: Brincando com eficiência, composição e assíncronia
Reactive programming: Brincando com eficiência, composição e assíncroniaReactive programming: Brincando com eficiência, composição e assíncronia
Reactive programming: Brincando com eficiência, composição e assíncronia
 
Agile integration: Decomposing the monolith
Agile integration: Decomposing the monolith Agile integration: Decomposing the monolith
Agile integration: Decomposing the monolith
 
Do You Need A Service Mesh?
Do You Need A Service Mesh?Do You Need A Service Mesh?
Do You Need A Service Mesh?
 
Microservice Workshop Hands On
Microservice Workshop Hands On Microservice Workshop Hands On
Microservice Workshop Hands On
 
Software Architecture for Cloud Infrastructure
Software Architecture for Cloud InfrastructureSoftware Architecture for Cloud Infrastructure
Software Architecture for Cloud Infrastructure
 
Open Source Networking Days- Service Mesh
Open Source Networking Days- Service MeshOpen Source Networking Days- Service Mesh
Open Source Networking Days- Service Mesh
 
Adopting the Cloud
Adopting the CloudAdopting the Cloud
Adopting the Cloud
 
The what, why and how of knative
The what, why and how of knativeThe what, why and how of knative
The what, why and how of knative
 
Lagom : Reactive microservice framework
Lagom : Reactive microservice frameworkLagom : Reactive microservice framework
Lagom : Reactive microservice framework
 
[WSO2Con Asia 2018] Architecting for Container-native Environments
[WSO2Con Asia 2018] Architecting for Container-native Environments[WSO2Con Asia 2018] Architecting for Container-native Environments
[WSO2Con Asia 2018] Architecting for Container-native Environments
 
Manage the Digital Transformation with Machine Learning in a Reactive Microse...
Manage the Digital Transformation with Machine Learning in a Reactive Microse...Manage the Digital Transformation with Machine Learning in a Reactive Microse...
Manage the Digital Transformation with Machine Learning in a Reactive Microse...
 
08 hopex v next service fabric
08 hopex v next   service fabric08 hopex v next   service fabric
08 hopex v next service fabric
 
Microservice
MicroserviceMicroservice
Microservice
 
Exposing Lambda Functions as Managed APIs
Exposing Lambda Functions as Managed APIsExposing Lambda Functions as Managed APIs
Exposing Lambda Functions as Managed APIs
 
API Microservices with Node.js and Docker
API Microservices with Node.js and DockerAPI Microservices with Node.js and Docker
API Microservices with Node.js and Docker
 
ZhuSem.ppt
ZhuSem.pptZhuSem.ppt
ZhuSem.ppt
 
Microservices and developer pattern saga
Microservices and developer pattern sagaMicroservices and developer pattern saga
Microservices and developer pattern saga
 

Mehr von OdessaJS Conf

'GraphQL Schema Design' by Borys Mohyla. OdessaJS'2021
'GraphQL Schema Design' by Borys Mohyla. OdessaJS'2021'GraphQL Schema Design' by Borys Mohyla. OdessaJS'2021
'GraphQL Schema Design' by Borys Mohyla. OdessaJS'2021OdessaJS Conf
 
'How i came up with my talk' by Yurii Artiukh. OdessaJS'2021
'How i came up with my talk' by Yurii Artiukh. OdessaJS'2021'How i came up with my talk' by Yurii Artiukh. OdessaJS'2021
'How i came up with my talk' by Yurii Artiukh. OdessaJS'2021OdessaJS Conf
 
"Is there life in react without redux" by Babich Sergiy. OdessaJS'2021
"Is there life in react without redux" by Babich Sergiy. OdessaJS'2021"Is there life in react without redux" by Babich Sergiy. OdessaJS'2021
"Is there life in react without redux" by Babich Sergiy. OdessaJS'2021OdessaJS Conf
 
Олексій Павленко. CONTRACT PROTECTION ON THE FRONTEND SIDE: HOW TO ORGANIZE R...
Олексій Павленко. CONTRACT PROTECTION ON THE FRONTEND SIDE: HOW TO ORGANIZE R...Олексій Павленко. CONTRACT PROTECTION ON THE FRONTEND SIDE: HOW TO ORGANIZE R...
Олексій Павленко. CONTRACT PROTECTION ON THE FRONTEND SIDE: HOW TO ORGANIZE R...OdessaJS Conf
 
Олексій Гончар "Використання Electron в розробці корпоративної відео-мессeндж...
Олексій Гончар "Використання Electron в розробці корпоративної відео-мессeндж...Олексій Гончар "Використання Electron в розробці корпоративної відео-мессeндж...
Олексій Гончар "Використання Electron в розробці корпоративної відео-мессeндж...OdessaJS Conf
 
Павло Галушко. GOOD CODE MYTHS. OdessaJS'2021
Павло Галушко. GOOD CODE MYTHS. OdessaJS'2021Павло Галушко. GOOD CODE MYTHS. OdessaJS'2021
Павло Галушко. GOOD CODE MYTHS. OdessaJS'2021OdessaJS Conf
 
"NODEJS & GRAPHQL COOKBOOK. LET’S TALK ABOUT MICRO-SERVICES" by Антон Чередні...
"NODEJS & GRAPHQL COOKBOOK. LET’S TALK ABOUT MICRO-SERVICES" by Антон Чередні..."NODEJS & GRAPHQL COOKBOOK. LET’S TALK ABOUT MICRO-SERVICES" by Антон Чередні...
"NODEJS & GRAPHQL COOKBOOK. LET’S TALK ABOUT MICRO-SERVICES" by Антон Чередні...OdessaJS Conf
 
'BUILDING ANGULAR APPS WITH NX' by Anastasia Necheporenko
'BUILDING ANGULAR APPS WITH NX' by Anastasia Necheporenko'BUILDING ANGULAR APPS WITH NX' by Anastasia Necheporenko
'BUILDING ANGULAR APPS WITH NX' by Anastasia NecheporenkoOdessaJS Conf
 
'IS THERE JAVASCRIPT ON SWAGGER PLUGINS?' by Dmytro Gusev
'IS THERE JAVASCRIPT ON SWAGGER PLUGINS?' by  Dmytro Gusev'IS THERE JAVASCRIPT ON SWAGGER PLUGINS?' by  Dmytro Gusev
'IS THERE JAVASCRIPT ON SWAGGER PLUGINS?' by Dmytro GusevOdessaJS Conf
 
'ETHEREUM SMART CONTRACTS ON JS' by Yaroslav Dvorovenko
'ETHEREUM SMART CONTRACTS ON JS' by Yaroslav Dvorovenko'ETHEREUM SMART CONTRACTS ON JS' by Yaroslav Dvorovenko
'ETHEREUM SMART CONTRACTS ON JS' by Yaroslav DvorovenkoOdessaJS Conf
 
'GOLANG USAGE IN DEVELOPMENT OF NODE.JS APPLICATIONS (NODE.JS: IN GO WE TRUST...
'GOLANG USAGE IN DEVELOPMENT OF NODE.JS APPLICATIONS (NODE.JS: IN GO WE TRUST...'GOLANG USAGE IN DEVELOPMENT OF NODE.JS APPLICATIONS (NODE.JS: IN GO WE TRUST...
'GOLANG USAGE IN DEVELOPMENT OF NODE.JS APPLICATIONS (NODE.JS: IN GO WE TRUST...OdessaJS Conf
 
'MICROFRONTENDS WITH REACT' by Liliia Karpenko
 'MICROFRONTENDS WITH REACT' by Liliia Karpenko 'MICROFRONTENDS WITH REACT' by Liliia Karpenko
'MICROFRONTENDS WITH REACT' by Liliia KarpenkoOdessaJS Conf
 
'Web performance metrics' BY ROMAN SAVITSKYI at OdessaJS'2020
'Web performance metrics' BY ROMAN SAVITSKYI at OdessaJS'2020'Web performance metrics' BY ROMAN SAVITSKYI at OdessaJS'2020
'Web performance metrics' BY ROMAN SAVITSKYI at OdessaJS'2020OdessaJS Conf
 
'STORY OF ANOTHER ANIMATION' by YURII ARTYUKH at OdessaJS'2020
'STORY OF ANOTHER ANIMATION' by  YURII ARTYUKH at OdessaJS'2020'STORY OF ANOTHER ANIMATION' by  YURII ARTYUKH at OdessaJS'2020
'STORY OF ANOTHER ANIMATION' by YURII ARTYUKH at OdessaJS'2020OdessaJS Conf
 
'JavaScript was invented in Odessa' by DMITRIY GUSEV at OdessaJS'2020
'JavaScript was invented in Odessa' by DMITRIY GUSEV at OdessaJS'2020'JavaScript was invented in Odessa' by DMITRIY GUSEV at OdessaJS'2020
'JavaScript was invented in Odessa' by DMITRIY GUSEV at OdessaJS'2020OdessaJS Conf
 
'Why svelte' by BORYS MOHYLA at OdessaJS'2020
'Why svelte' by BORYS MOHYLA at OdessaJS'2020'Why svelte' by BORYS MOHYLA at OdessaJS'2020
'Why svelte' by BORYS MOHYLA at OdessaJS'2020OdessaJS Conf
 
'Tensorflow.js in real life' by Pavlo Galushko at OdessaJS'2020
'Tensorflow.js in real life' by Pavlo Galushko at OdessaJS'2020'Tensorflow.js in real life' by Pavlo Galushko at OdessaJS'2020
'Tensorflow.js in real life' by Pavlo Galushko at OdessaJS'2020OdessaJS Conf
 
'React+d3=LOVE' by Illia Olenchenko at OdessaJS'2020
'React+d3=LOVE' by Illia Olenchenko at OdessaJS'2020'React+d3=LOVE' by Illia Olenchenko at OdessaJS'2020
'React+d3=LOVE' by Illia Olenchenko at OdessaJS'2020OdessaJS Conf
 
'THE AGE OF DATA STREAMING' by DENIS BURYACHKOVSKY at OdessaJS'2020
'THE AGE OF DATA STREAMING' by DENIS BURYACHKOVSKY at OdessaJS'2020'THE AGE OF DATA STREAMING' by DENIS BURYACHKOVSKY at OdessaJS'2020
'THE AGE OF DATA STREAMING' by DENIS BURYACHKOVSKY at OdessaJS'2020OdessaJS Conf
 
'Worker threads vs c++ addons' by Novokhatskyi Oleksii at OdessaJS'2020
'Worker threads vs c++ addons' by Novokhatskyi Oleksii at OdessaJS'2020'Worker threads vs c++ addons' by Novokhatskyi Oleksii at OdessaJS'2020
'Worker threads vs c++ addons' by Novokhatskyi Oleksii at OdessaJS'2020OdessaJS Conf
 

Mehr von OdessaJS Conf (20)

'GraphQL Schema Design' by Borys Mohyla. OdessaJS'2021
'GraphQL Schema Design' by Borys Mohyla. OdessaJS'2021'GraphQL Schema Design' by Borys Mohyla. OdessaJS'2021
'GraphQL Schema Design' by Borys Mohyla. OdessaJS'2021
 
'How i came up with my talk' by Yurii Artiukh. OdessaJS'2021
'How i came up with my talk' by Yurii Artiukh. OdessaJS'2021'How i came up with my talk' by Yurii Artiukh. OdessaJS'2021
'How i came up with my talk' by Yurii Artiukh. OdessaJS'2021
 
"Is there life in react without redux" by Babich Sergiy. OdessaJS'2021
"Is there life in react without redux" by Babich Sergiy. OdessaJS'2021"Is there life in react without redux" by Babich Sergiy. OdessaJS'2021
"Is there life in react without redux" by Babich Sergiy. OdessaJS'2021
 
Олексій Павленко. CONTRACT PROTECTION ON THE FRONTEND SIDE: HOW TO ORGANIZE R...
Олексій Павленко. CONTRACT PROTECTION ON THE FRONTEND SIDE: HOW TO ORGANIZE R...Олексій Павленко. CONTRACT PROTECTION ON THE FRONTEND SIDE: HOW TO ORGANIZE R...
Олексій Павленко. CONTRACT PROTECTION ON THE FRONTEND SIDE: HOW TO ORGANIZE R...
 
Олексій Гончар "Використання Electron в розробці корпоративної відео-мессeндж...
Олексій Гончар "Використання Electron в розробці корпоративної відео-мессeндж...Олексій Гончар "Використання Electron в розробці корпоративної відео-мессeндж...
Олексій Гончар "Використання Electron в розробці корпоративної відео-мессeндж...
 
Павло Галушко. GOOD CODE MYTHS. OdessaJS'2021
Павло Галушко. GOOD CODE MYTHS. OdessaJS'2021Павло Галушко. GOOD CODE MYTHS. OdessaJS'2021
Павло Галушко. GOOD CODE MYTHS. OdessaJS'2021
 
"NODEJS & GRAPHQL COOKBOOK. LET’S TALK ABOUT MICRO-SERVICES" by Антон Чередні...
"NODEJS & GRAPHQL COOKBOOK. LET’S TALK ABOUT MICRO-SERVICES" by Антон Чередні..."NODEJS & GRAPHQL COOKBOOK. LET’S TALK ABOUT MICRO-SERVICES" by Антон Чередні...
"NODEJS & GRAPHQL COOKBOOK. LET’S TALK ABOUT MICRO-SERVICES" by Антон Чередні...
 
'BUILDING ANGULAR APPS WITH NX' by Anastasia Necheporenko
'BUILDING ANGULAR APPS WITH NX' by Anastasia Necheporenko'BUILDING ANGULAR APPS WITH NX' by Anastasia Necheporenko
'BUILDING ANGULAR APPS WITH NX' by Anastasia Necheporenko
 
'IS THERE JAVASCRIPT ON SWAGGER PLUGINS?' by Dmytro Gusev
'IS THERE JAVASCRIPT ON SWAGGER PLUGINS?' by  Dmytro Gusev'IS THERE JAVASCRIPT ON SWAGGER PLUGINS?' by  Dmytro Gusev
'IS THERE JAVASCRIPT ON SWAGGER PLUGINS?' by Dmytro Gusev
 
'ETHEREUM SMART CONTRACTS ON JS' by Yaroslav Dvorovenko
'ETHEREUM SMART CONTRACTS ON JS' by Yaroslav Dvorovenko'ETHEREUM SMART CONTRACTS ON JS' by Yaroslav Dvorovenko
'ETHEREUM SMART CONTRACTS ON JS' by Yaroslav Dvorovenko
 
'GOLANG USAGE IN DEVELOPMENT OF NODE.JS APPLICATIONS (NODE.JS: IN GO WE TRUST...
'GOLANG USAGE IN DEVELOPMENT OF NODE.JS APPLICATIONS (NODE.JS: IN GO WE TRUST...'GOLANG USAGE IN DEVELOPMENT OF NODE.JS APPLICATIONS (NODE.JS: IN GO WE TRUST...
'GOLANG USAGE IN DEVELOPMENT OF NODE.JS APPLICATIONS (NODE.JS: IN GO WE TRUST...
 
'MICROFRONTENDS WITH REACT' by Liliia Karpenko
 'MICROFRONTENDS WITH REACT' by Liliia Karpenko 'MICROFRONTENDS WITH REACT' by Liliia Karpenko
'MICROFRONTENDS WITH REACT' by Liliia Karpenko
 
'Web performance metrics' BY ROMAN SAVITSKYI at OdessaJS'2020
'Web performance metrics' BY ROMAN SAVITSKYI at OdessaJS'2020'Web performance metrics' BY ROMAN SAVITSKYI at OdessaJS'2020
'Web performance metrics' BY ROMAN SAVITSKYI at OdessaJS'2020
 
'STORY OF ANOTHER ANIMATION' by YURII ARTYUKH at OdessaJS'2020
'STORY OF ANOTHER ANIMATION' by  YURII ARTYUKH at OdessaJS'2020'STORY OF ANOTHER ANIMATION' by  YURII ARTYUKH at OdessaJS'2020
'STORY OF ANOTHER ANIMATION' by YURII ARTYUKH at OdessaJS'2020
 
'JavaScript was invented in Odessa' by DMITRIY GUSEV at OdessaJS'2020
'JavaScript was invented in Odessa' by DMITRIY GUSEV at OdessaJS'2020'JavaScript was invented in Odessa' by DMITRIY GUSEV at OdessaJS'2020
'JavaScript was invented in Odessa' by DMITRIY GUSEV at OdessaJS'2020
 
'Why svelte' by BORYS MOHYLA at OdessaJS'2020
'Why svelte' by BORYS MOHYLA at OdessaJS'2020'Why svelte' by BORYS MOHYLA at OdessaJS'2020
'Why svelte' by BORYS MOHYLA at OdessaJS'2020
 
'Tensorflow.js in real life' by Pavlo Galushko at OdessaJS'2020
'Tensorflow.js in real life' by Pavlo Galushko at OdessaJS'2020'Tensorflow.js in real life' by Pavlo Galushko at OdessaJS'2020
'Tensorflow.js in real life' by Pavlo Galushko at OdessaJS'2020
 
'React+d3=LOVE' by Illia Olenchenko at OdessaJS'2020
'React+d3=LOVE' by Illia Olenchenko at OdessaJS'2020'React+d3=LOVE' by Illia Olenchenko at OdessaJS'2020
'React+d3=LOVE' by Illia Olenchenko at OdessaJS'2020
 
'THE AGE OF DATA STREAMING' by DENIS BURYACHKOVSKY at OdessaJS'2020
'THE AGE OF DATA STREAMING' by DENIS BURYACHKOVSKY at OdessaJS'2020'THE AGE OF DATA STREAMING' by DENIS BURYACHKOVSKY at OdessaJS'2020
'THE AGE OF DATA STREAMING' by DENIS BURYACHKOVSKY at OdessaJS'2020
 
'Worker threads vs c++ addons' by Novokhatskyi Oleksii at OdessaJS'2020
'Worker threads vs c++ addons' by Novokhatskyi Oleksii at OdessaJS'2020'Worker threads vs c++ addons' by Novokhatskyi Oleksii at OdessaJS'2020
'Worker threads vs c++ addons' by Novokhatskyi Oleksii at OdessaJS'2020
 

Kürzlich hochgeladen

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 

Kürzlich hochgeladen (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 

'How to build efficient backend based on microservice architecture' by Anton Cherednikov at OdessaJS'2020

  • 1. HOW TO BUILD EFFICIENT BACKEND BASED ON MICROSERVICE ARCHITECTURE Anton Cherednikov Summer. Sea. JavaScript.
  • 2. 1 Topics Services… How did we get here? 2 Infrastructure 5 GraphQL in micro-service world 3 Micro-services: communication approaches 6 Conclusion 4 Transactions: how to ensure data consistency between services?
  • 3. WHAT THE HELL AM I DOING NOW?
  • 5. Monolithic Architecture Benefits: ● can work very well even for large applications ● easier debugging and testing ● simple to develop/deploy
  • 6. Monolithic Architecture Benefits: ● can work very well even for large applications ● easier debugging and testing ● simple to develop/deploy Tradeoffs: ● becomes too complicated to understand when application scales up ● harder to implement changes ● cannot scale components independently ● cannot deploy components independently
  • 7. Service-Oriented Architecture Service orientation is a paradigm that frames what you do. (SOA manifesto: http://www.soa-manifesto.org)
  • 8. Micro-service Architecture usually: ● CI/CD as core value ● stateless ● minimize on sharing of components ● low coupling ● native to cloud-based development ● higher scalability and flexibility
  • 9. ● extra complexity: support and set up the connections between all the modules and databases. All services have to be deployed independently ● system distribution: when creating a new microservices application, we should handle a number of cross-cutting concerns: logging, metrics, externalized configuration, health checks… ● testing: quality assurance of code, system and contracts between services is being much harder cause multiple of independently deployable components ● debugging: holy hell
  • 10.
  • 12.
  • 13. How to be cloud-agnostic?
  • 14. How to be cloud-agnostic?
  • 15. How to be cloud-agnostic?
  • 16. How to be cloud-agnostic?
  • 17. How to be cloud-agnostic? Anton Grishko - code.store DevOps Architect “Multi-cloud with Google Anthos and Istio. How to stop worry about infrastructure”
  • 19. LENS
  • 20. ● circuit breaker from the box ● load balancing ● native to k8s ● request routing by versions or routing environment ● service discovery (registry) ● canary releases ● decentralization ● independent deployment ● fault Isolation ● services to develop independently of each other ● invoke serverless functions via APIs ● transform requests and responses on the fly ● k8s integration ● authentication and Security ● dynamic Routing ● load balancing ● static response handling ● multiregion resiliency ● insights and monitoring How Netflix use Zuul
  • 23. ● monitoring and alerting toolkit ● built at SoundCloud ● active scraping, storing, querying, graphing, and alerting based on time series data ● multidimensional data model with time series data identified by metric name and key/value pairs ● time series collection happens via a pull model over HTTP Prometheus
  • 24. HOW TO FIND BOTTLENECKS? HOW TO CATCH GATEWAY ERROR CODES?
  • 27.
  • 29. Orchestral approach Orchestration is a centralized transaction management usually: ● communicate services via HTTP/gRPC… ● aggregate response from different services ● allows different request flows ● sync/async requests to couple of services ● provide public API
  • 30. Benefits: ● good way for controlling the flow of the application when there is synchronous processing ● a good way for controlling the flow of the application ● low coupling ● saving contacts in one place Tradeoffs: ● think about state ● orchestrator is a single point of failure ● if u use kafka BEWARE OF REBALANCING
  • 32. Choreography approach usually: ● services are connected to a message brokerё ● services just subscribe channels they are interested in ● once an event series occurs that matters of the service, the service performs the appropriate action. ● now it is easy to add new services to the architecture; ● in the worst case must to ensure that the other services emit the events that the new service requires. ● adding additional events or extending the payload of existing events won’t break existing logic
  • 33.
  • 34. Kafka is generally used for two broad classes of applications: ● Building real-time streaming data pipelines that reliably get data between systems or applications ● Building real-time streaming applications that transform or react to the streams of data spoiler: rebalancing is beautiful
  • 35. ● Our application can’t use ACID transactions - entities are now spread into multiple databases. ● In case of failure in one of micro-service, state recovery can’t be attained by “two phase commit” while rollback of transaction ● one to many relationships becomes even more challenging Challenge! To ensure the data consistency we need to implement distributed transaction
  • 37. ● saga is a sequence of local transactions where each transaction updates data within a single service ● each service which changes the state of the database in a distributed transaction can generate an event which can trigger the next micro service ● in case of a failure, the saga triggers a sequence of compensating roll back events from one service to the other in the reverse direction. To handle this scenario, saga pattern can be used!
  • 38. These sagas can be designed using two techniques: ● choreography, in which each service can trigger other service’s event without a central coordinator ● orchestration, in which a central coordinator makes the decision of triggering the relevant events in the saga SAGA
  • 40. Choreography approach - create order flow
  • 41. Rollback a distributed transaction doesn’t come for free. We have to implement another operation/transaction to compensate for what has been done before.
  • 44. ● Rebalancing ● Prepare to enjoy of rebalancing strategy: ■ ROUND ROBIN ■ RANGE ● Messaging patterns in NodeJS ● SO! You should be ready to implement each pattern by yourself
  • 45. Patterns of Enterprise Application Architecture by Martin Fowler
  • 47. Apollo Federation overview ● multiple-services as a single graph ● An implementing service can reference a type that's defined by another implementing service.
  • 48.
  • 49.
  • 50.
  • 51.
  • 53. ● fckn Federation Gateway falls ● k8s rolling update issue ● extended caching ● some of service didn’t respond ● ... U should be ready to extend Apollo Federation Gateway