Here's a step by step guide on how you can set up LavinMQ at CloudAMQP. Before you start, head over to the CloudAMQP getting started section and read the guide on how to activate your CloudAMQP account.
Start by selecting a pricing plan. Your choice of plan depends on several things and this guide walks you through the options and describes when to use which pricing plan.
CloudAMQP offers eight different plans, both dedicated RabbitMQ clusters with single or multiple nodes, or a multitenant server where you are given a vhost on a shared RabbitMQ server.
The different plan options are available on the pricing page: https://www.cloudamqp.com/plans.html.
A dedicated plan is not artificially limited in any way and therefore highly recommended for your production environment. The maximum performance is determined by the underlying instance type and the number of nodes in the setup.
The price is per node, and all nodes on a given pricing plan have the same performance. Cost is based on the number of nodes in your cluster; the more nodes you have, the more it will cost.
The speed given on the pricing page is the burst speed, the maximum number of messages you can send per second, for your instance, during a certain amount of time. The given number of messages per second depends on the type of routing, size of messages, how many consumers/publishers used, datacenter, auto acknowledgment/persistence flags, etc.
The number of supported connections raises with the number of nodes you have in the cluster.
Single node plans are the fastest and most simple ones. All data written to disk is safe. The data on a single node setup is always consistent since no data needs to be written to another RabbitMQ server.
A CloudAMQP cluster with three nodes gives three RabbitMQ servers. These servers are placed in different zones (availability zones in AWS) in all data centers with support for zones.
A CloudAMQP cluster with five nodes gives five RabbitMQ servers. The servers are divided into different availability zones in data centers with support for zones. Two nodes will be allocated in one zone, two in the next, and the final node in a third zone.
A shared instance is a virtual host (vhost) located on a shared server where other users’ actions might affect the performance of the whole server. All shared plans have a channel limit set to 200 and a maximum of 200 consumers per channel.
We recommend shared plans for testing or hobby applications.
Select a name for the instance and the selected pricing plan. A tag can also be added to separate instances between different projects.
|Name||Name on the instance. The name helps you to remember where you use the instance.|
|Plan||The CloudAMQP pricing plan.|
|Tag (optional)||Tags helps you separate instances between projects. They facilitate the project listing view for easier navigation and access control. E.g., "Test,” “Prod,” “Staging.”|
Create the instance in the selected data center. CloudAMQP is available in all major clouds.
|Data center||Select the same data center and region as your applications.|
Select the number of nodes in the cluster, along with a RabbitMQ version. The default version in the drop-down menu is the CloudAMQP recommended version.
It is possible to set up a peering connection between a VPC and a CloudAMQP VPC. More information about how to do that is described here.
|Nodes||Specify the number of nodes in the cluster.|
|RabbitMQ version||The default version is the version recommended by CloudAMQP.|
|Dedicated VPC||VPC peering with the CloudAMQP instance. The VPC subnet must be specified when creating a VPC.|
|Copy settings||Copies settings like alarms or firewall configurations from another instance.|
The final step is to verify the information provided and then press Create instance. The new instance is immediately provisioned, and all your instances can be viewed in the CloudAMQP Console. Instances can be connected in just a few minutes.
Instance details such as connection URL, server name, user/vhost, and password can be found on the details page in the CloudAMQP console.
CloudAMQP offers various monitoring tools and configuration settings, all available from the CloudAMQP console. Alarms can be set up that address performance issues promptly and automatically before they impact your business. The RabbitMQ log is available via the console, as well as server metrics. It’s possible to enable and disable plugins and specify a firewall.
The RabbitMQ management interface is available by pressing the green button in the top left corner. This interface visualizes your RabbitMQ instance and shows, for example, the current message rate, queues and exchanges created, and the bindings between them. The management interface also makes it possible to create queues and publish messages manually, among other things.
It is time to start sending and receiving messages from your broker. The AMQP URL is available on the details page in the CloudAMQP console. We recommend setting up an environment variable, e.g., CLOUDAMQP_URL and letting your deployments connect to a RabbitMQ instance in CloudAMQP using this variable.
Sample code is available for most languages.
You're now acquainted with the basics and ready to send your first messages, congratulations! Bookmark this checklist to refer back to when setting up a production environment in RabbitMQ.