Download - Commication Framework in OpenStack
Communication Framework in
OpenStack
Sean Chang2014/12
Overview of OpenStack commnication
My OpenStack environmentOpenStack communication architectureAMQP
RabbitMQkombuHow to debug
Three nodes for OpenStackNodes(mgm. ip)
control(10.10.10.21)NTP, RabbitMQ, MySQL,
Keystone, Glance, Neutron, Nova, Cinder, Heat, and Horizon
network(10.10.10.22)NTP and Neutron
compute(10.10.10.23)NTP, Nova, and Neutron
Communication Flow
Neutron
Messaging in Openstack using RabbitMQ ( Queue–server)
AMQP
MQ supportSupporting list
RabbitMQ(default in JUNO)QpidZeroMQ(non-AMQP)
●The Advanced Message Queuing Protocol (AMQP) is an open standard for passing business messages between applications or organizations.
● AMQP was designed with the following main characteristics as goals:○ Security○ Reliability○ Interoperability○ Standard○ Open
AMQP
AMQP Product and Success StoriesA standard is no use without products, and there are is a choice of excellent AMQP technology suppliers.
Apache Qpid, an Apache project
Microsoft's Windows Azure Service BusJBoss A-MQ by Red Hat built from QpidStormMQ a cloud hosted messaging service based on AMQPVMware Inc RabbitMQ; also supported by SpringSource...
OpenStackOpenStack is an open-source initiative that provides a massively scalable cloud
operating system and uses RabbitMQ for messaging.
Why does OpenStack use AMQP
Consider design and scalabilityLoose coupling between client and server sideAsynchronize is availableLoad balance could be inactive
RabbitMQYou may be thinking of data delivery, non-blocking operations or push
notifications. Or you want to use publish / subscribe, asynchronous processing, or work queues. All these are patterns, and they form part of messaging.
RabbitMQ is a messaging broker - an intermediary for messaging. It gives your applications a common platform to send and receive messages, and your messages a safe place to live until received.
kombu
kombu - Messaging library for PythonKombu is a messaging library for Python.
The aim of Kombu is to make messaging in Python as easy as possible by providing an
idiomatic high-level interface for the AMQ protocol, and also provide proven and tested
solutions to common messaging problems.
AMQP is the Advanced Message Queuing Protocol, an open standard protocol for message
orientation, queuing, routing, reliability and security, for which the RabbitMQmessaging
server is the most popular implementation.
重點提要雖然網路上有關
AMQP、 RabbitMQ、 kombu的資料不計其數,但真正 OpenStack在實作上應用範圍看下面幾頁就夠了了解太多反而會失去方向
The internals elements of a message broker node
Internals elements relationshipProducers
Producers sends messages to an exchange.Exchanges
Messages are sent to exchanges. Exchanges are named and can be configured to use one of several routing algorithms. The exchange routes the messages to consumers by matching the routing key in the message with the routing key the consumer provides when binding to the exchange.
ConsumersConsumers declares a queue, binds it to a exchange and receives messages
from it.Queues
Queues receive messages sent to exchanges. The queues are declared by consumers.
Routing keysEvery message has a routing key. The interpretation of the routing key depends on the exchange type.
There are four default exchange types defined by the AMQP standard, and vendors can define custom types (so see your vendors manual for details).
These are the default exchange types defined by AMQP/0.8:Direct exchange
Matches if the routing key property of the message and the routing_key attribute of the consumer are identical.
Fan-out exchangeAlways matches, even if the binding does not have a routing key.
Topic exchangeMatches the routing key property of the message by a primitive pattern matching scheme. The
message routing key then consists of words separated by dots (”.”, like domain names), and two special characters are available; star (“*”) and hash (“#”). The star matches any word, and the hash matches zero or more words. For example “*.stock.#” matches the routing keys “usd.stock” and “eur.stock.db” but not “stock.nasdaq”.
The exchange types(define by AMQP)
RPC Casts
RPC Calls
How to debugcommand line
rabbitmqctl [-n node] [-q] {command} [command options...]
How to debugManagement Plugin
The rabbitmq-management plugin provides an HTTP-based API for management and monitoring of your RabbitMQ server, along with a browser-based UI and a command line tool, rabbitmqadmin.
Web UIhttp://server-name:15672/default account/passwd:
guest/guest
心得docs.openstack.org就是很好的學習出發點,不管是整體概念、系統架構、設計說明、程式碼說明;其他資料如 lib docs、網路文件、甚至是 openstack source code當作真的看不懂再去找就可以,避免繞遠路。小心見林不見樹、見樹不見林
Q & A