|
| 1 | +--- |
| 2 | +title: "Khepri is now the default metadata store" |
| 3 | +tags: ["khepri"] |
| 4 | +authors: [mgary] |
| 5 | +--- |
| 6 | + |
| 7 | +## Khepri is now the default metadata store |
| 8 | + |
| 9 | +Khepri, the new raft-based RabbitMQ metadata store, became fully supported with RabbitMQ 4.0. With the introduction of RabbitMQ 4.2, we consider Khepri to be mature enough to become the default metadata store, especially given its substantial data safety and recovery improvements over Mnesia. We have performed [a number of benchmarks](#khepri-performance-improvements), showing significant performance improvements in many metadata operations. |
| 10 | + |
| 11 | +## Khepri Feature Flag now stable |
| 12 | + |
| 13 | +The `khepri` feature flag has now been upgraded to `Stable`, meaning it will now be enabled when running the command `rabbitmqctl enable_feature_flag all`, which should be done after every successful minor version upgrade. We expect that all RabbitMQ clusters upgraded to 4.2 will now have the `khepri` feature flag enabled, and it should be enabled prior to upgrading from 4.2 onwards. In other words, starting with RabbitMQ 4.3, the `khepri` feature flag will be `Required`. Should a cluster be upgraded from RabbitMQ 4.2 without the `khepri` feature flag enabled, it will automatically be enabled as part of the upgrade process. |
| 14 | + |
| 15 | +### Feature Flag Subsystem |
| 16 | + |
| 17 | +The RabbitMQ feature flag subsystem was recently improved by introducing a new category of feature flags known as `Soft Required`. If a feature flag is `Soft Required` starting from version `N`, it is automatically enabled once all RabbitMQ nodes are upgraded to version `N` of RabbitMQ. This is a change from the previous behavior of `Required`, where a feature flag that became required in version `N` of RabbitMQ must be enabled before upgrading to version `N`. It remains best practice to enable feature flags as soon as they become `Stable`, generally immediately after a successful upgrade by running the command `rabbitmqctl enable_feature_flag all`. Nonetheless, we view the introduction of `Soft Required` feature flags as an improvement in user experience, as any required feature flags not already enabled will be automatically enabled when required. |
| 18 | + |
| 19 | +## Khepri performance improvements |
| 20 | + |
| 21 | +All Benchmarks performed on a 3 node cluster running on Kubernetes |
| 22 | + |
| 23 | +### 1000 queues, each with 100 bindings |
| 24 | +| benchmark | mnesia | khepri | |
| 25 | +| -------------------------- | ------ | ------ | |
| 26 | +| import | 446 s | 51 s | |
| 27 | +| re-import | 16 s | 46 s | |
| 28 | +| stop_app | 1.6 s | 1.7 s | |
| 29 | +| start_app | 22 s | 4.3 s | |
| 30 | +| rolling cluster restart | 108 s | 67 s | |
| 31 | +| mnesia to khepri migration | 12.7 s | | |
| 32 | + |
| 33 | +### 1000 Vhosts |
| 34 | +| benchmark | mnesia | khepri | |
| 35 | +| -------------------------- | ------ | ------ | |
| 36 | +| import | 284 s | 21 s | |
| 37 | +| re-import | 2.2 s | 2.2 s | |
| 38 | +| stop_app | 2.6 s | 2.4 s | |
| 39 | +| start_app | 419 s | 16 s | |
| 40 | +| rolling cluster restart | 1447 s | 106 s | |
| 41 | +| mnesia to khepri migration | 5.5 s | | |
| 42 | + |
| 43 | +### 100,000 Classic Queues |
| 44 | +| benchmark | mnesia | khepri | |
| 45 | +| -------------------------- | ------ | ------ | |
| 46 | +| import | 76 s | 76 s | |
| 47 | +| re-import | 5.4 s | 5.3 s | |
| 48 | +| stop_app | 13 s | 6 s | |
| 49 | +| start_app | 26 s | 40 s | |
| 50 | +| rolling cluster restart | 185 s | 307 s | |
| 51 | +| mnesia to khepri migration | 9.7 s | | |
| 52 | + |
| 53 | +### 10,000 Quorum Queues |
| 54 | +| benchmark | mnesia | khepri | |
| 55 | +| -------------------------- | ------ | ------ | |
| 56 | +| import | 49 s | 46 s | |
| 57 | +| re-import | 1.9 s | 1.8 s | |
| 58 | +| stop_app | 1.9 s | 1.7 s | |
| 59 | +| start_app | 44 s | 44 s | |
| 60 | +| rolling cluster restart | 285 s | 267 s | |
| 61 | +| mnesia to khepri migration | 4.7 s | | |
| 62 | + |
| 63 | +### 1,000 Streams |
| 64 | +| benchmark | mnesia | khepri | |
| 65 | +| -------------------------- | ------ | ------ | |
| 66 | +| import | 3.5 s | 1.2 s | |
| 67 | +| re-import | 1.6 s | 1.2 s | |
| 68 | +| stop_app | 1.9 s | 1.2 s | |
| 69 | +| start_app | 2.5 s | 2.3 s | |
| 70 | +| rolling cluster restart | 56 s | 55 s | |
| 71 | +| mnesia to khepri migration | 5 s | | |
0 commit comments