Skip to content

An example of a production cluster configuration. #401

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions docs/examples/production-ready/README.md
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).
34 changes: 34 additions & 0 deletions docs/examples/production-ready/rabbitmq.yaml
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
12 changes: 12 additions & 0 deletions ssd-gke.yaml
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