Hybrid Messaging Solutions OpenStack Summit Boston 2017 About - - PowerPoint PPT Presentation

hybrid messaging solutions
SMART_READER_LITE
LIVE PREVIEW

Hybrid Messaging Solutions OpenStack Summit Boston 2017 About - - PowerPoint PPT Presentation

Hybrid Messaging Solutions OpenStack Summit Boston 2017 About Us... Ken Giusti (kgiusti@gmail.com) irc: kgiusti Apache Qpid Project Oslo.Messaging Developer Software Engineer at Red Hat Mark Wagner (mwagner@redhat.com)


slide-1
SLIDE 1

Hybrid Messaging Solutions

OpenStack Summit Boston 2017

slide-2
SLIDE 2

About Us...

Ken Giusti (kgiusti@gmail.com) irc: kgiusti

  • Apache Qpid Project
  • Oslo.Messaging Developer
  • Software Engineer at Red Hat

Mark Wagner (mwagner@redhat.com)

  • Performance and Scale Engineering
  • Performance Engineer at Red Hat
slide-3
SLIDE 3

Agenda

  • Oslo.messaging (RPC and Notification Service Patterns)
  • Backend Scenarios (Hybrid Messaging)
  • The Drivers
  • Testing Methodology and Results
  • Next Steps...
slide-4
SLIDE 4

Oslo.Messaging

slide-5
SLIDE 5

Oslo.Messaging

  • Part of the OpenStack Oslo project that provides intra-service messaging

○ Remote Procedure Calls (RPC) & Notifications

  • Abstraction that hides the details of the underlying messaging technology from the OpenStack

Services

  • slo.messaging

Messaging Bus

  • slo.messaging
  • slo.messaging
  • slo.messaging
  • slo.messaging
  • slo.messaging
slide-6
SLIDE 6

Oslo.Messaging Services

Notifications

  • Asynchronous exchange from Notifier to Listener
  • Listener need not be present when notification is sent
  • Temporally decoupled
  • Requires store-and-forward capability (e.g. queue or store)

Remote Procedure Call (RPC)

  • Synchronous exchange between client and server
  • Temporally bracketed
  • If Server not present, call should fail

Messaging System

Caller Application Server Application

slide-7
SLIDE 7

Notification - Broker Backed Messaging

Topic Queue

OpenStack Service

Notify Client

  • slo.messaging
  • slo.messaging
  • Notification API provides the ability to publish an event to a known topic
  • Notification Listener(s) fetch the event when ready to consume
  • Unidirectional and asynchronous - no traffic flows back to the notifier
  • Queue store-and-forward capability is necessary for notify messaging pattern

Notify

Listener

OpenStack Service

Notify

Listener

OpenStack Service

. . .

slide-8
SLIDE 8

RPC - Broker Backed Messaging

Request Queue Reply Queue

OpenStack Service

RPC Client RPC

Server

OpenStack Service

  • slo.messaging
  • slo.messaging
  • RPC transaction takes place across 4 discrete message ownership transfers

○ Requires two queues with associated resource overhead

  • Detachment of client and server

○ Messages are acknowledged but not guaranteed to be delivered

  • Clients do not readily know when a server is “unavailable”
slide-9
SLIDE 9

RPC - Direct Messaging

OpenStack Service

RPC Client RPC

Server

OpenStack Service

  • slo.messaging
  • slo.messaging
  • End-to-end transfer of message ownership

○ No store-and-forward message queueing (stateless intermediaries)

  • Logical link between clients and server
  • Clients can immediately know when a server is “unavailable”
slide-10
SLIDE 10

Oslo.Messaging

RPC Service Notification Service Shared Messaging Stuff Transport (driver) API API Message Bus

slide-11
SLIDE 11

Oslo.Messaging

RPC Service Notification Service Shared Messaging Stuff RPC Transport API API Message Bus Notification Transport Message Bus

slide-12
SLIDE 12

Oslo.Messaging

RPC Service Notification Service Shared Messaging Stuff RPC Transport API API Message Bus Notification Transport Message Bus get_notification_transport(URL) get_transport(URL) get_rpc_transport(URL) [TBD]

slide-13
SLIDE 13

Service Configuration (e.g. nova.conf, etc.)

[DEFAULT] transport_url=rabbit://rpc_user:rpc_pw@rpc_host:rpc_port ... [oslo_messaging_notifications] transport_url=rabbit://notify_user:notify_pw@notify_host:notify_port

slide-14
SLIDE 14

Single Backend

OpenStack Service

  • slo.messaging

OpenStack Service

  • slo.messaging

OpenStack Service

  • slo.messaging

OpenStack Service

  • slo.messaging

RPC Notify RPC Notify RPC Notify RPC Notify

Broker Cluster

slide-15
SLIDE 15

Dual Backend

OpenStack Service

  • slo.messaging

OpenStack Service

  • slo.messaging

OpenStack Service

  • slo.messaging

OpenStack Service

  • slo.messaging

RPC Notify RPC Notify RPC Notify RPC Notify

Broker Cluster Broker Cluster

slide-16
SLIDE 16

“Hybrid” Backend

OpenStack Service

  • slo.messaging

OpenStack Service

  • slo.messaging

OpenStack Service

  • slo.messaging

OpenStack Service

  • slo.messaging

