O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.
Serverless Meetup Boston, May 23, 2019
Marius Bogoevici
Principal Specialist Solution Architect
mariusb@redhat.com
twitter...
Marius Bogoevici
● Principal Specialist Solutions Architect at Red Hat
○ Specialize in Integration/Messaging/Data Streamin...
WHY MICROSERVICES?
WHY SERVERLESS?
Monolith Microservices
Operational efficiency Fast value delivery
INSERT DESIGNATOR, IF NEEDED4
Still, why fast value delivery?
Fast value delivery
New features
Experimentation
Increased
c...
Unfortunately, we cannot predict the future. As an
organization, we must be able to observe and experiment
in our environm...
On the other hand we must be mindful of our resources;
We want to eliminate waste, reduce time to
experiment, and make it ...
We cannot build complex systems from complex parts.
We must keep our components as simple and
understandable as possible.
As hardware evolves, we have more options
Request-reply vs. event-driven
Synchronous & ephemeral
Low composability
Simplified model
Low tolerance to failure
Best pra...
What is an event?
● Action or occurrence, something that happened in the past
○ ‘Order created’, ‘user logged in’, ‘
● Eve...
Designing systems with events
● EDA: event-centric approach in system design
○ Treating events as part of your domain mode...
Event-driven microservices
Applications
Messaging
Middleware
12
RETHINKING EVENT-DRIVEN ARCHITECTURE
EventsMicroservices
Lines of
Business
Apps
Regions
System and data-centric
Events are...
Microservices in containers:
Increasing agility, isolation, utilization
14
● Use a platform that makes running apps reliable, transparent and
boring
● In-built resource management
○ Memory, CPU, di...
Event-driven microservices in the cloud native age:
Elastic computing and utility messaging
16
Some challenges with microservices ...
● Utilization
○ Idling under low traffic
○ High resource consumption - memory, disk
...
Serverless model: event-based and elastic
Enriching microservice architecture with serverless
facilities
● Elastic execution and avoidance of idling (autoscale)
● U...
Architectural risks with serverless:
loss of domain perspective …
Architectural risks with serverless:
… point-to-point integrations and sprawl
Recap: event hubs in microservice arhitecture
Event-centric microservice arhitectures...
… can be easily adopted for serverless design
Microservices in Event-driven Architecture:
Pros and cons
Functions in Event-driven Architecture:
Pros and cons
Event-driven microservice use cases applied to serverless
Event Sourcing/CQRS
Event-driven microservice use cases applied to serverless
Streaming ETL, CDC
Event-driven microservice use cases applied to serverless
Load Balancing and High Scale Compute
Container-centric microservices and functions on
Kubernetes
Optimizing utilization outside of autoscaling
● Impedance mismatch between runtimes optimized for physical/virtual
environ...
Your technology radar
● Service Mesh (e.g. Istio):
○ Provide microservice interconnectivity
● Serverless platforms (e.g. K...
Conclusions
● Event-driven microservices are key for implementing highly
distributed, extensible architectures
● Serverles...
Próximos SlideShares
Carregando em…5
×

Event Driven Microservices in the Serverless Age

582 visualizações

Publicada em

Presentation given at Serverless Meetup Boston, May 23, 2019

Microservices, data streaming and serverless computing are trendy, and for good reason. They have evolved to provide economical solutions to modern problems, and have been enabled by technical innovations, such as cloud platforms, an increased demand for data, and experiment-driven business models.
However, simply following trends is not a recipe for success. To adopt new technologies and architectural patterns efficiently, developers and architects must understand the evolution of event-driven architecture, and, in particular, how it is redefined in the serverless age, by a combination of utility computing, data infrastructure and function-oriented programming, in the context of different serverless platforms such as AWS Lambda, Azure Functions or Knative.

Publicada em: Software
  • Seja o primeiro a comentar

Event Driven Microservices in the Serverless Age

  1. 1. Serverless Meetup Boston, May 23, 2019 Marius Bogoevici Principal Specialist Solution Architect mariusb@redhat.com twitter: mariusbogoevici 1 Event-driven Microservices in the Serverless Age
  2. 2. Marius Bogoevici ● Principal Specialist Solutions Architect at Red Hat ○ Specialize in Integration/Messaging/Data Streaming ● OSS contributor since 2008 ○ Spring Integration ○ JBoss ecosystem ○ Spring XD, Spring Integration Kafka ○ Former Spring Cloud Stream project lead ● Co-author “Spring Integration in Action”, Manning, 2012 2
  3. 3. WHY MICROSERVICES? WHY SERVERLESS? Monolith Microservices Operational efficiency Fast value delivery
  4. 4. INSERT DESIGNATOR, IF NEEDED4 Still, why fast value delivery? Fast value delivery New features Experimentation Increased confidence
  5. 5. Unfortunately, we cannot predict the future. As an organization, we must be able to observe and experiment in our environments and react accordingly. We need to be agile.
  6. 6. On the other hand we must be mindful of our resources; We want to eliminate waste, reduce time to experiment, and make it cheap so we can increase our returns.
  7. 7. We cannot build complex systems from complex parts. We must keep our components as simple and understandable as possible.
  8. 8. As hardware evolves, we have more options
  9. 9. Request-reply vs. event-driven Synchronous & ephemeral Low composability Simplified model Low tolerance to failure Best practices evolved as REST Asynchronous and persistent Decoupled Highly composable Complex model High tolerance to failure Best practices are still evolving 9
  10. 10. What is an event? ● Action or occurrence, something that happened in the past ○ ‘Order created’, ‘user logged in’, ‘ ● Event characteristics: ○ Immutable ○ Optionally persistent ○ Shareable ● Event types: [1] ○ Notification ○ State Transfer (Command) ○ Event-Sourcing/CQRS [1] https://martinfowler.com/articles/201701-event-driven.html 10
  11. 11. Designing systems with events ● EDA: event-centric approach in system design ○ Treating events as part of your domain model ○ Designing components as event handlers and emitters ● EDA is aligned with the goals of domain-driven design ○ Enforce isolation and decoupling between bounded contexts ○ Properly designed events can create an expressive ubiquitous language ● EDA creates highly observable and extensible systems ● Event storming: events-first design 11
  12. 12. Event-driven microservices Applications Messaging Middleware 12
  13. 13. RETHINKING EVENT-DRIVEN ARCHITECTURE EventsMicroservices Lines of Business Apps Regions System and data-centric Events are designed to respond to ad-hoc connectivity needs Event-centric Events are first class citizens that describe the interactions in the enterprise Events Events Events Microservices Apps LOBs Regions
  14. 14. Microservices in containers: Increasing agility, isolation, utilization 14
  15. 15. ● Use a platform that makes running apps reliable, transparent and boring ● In-built resource management ○ Memory, CPU, disk ● Elastic scaling ● Monitoring and failover ○ Health, logging, metrics ● Routing and load balancing ● Rolling upgrades and CI/CD ● Namespacing Orchestrating containers on cloud native platforms 15
  16. 16. Event-driven microservices in the cloud native age: Elastic computing and utility messaging 16
  17. 17. Some challenges with microservices ... ● Utilization ○ Idling under low traffic ○ High resource consumption - memory, disk ● Connectivity ○ Must know broker location ○ Integration with event sources ● Abstraction ○ Must know broker type ○ Dependence on data/payload formats ● Observability ● Security
  18. 18. Serverless model: event-based and elastic
  19. 19. Enriching microservice architecture with serverless facilities ● Elastic execution and avoidance of idling (autoscale) ● Utility data and messaging infrastructure ○ Provided via platform services ● Decoupling of business logic from messaging infrastructure
  20. 20. Architectural risks with serverless: loss of domain perspective …
  21. 21. Architectural risks with serverless: … point-to-point integrations and sprawl
  22. 22. Recap: event hubs in microservice arhitecture
  23. 23. Event-centric microservice arhitectures...
  24. 24. … can be easily adopted for serverless design
  25. 25. Microservices in Event-driven Architecture: Pros and cons
  26. 26. Functions in Event-driven Architecture: Pros and cons
  27. 27. Event-driven microservice use cases applied to serverless Event Sourcing/CQRS
  28. 28. Event-driven microservice use cases applied to serverless Streaming ETL, CDC
  29. 29. Event-driven microservice use cases applied to serverless Load Balancing and High Scale Compute
  30. 30. Container-centric microservices and functions on Kubernetes
  31. 31. Optimizing utilization outside of autoscaling ● Impedance mismatch between runtimes optimized for physical/virtual environments and containerization ○ Large footprint (low density) ○ Long startup times - latency ● Recommendations: ○ Favor technologies with small footprint and low latency, in particular for serverless ○ Favor technologies that allow for easy change of deployment model (independent deployment vs on-demand/serverless) while preserving investment in business logic
  32. 32. Your technology radar ● Service Mesh (e.g. Istio): ○ Provide microservice interconnectivity ● Serverless platforms (e.g. Knative) ○ Container build and on-demand scheduling ● Container-native frameworks (e.g. Quarkus) ○ Optimize Java workloads for containerized apps ● Strimzi - Kafka operator for Kubernetes/OpenShift ● EnMasse - Messaging-as-a-Service for Kubernetes/OpenShift ● FaaS frameworks (e.g. Camel-K) ○ Schedule integration code directly on platform or via Knative
  33. 33. Conclusions ● Event-driven microservices are key for implementing highly distributed, extensible architectures ● Serverless platforms are a natural fit for several event-driven microservice use cases ● Serverless architectures should complement event-based execution with event-centric design ● Always consider tradeoffs: ○ Serverless vs independent deployment (aka ‘traditional’ microservice) ○ Optimizied runtime vs technical investment (can you have both?)

×