Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Orchestration Patterns for Microservices with Messaging by RabbitMQ

11,517 views

Published on

Companies looking to speed up their software development are adopting microservices architectures (MSA). Building applications as groups of smaller components with fewer dependencies helps companies such as Comcast, Capital One, Uber, and Netflix deliver more frequent releases and thus innovate faster.

An important consideration in adopting an MSA is deciding how individual services should communicate between each other. Adding a message queue such as RabbitMQ to handle interservice messages can improve communication by:

- Simplifying our services so they only need to know how to talk to the messenger service.
- Abstracting communication by having the messenger service handle sophisticated orchestration patterns.
- Scaling message throughput by increasing the cluster size of the messenger service.

In this webinar we'll discuss:
- Requirements for communicating between microservices
- Typical messaging patterns in microservice architectures
- Use cases where RabbitMQ shines
- How to use the RabbitMQ service for Pivotal Cloud Foundry to deploy and run your applications

We’ll also demonstrate how to deploy RabbitMQ in Pivotal Cloud Foundry, and how to incorporate it in microservices-based applications.

Presenters: Greg Chase, Pivotal and Dan Baskette, Pivotal

Published in: Technology
  • I like this service ⇒ www.HelpWriting.net ⇐ from Academic Writers. I don't have enough time write it by myself.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Writing good research paper is quite easy and very difficult simultaneously. It depends on the individual skill set also. You can get help from research paper writing. Check out, please ⇒ www.HelpWriting.net ⇐
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Did you know you could take online ✤✤✤ https://t.cn/A6ybK3XL
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • MADE $30 ON MY FIRST DAY! Being a fresh graduate and having lots of free time, I stumbled upon your site when I was searching for work at home opportunities, good thing I did! Just on my first day of joining I already made $30! Now I'm averaging close to $80 a day just for filling out surveys! ➤➤ http://t.cn/AieXAuZz
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • is there a link to the demo's source code ? I'm very interested in checking it out
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Orchestration Patterns for Microservices with Messaging by RabbitMQ

  1. 1. Orchestration Patterns for Microservices with Messaging by RabbitMQ Greg Chase, Pivotal Software Dan Baskette, Pivotal Software
  2. 2. Agenda 2 1.  Communication Requirements for Microservices 2.  Use cases where RabbitMQ shines 3.  How to use RabbitMQ for Pivotal Cloud Foundry 4.  Demo
  3. 3. 3 Communication Requirements for Microservices
  4. 4. Why Systems are Evolving to Microservices Architectures Characteristics of a Microservices system: ●  Independent executable component ●  Does one thing well ●  Often Event & message driven ●  Fault tolerant ●  Evolutionary
  5. 5. Differentiating Requirements for Communicating Between Microservices ●  Timing: Synchronous, asynchronous, batched, delayed, offline ●  Interactions: Notification, acknowledged, request-response, workflow ●  Scale: 1000’s messages per second / 10,000’s / 100,000’s ●  Cardinality: 1 to 1 or 1 to many?
  6. 6. Great for request-response, but can break microservices style Synchronous Communication Starts Out Simple Benefits ●  Simple and familiar ●  Easy to test ●  Firewall friendly ●  Simpler architecture Drawbacks ●  Server must always send a response ●  Both sender and receiver must be available ●  Not scalable by itself Trip Management Passenger (mobile) POST/trips Get/passengers/<passengerID> REST Passenger Management 202 OK201 Created REST
  7. 7. More complex to setup but can simplify services, provide scale & resilience Asynchronous Communications Patterns Event Log / Topic Firehose Message queues Two common patterns for handling messaging in MSA: Producer Hadoop Apps DBs
  8. 8. 8 Patterns for RabbitMQ
  9. 9. Open source message broker for communication between decoupled applications What is RabbitMQ? Asychronous Messaging ●  Multiple protocols ●  Queues ●  Exchanges Developer Experience ●  Containers ●  Configuration management ●  Cross-language ●  All major languages Distributed Deployment ●  Highly available ●  High scale ●  Multi-zone Enterprise & Cloud Ready ●  Authentication ●  Encryption ●  Cloud-friendly Tools & Plugins ●  Continuous integration ●  Metrics ●  Enterprise integration Management & Monitoring ●  HTTP-API ●  Command line ●  UI tool
  10. 10. Exchanges route messages to queues to await delivery RabbitMQ Concepts P C Exch C Producer Exchange: ●  Fanout ●  Direct ●  Topic ●  Header “Foo.bar” Binding “*.bar” “Foo.#” Queues Consumers “Meta” match “value”
  11. 11. Easy, flexible messaging supporting many message types and routes Example Patterns for RabbitMQ and Use Cases Work queues C C General Pub/Sub C C P Exch Routing C C P Exch “*.bar” “Foo.#” “Meta” match “value”
  12. 12. 1 How to use RabbitMQ for Pivotal Cloud Foundry
  13. 13. Provide RabbitMQ as a service for your developers RabbitMQ for Pivotal Cloud Foundry ●  Two kinds of deployments ○  Pre-provisioned HA multitenant RabbitMQ cluster ○  Dedicated single node RabbitMQ instances ●  Developers gain self-service access to dedicated or vhost ●  Monitoring available via RabbitMQ tools ●  RabbitMQ for PCF metrics exposed to PCF Firehouse ●  Automate deployment, management and monitoring of RabbitMQ
  14. 14. HA RabbitMQ multi tenant cluster or dedicated single nodes Deploy Two Types for RabbitMQ Services in PCF ●  Pre-provision RabbitMQ as highly available cluster ●  Utilize RabbitMQ HAProxies for load balancing ●  Deploy to multiple availability zones ●  Simple provisioning through CF CLI ●  On demand provisioning of dedicated RabbitMQ single nodes ●  Select maximum service instances to control consumption of IaaS resources ●  Developers have direct access to RabbitMQ instances App Elastic Runtime
  15. 15. Message Brokers in Microservices Architecture
  16. 16. An opinionated packaging of RabbitMQ for Cloud Native development Targeted Use Cases for RabbitMQ for PCF Inter application messaging Backing service for: Spring Cloud Services Spring Cloud Data Flow
  17. 17. Quarterly release cadence Future enhancements of RabbitMQ for PCF Based on RabbitMQ 3.6.x Multitenant clusters Dedicated single node 1.8 1.9 1.10 1.11 Based on RabbitMQ 3.7.x Dedicated cluster Ongoing improvements to developer experience and operator automation This timeline reflects current forecast of product enhancements and may change without notice. These are not to be construed as committed dates or versions for delivery.
  18. 18. 1 FunCollector Demo
  19. 19. FunCollector - Demo App ●  Spring Boot microservices based ●  Cloud Native and Deployed on Pivotal Cloud Foundry ●  Services ‒  RabbitMQ for Publish/Subscribe messaging between components ‒  Pivotal Google Compute Service Broker - Machine Learning API ‒  PostgreSQL Storage ●  Each component is independently scalable ●  Built to address my “Vice”
  20. 20. Web UI Web UI Web UI ImageRecog Vision APIImageRecog Vision APIImageRecog Vision API PopIdentifier PopIdentifier PopIdentifier Photo Accepted and Published to VisionReady Queue as Object with Bytestream Photo is consumed from queue and forwarded to Google Vision API for Text Recognition Object is Enhanced with Metadata and Published to VisionResults Queue Metadata is consumed from queue and evaluated. Then it’s compared vs. Master List and item is Identified Photo is taken by user and uploaded TheCollector Identified item is published to Identified Queue Queue is consumed and Database Updated FunCollector
  21. 21. Agenda 2 1.  Communication Requirements for Microservices 2.  Use cases where RabbitMQ shines 3.  How to use RabbitMQ for Pivotal Cloud Foundry 4.  Demo

×