SlideShare uma empresa Scribd logo
1 de 65
Baixar para ler offline
Forget about HTTP Requests
Irina Scurtu
Irina Scurtu
▪ Romania Based
▪ Software Architect @Endava
▪ Organizer of DotNet Iasi user group
▪ I teach .Net
@irina_scurtu
Agenda
▪ Monoliths& Microservices
▪ HTTP calls – sync & async
▪ RPC
▪ Messaging
▪ Queues
▪ Message Brokers
▪ Actor Model
MONOLITH
MONOLITH
▪ Self-contained
▪ Single codebase
▪ Single deploy unit
▪ Easy life for developers
▪ Dependencies are in your code
▪ Single technology stack
MONOLITH
▪ All or nothing deploys
▪ Downtimes
▪ Long build times
▪ ~ 0 continuous delivery
▪ Hard to test
Scaling the MONOLITH
Scale up
2
1 5
3
monolith syndrome?
MICROSERVICE
▪ it’s that thing that is not a monolith
▪ With it’s own database
▪ Easy to deploy
▪ Standalone
▪ Easy to maintain
Is it?
MICROSERVICES?
▪ Introduces complexity
▪ Cascading effects in case of failure
▪ Need to monitor them closely
2
1 5
3
Independent
units
2
1 5
3
Do you know?
▪ Amazon calls 150 APIs to Build a Page
▪ Netflix services about 5 billions API calls/day
▪ 99.7% are internal
HTTP API CALLS
HTTP CALLS
S
Response
H
HTTP CALLS
S H
HTTP CALLS
“It’s perfectly
fine to use sync
HTTP Calls”
▪ Timeouts
▪ Availability
▪ Going back to
coupling?
▪ You can loose
requests
▪ Retries?
“It’s perfectly fine to use async HTTP Calls”
▪You’ll have exactly the same issues as with sync calls
▪Distribute load?!
▪You can serve more request
▪You can serve the requests faster
HTTP General Notes
▪ Sync by nature
▪ Make a TCP connection for each request
▪ No retry out of the box
▪ No delivery guarantees
▪ Location transparency
▪ Good for public facing APIs
▪ Familiar
▪ Easy to debug
Challenges
▪Service Discovery
▪Retry policies
▪Circuit breakers
▪Timeouts
▪Routing
▪Tracing
RPC
RPC
▪ A kind of API call
▪Done through a message broker
▪ Ties systems together but preserves their
encapsulations
RPC
S H
Queues
Request
RPC
S
Queues
Response
Request
H
Gain vs Loss
▪You don’t lose the requests
▪You can add more handler instances
▪You can ‘apparently’ spread the load
▪You can process more requests
▪ Need to match the request
to the response
▪ You wait for a response =>
sync
Messaging
Body
Header
Messaging
▪Gives you loosely coupled integration
▪Doesn’t require both systems to be up
▪Messages ca be transformed in transit - Enrichers
▪Messaging systems trade consistency for availability
▪You don’t lose messages
▪Involves a Producer and a consumer
Messaging
ASYNC Queue Processing
S H
Queues
RequestRequest
Queue
S
Queues
Response
Request
Request
Request
H
Queue
Response
Response
With a DB
S
Queues
Response
Request
Request
Request
H
Storage
With a DB
s
Queues
Response
Request
Request
Request
H
Storage
Gains
• Is a reaction to the problems
of distributed sys
• Process more requests
• Process request faster
• Don’t lose requests
▪ You move the potential
issues to another
subsystem (DB in our case)
▪ Eventual consistency
remains a problem
Loss
Gain vs Loss
▪ Connection is scarce
▪ Batch process the message
▪ Use a semaphore to process them in batches
WHY USE a messaging system with MSA ?
Agility
▪Faster development
▪No integration process
▪Teams have ownership and full understanding of the codebase
▪You can switch technologies if needed
Scalability
Scale up
Scale out
Increased Throughput
38 267 vs 3500
ElasticityScale down to
reduce costs
A lot of ‘ilities’
▪Reliability
▪Flexibility
▪Distribution
▪Increased Throughput
▪Scalability
▪Elasticity
▪Performance
▪Agility
▪Fault Tolerance
Tools/Frameworks/Systems
Data Types
Queues
Actor Model
Message Brokers
What options do I have?
plenty
Many more
Queues
▪Useful for point to point communication
▪Messages are ordered and timestamped
▪Pull-mode
Actor model
▪Born from Reactive Programming
▪Actors are processes that encapsulate behavior
▪Actors are more than message consumers
▪Can delegate and create new actors
▪Can supervise children
▪At most once delivery
Reactive Manifesto
Message Driven
ResilientElastic
Responsive
Async message
Loose coupling
Location transparency
Scalable
React to workload
changes
Failures are self contained
Recovery
Isolation
Message Brokers
Message Brokers
▪One process sends a message to a named queue or topic
▪One or many consumers
▪Handles connections and disconnections very well
▪Dead-letter queue concept
▪Message Guarantees ( 3 types)
Message Brokers
▪Lightweight
▪Queues are FIFO
▪Supports AMPQ protocol
▪Easy to use, fast
▪At-least-once delivery
AMPQ General Notes
▪ Async by nature
▪ Guaranteed message delivery
▪ At-least once, exactly once, at most once delivery
▪ No DNS resolve
▪ Programmatic routing
▪ Retries out-of-the box
▪ Ack, Nack out of the box
▪ Concept of “channel”
Topic Exchange
References
In Summary
Messages
are great!
Messages are great
show them some
THANK YOU
@irina_scurtu
Q&A

Mais conteúdo relacionado

Mais procurados

Mais procurados (8)

