-
Notifications
You must be signed in to change notification settings - Fork 260
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #401 from rabbitmq/production-example
An example of a production cluster configuration.
- Loading branch information
Showing
3 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Production Example | ||
|
||
This is an example of a good starting point for a production RabbitMQ deployment. It deploys a 3-node cluster with enough resources to handle reasonable traffic. | ||
|
||
Please keep in mind that: | ||
|
||
1. It may not be suitable for YOUR production deployment. Please go through the [Production Checklist](https://www.rabbitmq.com/production-checklist.html) to learn more about production deployment considerations. | ||
|
||
2. While it is important to correctly deploy RabbitMQ cluster for production deployment, it is even more important to correctly use RabbitMQ from your applications. [Production Checklist](https://www.rabbitmq.com/production-checklist.html) covers some of the common issues such as connection churn and polling cunsumers. Please also consider using [Quorum Queues](https://www.rabbitmq.com/quorum-queues.html) since they provide better data safety. | ||
|
||
You can deploy this example like this: | ||
|
||
```shell | ||
kubectl apply -f rabbitmq.yaml | ||
``` | ||
|
||
Please keep in mind that you need a multi-zone Kubernetes cluster with 12 CPUs, 30Gi RAM, 1.5Ti disk space available as well as a `storageClass` called `ssd` to deploy this example as-is. Of course you can adjust these values to your environment if needed. | ||
|
||
An SSD storage class can be defined using [the example](ssd-gke.yaml) (which is GKE-specific and needs to be adjusted for other environments). Read more about the expected disk perforamnce [in Google Cloud Documentation](https://cloud.google.com/compute/docs/disks/performance#ssd_persistent_disk). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
apiVersion: rabbitmq.com/v1beta1 | ||
kind: RabbitmqCluster | ||
metadata: | ||
name: production-ready | ||
spec: | ||
replicas: 3 | ||
resources: | ||
requests: | ||
cpu: 4 | ||
memory: 10Gi | ||
limits: | ||
cpu: 4 | ||
memory: 10Gi | ||
rabbitmq: | ||
additionalConfig: | | ||
cluster_partition_handling = ignore | ||
vm_memory_high_watermark_paging_ratio = 0.99 | ||
disk_free_limit.relative = 1.0 | ||
persistence: | ||
storageClassName: ssd | ||
storage: "500Gi" | ||
override: | ||
statefulSet: | ||
spec: | ||
template: | ||
spec: | ||
containers: [] | ||
topologySpreadConstraints: | ||
- maxSkew: 1 | ||
topologyKey: "topology.kubernetes.io/zone" | ||
whenUnsatisfiable: DoNotSchedule | ||
labelSelector: | ||
matchLabels: | ||
app.kubernetes.io/component: rabbitmq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# This example is GKE specific, other Kubernetes deployments will have a different `storageClass` for SSD disks. | ||
# | ||
# https://cloud.google.com/kubernetes-engine/docs/how-to/persistent-volumes/ssd-pd | ||
# https://cloud.google.com/compute/docs/disks/performance#ssd_persistent_disk | ||
apiVersion: storage.k8s.io/v1 | ||
kind: StorageClass | ||
metadata: | ||
name: ssd | ||
provisioner: kubernetes.io/gce-pd | ||
parameters: | ||
type: pd-ssd | ||
|