Evolution of integration and
microservice patterns
with service mesh
@christianposta
Christian Posta
Chief Architect, cloud application development
Twitter: @christianposta
Blog: http://blog.christianposta.com
Email: christian@redhat.com
Slides: http://slideshare.net/ceposta
• Author “Microservices for Java developers”
and “Introducing Istio Service Mesh”
• Committer/contributor lots of open-source projects
• Blogger, speaker, mentor, leader
@christianposta
Innovation is admitting we don’t
have all the answers
Mark Schwartz – Former CIO USCIS
@christianposta
Traditional user story “requirements”
• As A…. <role>
• I Want… <goal/desire>
• So That… <receive benefit>
https://barryoreilly.com/2013/10/21/how-to-implement-hypothesis-driven-development/
@christianposta
Scientific method anyone?
• Make observations
• Formulate hypothesis
• Design an experiment
• State the indicators you will evaluate
• Conduct the experiment
• Evaluate results
• Accept or reject hypothesis
• Make new hypothesis and continue…
@christianposta
Asking questions instead of requirements
https://barryoreilly.com/2013/10/21/how-to-implement-hypothesis-driven-development/
@christianposta
https://puppet.com/resources/whitepaper/state-of-devops-report
@christianposta
Application safety and correctness in a
distributed system is the responsibility of
the application.
@christianposta
The end-to-end principle:
http://web.mit.edu/Saltzer/www/publications/endtoend/endtoend.pdf
The function in question can completely and correctly be implemented only with the
knowledge and help of the application standing at the end points of the communication system.
Therefore, providing that questioned function as a feature of the communication system
itself is not possible. (Sometimes an incomplete version of the function provided by the
communication system may be useful as a performance enhancement.)
@christianposta
TCP adds reliable communication
@christianposta
As we move to services architectures,
we push the complexity to the space
between our services.
@christianposta
@christianposta
@christianposta
@christianposta
@christianposta
• Orchestrate calls across multiple microservices
• Aggregate, combine, transform, split, on “messages”
• Deal with atomicity / consistency issues
• Message idempotency / message de-dupe
• DDD anti-corruption layers / adapters / transformation
• Tie in with existing “backend systems”
• Dynamic, responsive, programmable routing
Application communication (app specific)
@christianposta
• Service discovery
• Retries
• Timeouts
• Load balancing
• Rate limiting
• Thread bulk heading
• Circuit breaking
@christianposta
Application networking (reliability)
Application networking (controlled deployment)
• Edge/DMZ routing
• Surgical / fine / per-request routing
• A/B rollout
• Traffic shaping
• Internal releases / dark launches
• Request shadowing
• Fault injection
@christianposta
• adaptive, zone-aware
• Deadlines
• Health checking
• Stats, metric, collection
• Logging
• Distributed tracing
• Security
@christianposta
Application networking (observability)
• Netflix Hystrix (circuit breaking / bulk heading)
• Netflix Zuul (edge router)
• Netflix Ribbon (client-side service discovery / load balance)
• Netflix Eureka (service discovery registry)
• Brave / Zipkin (tracing)
• Netflix spectator / atlas (metrics)
“Microservices” patterns
@christianposta
http://bit.ly/application-networking@christianposta
But I’m using Spring!
• spring-cloud-netflix-hystrix
• spring-cloud-netflix-zuul
• spring-cloud-netflix-eureka-client
• spring-cloud-netflix-ribbon
• spring-cloud-netflix-atlas
• spring-cloud-netflix-spectator
• spring-cloud-netflix-hystrix-stream
• …..
• ......
• @Enable....150differentThings
But I’m using Vert.x!
• vertx-circuit-breaker
• vertx-service-discovery
• vertx-dropwizard-metrics
• vertx-zipkin?
• …..
• ......
@christianposta
Screw Java - I’m using NodeJS!
JavaScript is for rookies, I use Go!
But python is so pretty!
I prefer unreadability… Perl for me!
@christianposta
• Require specific language to bring in new services
• A single language doesn’t fit for all use cases
• How do you patch/upgrade/manage lifecycle?
• Need strict control over application library choices
• Inconsistent implementations
• Incorrect implementations
Some drawbacks to this approach?
@christianposta
In practice, operability of our services
becomes a top priority very fast
@christianposta
Meet Envoy Proxy
http://envoyproxy.io
Envoy is…
• service proxy
• written in C++, highly parallel, non-blocking
• L3/4 network filter
• out of the box L7 filters
• HTTP 2, including gRPC
• baked in service discovery/health checking
• advanced load balancing
• stats, metrics, tracing
• dynamic configuration through xDS
Envoy implements
• zone aware, least request load balancing
• circuit breaking
• outlier detection
• retries, retry policies
• timeout (including budgets)
• traffic shadowing
• rate limiting
• access logging, statistics collection
• Many other features!
@christianposta
Meet Istio.io
http://istio.io
A control plane for service proxies
As a service-instance proxy
@christianposta
A service mesh is decentralized application-
networking infrastructure between your services
that provides resiliency, security, observability,
and routing control.
A service mesh is comprised of a data plane
and control plane.
@christianposta
Time for definitions:
What higher-order clusters semantics
does Istio enable?
• Request-level control
• Graduated deployment and release
• Service observability
• Cluster reliability
• Chaos testing
• Policy enforcement
Resilience with timeouts, retries, budgets,
circuit breakers, service discovery, etc
@christianposta
Zone aware, sophisticated
client-side load balancing
@christianposta
Fine-grained traffic control and routing
@christianposta
http://bit.ly/application-networking
Traffic shadowing
@christianposta
Secure transport with mTLS
@christianposta
Metrics, logs, distributed tracing out of the box
http://bit.ly/application-networking
Demo!
http://bit.ly/istio-tutorial
Thanks!
BTW: Hand drawn diagrams made with Paper by FiftyThree.com 
Twitter: @christianposta
Blog: http://blog.christianposta.com
Email: christian@redhat.com
Slides: http://slideshare.net/cepostaFollow up links:
• http://launch.openshift.io
• http://istio.io
• http://envoyproxy.io
• http://developers.redhat.com/blog
• http://blog.christianposta.com/istio-workshop/slides/
• http://blog.openshift.com
• https://www.redhat.com/en/open-innovation-labs