ZaloPay Merchant Platform on K8S on-premise
ZaloPay Merchant Platform on K8S on-premiseZaloPay Merchant Platform on K8S on-premise
ZaloPay Merchant Platform on K8S on-premise
 
Tuning Kafka for Fun and Profit
Tuning Kafka for Fun and ProfitTuning Kafka for Fun and Profit
Tuning Kafka for Fun and Profit
 
How DreamHost builds a Public Cloud with OpenStack
How DreamHost builds a Public Cloud with OpenStackHow DreamHost builds a Public Cloud with OpenStack
How DreamHost builds a Public Cloud with OpenStack
 
Transforming monolith systems to microservices
Transforming monolith systems to microservicesTransforming monolith systems to microservices
Transforming monolith systems to microservices
 
kafka simplicity and complexity
kafka simplicity and complexitykafka simplicity and complexity
kafka simplicity and complexity
 
PLNOG16: DDOS SOLUTIONS – CUSTOMER POINT OF VIEW, Piotr Wojciechowski
PLNOG16: DDOS SOLUTIONS – CUSTOMER POINT OF VIEW, Piotr WojciechowskiPLNOG16: DDOS SOLUTIONS – CUSTOMER POINT OF VIEW, Piotr Wojciechowski
PLNOG16: DDOS SOLUTIONS – CUSTOMER POINT OF VIEW, Piotr Wojciechowski
 
Building microservices web application using scala & akka
Building microservices web application using scala & akkaBuilding microservices web application using scala & akka
Building microservices web application using scala & akka
 
Scaling Techniques to Increase Magento Capacity
Scaling Techniques to Increase Magento CapacityScaling Techniques to Increase Magento Capacity
Scaling Techniques to Increase Magento Capacity
 

Semelhante a Devit - forget about http requests

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
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera ClusterWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera Cluster
Continuent
 

Semelhante a Devit - forget about http requests (20)

Dotnetfest forget about http
Dotnetfest   forget about httpDotnetfest   forget about http
Dotnetfest forget about http
 
Getting out of the monolith hell
Getting out of the monolith hellGetting out of the monolith hell
Getting out of the monolith hell
 
The Good, The Bad, and The Avro (Graham Stirling, Saxo Bank and David Navalho...
The Good, The Bad, and The Avro (Graham Stirling, Saxo Bank and David Navalho...The Good, The Bad, and The Avro (Graham Stirling, Saxo Bank and David Navalho...
The Good, The Bad, and The Avro (Graham Stirling, Saxo Bank and David Navalho...
 
Microservices - opportunities, dilemmas and problems
Microservices - opportunities, dilemmas and problemsMicroservices - opportunities, dilemmas and problems
Microservices - opportunities, dilemmas and problems
 
Db trends final
Db trends   finalDb trends   final
Db trends final
 
Serverless Architecture
Serverless ArchitectureServerless Architecture
Serverless Architecture
 
L20 Scalability
L20 ScalabilityL20 Scalability
L20 Scalability
 
Fast Online Access to Massive Offline Data - SECR 2016
Fast Online Access to Massive Offline Data - SECR 2016Fast Online Access to Massive Offline Data - SECR 2016
Fast Online Access to Massive Offline Data - SECR 2016
 
Patterns and Pains of Migrating Legacy Applications to Kubernetes
Patterns and Pains of Migrating Legacy Applications to KubernetesPatterns and Pains of Migrating Legacy Applications to Kubernetes
Patterns and Pains of Migrating Legacy Applications to Kubernetes
 
Patterns and Pains of Migrating Legacy Applications to Kubernetes
Patterns and Pains of Migrating Legacy Applications to KubernetesPatterns and Pains of Migrating Legacy Applications to Kubernetes
Patterns and Pains of Migrating Legacy Applications to Kubernetes
 
Scylla Summit 2016: Using ScyllaDB for a Microservice-based Pipeline in Go
Scylla Summit 2016: Using ScyllaDB for a Microservice-based Pipeline in GoScylla Summit 2016: Using ScyllaDB for a Microservice-based Pipeline in Go
Scylla Summit 2016: Using ScyllaDB for a Microservice-based Pipeline in Go
 
Cloud-Native Patterns and the Benefits of MySQL as a Platform Managed Service
Cloud-Native Patterns and the Benefits of MySQL as a Platform Managed ServiceCloud-Native Patterns and the Benefits of MySQL as a Platform Managed Service
Cloud-Native Patterns and the Benefits of MySQL as a Platform Managed Service
 
Are you ready for Microservices
Are you ready for MicroservicesAre you ready for Microservices
Are you ready for Microservices
 
Iot cloud service v2.0
Iot cloud service v2.0Iot cloud service v2.0
Iot cloud service v2.0
 
Service Mesh CTO Forum (Draft 3)
Service Mesh CTO Forum (Draft 3)Service Mesh CTO Forum (Draft 3)
Service Mesh CTO Forum (Draft 3)
 
Modern software architectures - PHP UK Conference 2015
Modern software architectures - PHP UK Conference 2015Modern software architectures - PHP UK Conference 2015
Modern software architectures - PHP UK Conference 2015
 
Simple Solutions for Complex Problems
Simple Solutions for Complex ProblemsSimple Solutions for Complex Problems
Simple Solutions for Complex Problems
 
Simple Solutions for Complex Problems
Simple Solutions for Complex Problems Simple Solutions for Complex Problems
Simple Solutions for Complex Problems
 
NServiceBus - introduction to a message based distributed architecture
NServiceBus - introduction to a message based distributed architectureNServiceBus - introduction to a message based distributed architecture
NServiceBus - introduction to a message based distributed architecture
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera ClusterWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera Cluster
 

Último

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 

Último (20)

WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 

Devit - forget about http requests