Free Heroku WebSolr Staging Environment

We were using WebSolr for our Rails application on Heroku. We decided to add a staging environment that mimicked our production one so that we could verify and approve changes in staging prior to deploying to production. We needed to have the WebSolr add-on, but the only problem was that there is no free version to use in our staging environment. We don’t want to pay $20/month to add WebSolr on Heroku for staging! So I searched Google and the only solution that seemed to come up and be free was hosting on amazon ec2. So we went ahead and proceeded with this, but in the meantime I emailed the WebSolr guys asking if we could get free service for staging. DON’T USE EC2 because you can actually get WebSolr for free. Here’s how:

This is a response to one of the emails I sent to WebSolr and it identifies how you can use WebSolr on Heroku for both production and staging:

It turns out that customers who add Websolr via Heroku actually get two indexes with the plan. It’s not really called out on Heroku’s site, but it was designed that way for exactly the use case you’re describing. If you’re currently only using one of those indexes for production, you can go ahead and create the second “staging” index at no cost.

There you have it. Just add another index on your production WebSolr account and connect your staging account to it. This is why they created the ability to have two indexes.

Hope this helps someone.

Advertisements