Evolution of integration and microservices patterns with service mesh

  • 1.
    Evolution of integrationand microservice patterns with service mesh @christianposta
  • 2.
    Christian Posta Chief Architect,cloud application development Twitter: @christianposta Blog: http://blog.christianposta.com Email: christian@redhat.com Slides: http://slideshare.net/ceposta • Author “Microservices for Java developers” and “Introducing Istio Service Mesh” • Committer/contributor lots of open-source projects • Blogger, speaker, mentor, leader
  • 4.
    @christianposta Innovation is admittingwe don’t have all the answers Mark Schwartz – Former CIO USCIS
  • 5.
    @christianposta Traditional user story“requirements” • As A…. <role> • I Want… <goal/desire> • So That… <receive benefit> https://barryoreilly.com/2013/10/21/how-to-implement-hypothesis-driven-development/
  • 6.
    @christianposta Scientific method anyone? •Make observations • Formulate hypothesis • Design an experiment • State the indicators you will evaluate • Conduct the experiment • Evaluate results • Accept or reject hypothesis • Make new hypothesis and continue…
  • 7.
    @christianposta Asking questions insteadof requirements https://barryoreilly.com/2013/10/21/how-to-implement-hypothesis-driven-development/
  • 8.
  • 9.
    @christianposta Application safety andcorrectness in a distributed system is the responsibility of the application.
  • 10.
    @christianposta The end-to-end principle: http://web.mit.edu/Saltzer/www/publications/endtoend/endtoend.pdf Thefunction in question can completely and correctly be implemented only with the knowledge and help of the application standing at the end points of the communication system. Therefore, providing that questioned function as a feature of the communication system itself is not possible. (Sometimes an incomplete version of the function provided by the communication system may be useful as a performance enhancement.)
  • 11.
  • 12.
    TCP adds reliablecommunication @christianposta
  • 13.
    As we moveto services architectures, we push the complexity to the space between our services. @christianposta
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
    • Orchestrate callsacross multiple microservices • Aggregate, combine, transform, split, on “messages” • Deal with atomicity / consistency issues • Message idempotency / message de-dupe • DDD anti-corruption layers / adapters / transformation • Tie in with existing “backend systems” • Dynamic, responsive, programmable routing Application communication (app specific) @christianposta
  • 19.
    • Service discovery •Retries • Timeouts • Load balancing • Rate limiting • Thread bulk heading • Circuit breaking @christianposta Application networking (reliability)
  • 20.
    Application networking (controlleddeployment) • Edge/DMZ routing • Surgical / fine / per-request routing • A/B rollout • Traffic shaping • Internal releases / dark launches • Request shadowing • Fault injection @christianposta
  • 21.
    • adaptive, zone-aware •Deadlines • Health checking • Stats, metric, collection • Logging • Distributed tracing • Security @christianposta Application networking (observability)
  • 24.
    • Netflix Hystrix(circuit breaking / bulk heading) • Netflix Zuul (edge router) • Netflix Ribbon (client-side service discovery / load balance) • Netflix Eureka (service discovery registry) • Brave / Zipkin (tracing) • Netflix spectator / atlas (metrics) “Microservices” patterns @christianposta
  • 25.
  • 26.
    But I’m usingSpring! • spring-cloud-netflix-hystrix • spring-cloud-netflix-zuul • spring-cloud-netflix-eureka-client • spring-cloud-netflix-ribbon • spring-cloud-netflix-atlas • spring-cloud-netflix-spectator • spring-cloud-netflix-hystrix-stream • ….. • ...... • @Enable....150differentThings
  • 27.
    But I’m usingVert.x! • vertx-circuit-breaker • vertx-service-discovery • vertx-dropwizard-metrics • vertx-zipkin? • ….. • ...... @christianposta
  • 28.
    Screw Java -I’m using NodeJS! JavaScript is for rookies, I use Go! But python is so pretty! I prefer unreadability… Perl for me! @christianposta
  • 29.
    • Require specificlanguage to bring in new services • A single language doesn’t fit for all use cases • How do you patch/upgrade/manage lifecycle? • Need strict control over application library choices • Inconsistent implementations • Incorrect implementations Some drawbacks to this approach? @christianposta
  • 30.
    In practice, operabilityof our services becomes a top priority very fast @christianposta
  • 32.
  • 33.
    Envoy is… • serviceproxy • written in C++, highly parallel, non-blocking • L3/4 network filter • out of the box L7 filters • HTTP 2, including gRPC • baked in service discovery/health checking • advanced load balancing • stats, metrics, tracing • dynamic configuration through xDS
  • 34.
    Envoy implements • zoneaware, least request load balancing • circuit breaking • outlier detection • retries, retry policies • timeout (including budgets) • traffic shadowing • rate limiting • access logging, statistics collection • Many other features!
  • 35.
  • 36.
    Meet Istio.io http://istio.io A controlplane for service proxies
  • 38.
    As a service-instanceproxy @christianposta
  • 39.
    A service meshis decentralized application- networking infrastructure between your services that provides resiliency, security, observability, and routing control. A service mesh is comprised of a data plane and control plane. @christianposta Time for definitions:
  • 42.
    What higher-order clusterssemantics does Istio enable? • Request-level control • Graduated deployment and release • Service observability • Cluster reliability • Chaos testing • Policy enforcement
  • 43.
    Resilience with timeouts,retries, budgets, circuit breakers, service discovery, etc @christianposta
  • 44.
    Zone aware, sophisticated client-sideload balancing @christianposta
  • 45.
    Fine-grained traffic controland routing @christianposta
  • 46.
  • 47.
    Secure transport withmTLS @christianposta
  • 48.
    Metrics, logs, distributedtracing out of the box http://bit.ly/application-networking
  • 50.
  • 51.
    Thanks! BTW: Hand drawndiagrams made with Paper by FiftyThree.com  Twitter: @christianposta Blog: http://blog.christianposta.com Email: christian@redhat.com Slides: http://slideshare.net/cepostaFollow up links: • http://launch.openshift.io • http://istio.io • http://envoyproxy.io • http://developers.redhat.com/blog • http://blog.christianposta.com/istio-workshop/slides/ • http://blog.openshift.com • https://www.redhat.com/en/open-innovation-labs