RPC Notify RPC Notify RPC Notify RPC Notify

Direct Messaging Broker Cluster

slide-17
SLIDE 17

Benefits of Hybrid Messaging

  • Optimal alignment of messaging patterns to messaging backend

○ Peer-to-peer messaging for RPC services (direct) ■ “Fail fast - fail clean” ○ Store-and-Forward for Notification services (queueing) ■ Mirroring and message persistence ○ Increase scale - Increase performance

  • Diverse Topologies & Alternative Messaging Technology

○ Centralized brokers (hub-n-spoke) ○ Distributed architectures ○ Messaging as a Service

slide-18
SLIDE 18

Alternative Oslo Messaging Transports

  • ZeroMQ Socket Library
  • AMQP 1.0 Protocol Transport + Qpid Dispatch Router
  • Apache Kafka (experimental)

○ Notifications only (no RPC support)

slide-19
SLIDE 19

ZeroMQ Transport

  • Dedicated TCP connection between client and server
  • Matchmaker (Redis) - maps topics ←→ host addresses
  • TCP concentrator to limit TCP resource consumption
  • Deployer’s guide: https://docs.openstack.org/developer/oslo.messaging/zmq_driver.html

Server A Server B Client Client Client Client Server A Server B Client Client Client Client Proxy

slide-20
SLIDE 20

AMQP 1.0 + Message Router

  • Network of “message routers”
  • Routers learn location of servers - optimal shortest path
  • Stateless (no queueing) - end to end transfers
  • Barcelona: https://www.youtube.com/watch?v=R0fwHr8XC1I
  • Deployer’s guide: https://docs.openstack.org/developer/oslo.messaging/AMQP1.0.html

Server A Server B Client Client Client Client Server C Client

slide-21
SLIDE 21

Oslo.messaging matrix (drivers, backend, patterns)

Driver Messaging Backend Backend Type RPC Notification Rabbit (kombu,pika) rabbitmq-server Broker AMQP 1.0 qdrouterd Direct Messaging ZMQ TCP, proxied Direct Messaging Kafka kafka server Broker-like Distributed Streaming

slide-22
SLIDE 22

Test Methodology

slide-23
SLIDE 23

Testing Methodology

  • Objective: benchmark RPC using both direct and queued approaches

○ Observe behavior and quantify

  • Tool - Oslo Messaging Benchmark Tool

○ A driver independent tool for distributed messaging load generation and measurement ○ https://github.com/kgiusti/ombt ○ Does NOT simulate Openstack project(s) traffic patterns

  • Scenarios

○ Separation of RPC and Notification traffic ○ Scoped to rabbit:// and amqp:// drivers for now

  • Traffic modeling assumptions

○ RPC-Notify Message ratios, Producer-Consumer Ratios, Message Payload size

  • Single server deployments for this testing phase

○ Clusters and meshes planned for follow-up scale and resiliency comparisons

slide-24
SLIDE 24

rabbit

Scenario 1 - Single Broker Backend

  • Broker used for both RPC and Notifications - not durable
  • Messaging Assumptions

○ RPC-Notify Traffic ratios - 50/50 ○ Producer/Consumer ratios - 2/1 ○ Payload size - 1K

Notify clients Notify listeners rpc clients rpc servers

  • mbt

controller

slide-25
SLIDE 25

rabbit

Scenario 2 - Single Broker Backend - Durable

  • Broker used for both RPC and Notifications
  • Messaging Assumptions

○ RPC-Notify Traffic ratios - 50/50 ○ Producer/Consumer ratios - 2/1 ○ Payload size - 1K

Notify clients Notify listeners rpc clients rpc servers

  • mbt

controller

slide-26
SLIDE 26

rabbit

Scenario 3 - Separate Broker Backend

  • Dual rabbitmq-server backends
  • Notifications measured with persistence

Notify clients Notify listeners rpc clients rpc servers

  • mbt

controller

rabbit

slide-27
SLIDE 27
slide-28
SLIDE 28
slide-29
SLIDE 29

amqp

Scenario 4 - Hybrid Messaging Backend

  • Direct Messaging Backend used for RPC (amqp:// and qpid-dispatch-router)
  • Broker Backend used for Notifications (rabbit:// and rabbitmq-server)

Notify clients Notify listeners rpc clients rpc servers

  • mbt

controller

rabbit

slide-30
SLIDE 30
slide-31
SLIDE 31
slide-32
SLIDE 32

Final Comparison

slide-33
SLIDE 33
slide-34
SLIDE 34

Next Steps

  • Try it out

○ AMQP 1.0 devstack plugin supports a hybrid configuration “qpid-hybrid” ■ https://git.openstack.org/openstack/devstack-plugin-amqp1 ○ Zmq devstack plugin: https://git.openstack.org/openstack/devstack-plugin-zmq

  • [developers]

○ “Messaging” != “Queueing” and oslo.messaging >= rabbitmq ○ Use “get_notification_transport” and “get_rpc_transport” - keep ‘em separated... ○ Get Involved! - oslo.messaging needs you!

  • Expand hybrid messaging scenarios in gate checks
  • Test and measure additional hybrid scenarios

○ Plausible driver-backend combinations for RPC and Notifications

  • Improve the ease-of-use and configuration of hybrid backends

○ Make it easy for the operator to deploy and get immediate value