07.计算Nova→1.nova架构→1.架构概览→5.Database和Message Queue

  1. Database:Nova 会有一些数据须要存放到数据库中,通常使用 MySQL。数据库安装在控制节点上。Nova 使用命名为 “nova” 的数据库。不知道为何个人devstack里没有nova数据库???
    1.  1
       2
       3
       4
       5
       6
       7
       8
       9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      27
      28
      29
      30
      31
      root@controller:~# su - stack
      stack@controller:~$ mysql
      Welcome to the MySQL monitor.  Commands end with ; or \g.
      Your MySQL connection id is 172
      Server version: 5.7.26-0ubuntu0.16.04.1 (Ubuntu)
      
      Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
      
      Oracle is a registered trademark of Oracle Corporation and/or its
      affiliates. Other names may be trademarks of their respective
      owners.
      
      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
      
      mysql> SHOW DATABASES;
      +--------------------+
      | Database           |
      +--------------------+
      | information_schema |
      | cinder             |
      | glance             |
      | keystone           |
      | mysql              |
      | neutron            |
      | nova_api           |
      | nova_cell0         |
      | nova_cell1         |
      | performance_schema |
      | sys                |
      +--------------------+
      11 rows in set (0.03 sec)
  2. Message Queue:Nova 包含众多的子服务,这些子服务之间须要相互协调和通讯。为解耦各个子服务,Nova 经过 Message Queue 做为子服务的信息中转站。因此在架构图上咱们看到了子服务之间没有直接的连线,它们都经过 Message Queue 联系。Advanced Message Queuing Protocol

openstack通用设计思路:
  1. Messaging 服务
    1. 为何不让 API 直接调用Scheduler,或是让Scheuler 直接调用 Compute,而是非要经过 Messaging 进行中转?
    2. 程序之间的调用一般分两种:同步调用和异步调用。
      1. API 直接调用 Scheduler 的接口就是同步调用。
        1. 其特色是 API 发出请求后须要一直等待,直到 Scheduler 完成对 Compute 的调度,将结果返回给 API 后 API 才可以继续作后面的工做。
      2. API 经过 Messaging 间接调用 Scheduler 就是异步调用。
        1. 其特色是 API 发出请求后不须要等待,直接返回,继续作后面的工做。
    3. 采用异步调用能够解耦各个自服务,即子服务不须要知道其余服务在哪里运行, 只须要发送消息给 Messaging 就能完成调用。而且提升性能,由于异步调用使得调用者无须等待结果返回。 这样能够继续执行更多的工做, 提升系统总的吞吐量。
  2. Database:OpenStack 各组件都须要维护本身的状态信息。好比 Nova 中有虚机的规格、状态,这些信息都是在数据库中维护的。每一个 OpenStack 组件在 MySQL 中有本身的数据库。
相关文章
相关标签/搜索