Editor's Notes

  • #4 How many people are embarking on projects to drive innovation in their organizations? How many people think those projects will succeed? How many people can predict the future? How many people believe their organization’s executives can predict the future?
  • #5 Inherently unknown….
  • #10 …… new challenge….. Let’s come back to that…..
  • #11 …… new challenge….. Let’s come back to that…..
  • #12 One large database! We should focus on how we design our data models so that they can be sharded and distributed…. Focus on transactions, etc not 2PC
  • #13 One large database! We should focus on how we design our data models so that they can be sharded and distributed…. Focus on transactions, etc not 2PC
  • #15 One large database! We should focus on how we design our data models so that they can be sharded and distributed…. Focus on transactions, etc not 2PC
  • #16 One large database! We should focus on how we design our data models so that they can be sharded and distributed…. Focus on transactions, etc not 2PC
  • #17 One large database! We should focus on how we design our data models so that they can be sharded and distributed…. Focus on transactions, etc not 2PC
  • #18 One large database! We should focus on how we design our data models so that they can be sharded and distributed…. Focus on transactions, etc not 2PC
  • #19 Apache Camel can enable legacy backends to participate in a REST-based set of services by quickly exposing a REST service interface using its expressive DSL.. The DSL plugins right into the rest of the Apache Camel DSL allowing you to quickly expose a REST endpoint that can describe an API as well as integrate with backend services by mediating, routing, transforming and otherwise changing the shape of data or even content of a payload with enricher, resequence, and recipient list patterns.
  • #20 This concept of defining language, developing models to describe a domain, implementing those models, enforcing assertions, etc all happen within a certain context, and that context is vitally important in software. In common language, we are smart enough to resolve these types of language conflicts within a sentence because of its context. The computer doesn’t have this context. We have to make it explicit. And any context needs to have explicit boundaries. This model needs to be “useful” ie, it should be able to be implemented. Try to establish a model that’s both useful for discussion with the domain experts and is implementable. There are infinite ways to model/think about something. Balance both masters with the model you choose. Large complex domains may need multiple models. And really the only way to understand a language and model is within a certain context. That context should have boundaries so it doesn’t bleed or force others to bleed definitions and semantics. Bounded context: within this space, this is the context of the language. This is what it means and it’s not ambiguous. Central thing about a model is the language you create to express the prblem and solution very crisply. Need clear language and need boundaries. Anti corruption layers are translations between the different models that may exist in multiple bounded contexts. They keep an internal model consistent and pure without bleeding across the boundaries. Bounded contexts tend to be “self contained systems” themselves with a complete vertical stack of the software including UI, business logic, data models, and database. They tend to not share databases across multiple models.
  • #21 This concept of defining language, developing models to describe a domain, implementing those models, enforcing assertions, etc all happen within a certain context, and that context is vitally important in software. In common language, we are smart enough to resolve these types of language conflicts within a sentence because of its context. The computer doesn’t have this context. We have to make it explicit. And any context needs to have explicit boundaries. This model needs to be “useful” ie, it should be able to be implemented. Try to establish a model that’s both useful for discussion with the domain experts and is implementable. There are infinite ways to model/think about something. Balance both masters with the model you choose. Large complex domains may need multiple models. And really the only way to understand a language and model is within a certain context. That context should have boundaries so it doesn’t bleed or force others to bleed definitions and semantics. Bounded context: within this space, this is the context of the language. This is what it means and it’s not ambiguous. Central thing about a model is the language you create to express the prblem and solution very crisply. Need clear language and need boundaries. Anti corruption layers are translations between the different models that may exist in multiple bounded contexts. They keep an internal model consistent and pure without bleeding across the boundaries. Bounded contexts tend to be “self contained systems” themselves with a complete vertical stack of the software including UI, business logic, data models, and database. They tend to not share databases across multiple models.
  • #22 This concept of defining language, developing models to describe a domain, implementing those models, enforcing assertions, etc all happen within a certain context, and that context is vitally important in software. In common language, we are smart enough to resolve these types of language conflicts within a sentence because of its context. The computer doesn’t have this context. We have to make it explicit. And any context needs to have explicit boundaries. This model needs to be “useful” ie, it should be able to be implemented. Try to establish a model that’s both useful for discussion with the domain experts and is implementable. There are infinite ways to model/think about something. Balance both masters with the model you choose. Large complex domains may need multiple models. And really the only way to understand a language and model is within a certain context. That context should have boundaries so it doesn’t bleed or force others to bleed definitions and semantics. Bounded context: within this space, this is the context of the language. This is what it means and it’s not ambiguous. Central thing about a model is the language you create to express the prblem and solution very crisply. Need clear language and need boundaries. Anti corruption layers are translations between the different models that may exist in multiple bounded contexts. They keep an internal model consistent and pure without bleeding across the boundaries. Bounded contexts tend to be “self contained systems” themselves with a complete vertical stack of the software including UI, business logic, data models, and database. They tend to not share databases across multiple models.
  • #27 This concept of defining language, developing models to describe a domain, implementing those models, enforcing assertions, etc all happen within a certain context, and that context is vitally important in software. In common language, we are smart enough to resolve these types of language conflicts within a sentence because of its context. The computer doesn’t have this context. We have to make it explicit. And any context needs to have explicit boundaries. This model needs to be “useful” ie, it should be able to be implemented. Try to establish a model that’s both useful for discussion with the domain experts and is implementable. There are infinite ways to model/think about something. Balance both masters with the model you choose. Large complex domains may need multiple models. And really the only way to understand a language and model is within a certain context. That context should have boundaries so it doesn’t bleed or force others to bleed definitions and semantics. Bounded context: within this space, this is the context of the language. This is what it means and it’s not ambiguous. Central thing about a model is the language you create to express the prblem and solution very crisply. Need clear language and need boundaries. Anti corruption layers are translations between the different models that may exist in multiple bounded contexts. They keep an internal model consistent and pure without bleeding across the boundaries. Bounded contexts tend to be “self contained systems” themselves with a complete vertical stack of the software including UI, business logic, data models, and database. They tend to not share databases across multiple models.
  • #28 This concept of defining language, developing models to describe a domain, implementing those models, enforcing assertions, etc all happen within a certain context, and that context is vitally important in software. In common language, we are smart enough to resolve these types of language conflicts within a sentence because of its context. The computer doesn’t have this context. We have to make it explicit. And any context needs to have explicit boundaries. This model needs to be “useful” ie, it should be able to be implemented. Try to establish a model that’s both useful for discussion with the domain experts and is implementable. There are infinite ways to model/think about something. Balance both masters with the model you choose. Large complex domains may need multiple models. And really the only way to understand a language and model is within a certain context. That context should have boundaries so it doesn’t bleed or force others to bleed definitions and semantics. Bounded context: within this space, this is the context of the language. This is what it means and it’s not ambiguous. Central thing about a model is the language you create to express the prblem and solution very crisply. Need clear language and need boundaries. Anti corruption layers are translations between the different models that may exist in multiple bounded contexts. They keep an internal model consistent and pure without bleeding across the boundaries. Bounded contexts tend to be “self contained systems” themselves with a complete vertical stack of the software including UI, business logic, data models, and database. They tend to not share databases across multiple models.
  • #29 Get back to first principles. Focus on principles, patterns, methodologies. Tools will help, but you cannot start with tools.
  • #32 One large database! We should focus on how we design our data models so that they can be sharded and distributed…. Focus on transactions, etc not 2PC
  • #33 Get back to first principles. Focus on principles, patterns, methodologies. Tools will help, but you cannot start with tools.
  • #34 Get back to first principles. Focus on principles, patterns, methodologies. Tools will help, but you cannot start with tools.
  • #35 Get back to first principles. Focus on principles, patterns, methodologies. Tools will help, but you cannot start with tools.
  • #36 Get back to first principles. Focus on principles, patterns, methodologies. Tools will help, but you cannot start with tools.
  • #37 Get back to first principles. Focus on principles, patterns, methodologies. Tools will help, but you cannot start with tools.
  • #38 Get back to first principles. Focus on principles, patterns, methodologies. Tools will help, but you cannot start with tools.
  • #39 Get back to first principles. Focus on principles, patterns, methodologies. Tools will help, but you cannot start with tools.
  • #40 Get back to first principles. Focus on principles, patterns, methodologies. Tools will help, but you cannot start with tools.
  • #43 Get back to first principles. Focus on principles, patterns, methodologies. Tools will help, but you cannot start with tools.
  • #51 Get back to first principles. Focus on principles, patterns, methodologies. Tools will help, but you cannot start with tools.