Faster setup, happier customers: How we cut bootstrap time

“Can we make it even faster?” was a question that came up during one of our work sessions. This became the starting point for a new project that significantly reduces the time it takes to spin up clusters for our customers.

An opportunity for improvement

Our server team spotted an opportunity for improvement: bootstrapping clusters was taking longer than ideal. Setting up a CloudAMQP instance gives customers the freedom to select their desired RabbitMQ or LavinMQ versions and plugins. Once you create your instance, a lot happens under the hood.

Previously, we started with a base Ubuntu image and installed all the necessary tools and RabbitMQ one by one each time a customer needed a cluster. This process kicked in whenever customers requested new servers, Ubuntu upgrades, or plan changes, and since upgrading is simple, plan changes are recurring events.

Building a Pre-Configured image with Packer

The solution was straightforward: build an image with all the required tools pre-installed. Instead of starting with a base image and setting everything up each time customers need it, everything the customer needs is available in advance. Anton started with a proof of concept, carefully tracking how much time customers could save.

Using Packer we worked with our existing bootstrap scripts, refined the configurations, and tested things step by step. The research and proof of concept phase took a few weeks. Once we confirmed the results met our requirements, the finishing touches came together quickly.

POLICYRCD=/usr/local/sbin/prevent-start-on-install.sh apt-get install \
--yes \
--option Dir::Etc::SourceList=/dev/null \
--option Dpkg::Options::="--force-confold" \
rabbitmq-server="$RABBITMQ_VERSION"
This snippet shows how CloudAMQP installs RabbitMQ. We moved 20 installs and 24 uninstalls from the bootstrap process to our image.

Significantly faster installation times

Now, when customers need a cluster they select any RabbitMQ version and plugin they need and we only install RabbitMQ or LavinMQ, since everything else is already in place. The result is noticeably shorter installation times. This improvement came from our team's commitment of ensuring our ability to serve exactly what the customer needs, as efficient as possible.

We're already exploring the next steps: looking at ways to run certain processes in parallel rather than one after another for even better performance.

If you have any questions or considerations about this blog, reach us at contact@cloudamqp.com

Until next time,
CloudAMQP team

CloudAMQP - industry leading RabbitMQ as a service

Start your managed cluster today. CloudAMQP is 100% free to try.

13,000+ users including these smart companies