Why openstack need both api and rabbitmq? [closed]

asked 2020-03-27 13:35:20 -0500

tien86 gravatar image

I studying openstack in 3rd year. I have question: each project have API component (nova-api ) and rabbitmq component ( nova-scheduler ). When I config, I have to config there parameters without understanding why they do not put all message over API or RabbitMQ ? I think there must be design reason but still do not know why?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by tien86
close date 2020-04-02 22:37:39.953908


You need a mechanism for internal communication and one for external access to the cloud. The former is the MQ, the latter the API. The API remains very stable, whereas the MQ interface can change from release to release, as no users are affected when it changes.

Bernd Bausch gravatar imageBernd Bausch ( 2020-03-27 23:18:07 -0500 )edit

Why does OpenStack use two mechanisms? For cloud users, you want a standard interface. HTTP(S) and JSON are typical standards used for APIs. You can issue an API manually with curl. It's simple and easy to implement on all platforms. On the other hand, it's slow compared to MQ.

Just my opinion.

Bernd Bausch gravatar imageBernd Bausch ( 2020-03-27 23:21:35 -0500 )edit

It's exactly as You said: MQ is faster and is used for internal communication between processes within same project, e.g. neutron-ovs-agent with neutron-server, etc. REST API is for external communication. It is used by cloud users but also between OpenStack projects, e.g. nova <-> neutron

slaweq gravatar imageslaweq ( 2020-03-28 04:12:18 -0500 )edit

But it's not mandatory to use RabbitMQ for internal communication. For example Neutron with ovn driver is using OVN's database-driven control plane.

slaweq gravatar imageslaweq ( 2020-03-28 04:13:54 -0500 )edit

Interesting that there are alternatives to MQ. Perhaps memcached could also be called an internal communication mechanism.

Bernd Bausch gravatar imageBernd Bausch ( 2020-03-28 07:45:26 -0500 )edit