Skip to main content
Ask A Question
You’re not receiving notifications from this thread.

Managed Postgres with DigitalOcean or thru own server with Hatchbox

Rails • Asked by Alex Deering

I've been going thru the various ways to publish a rails app and trying to decide which method is going to be the best in the long run. After some searching I think Hatchbox and DigitalOcean is going to be the best balance of price and ease of use. I dont know much on the server side of things and I want to make sure Ive got this understood before I move forward.

So I'm looking to have multiple servers with a load balancer thru DigitalOcean. This is what Im currently looking to do thru DigitalOcean

Load Balancer (DigitalOcean balancer or on a dedicated server?)
Web Server, Cron (1gb ram, 1vCPU)
Webserver, Redis, sidekiq (1gb ram, 1vCPU)
Digital Ocean Managed Database
Elasticsearch (4gb ram, 2vCPU)
Digital Ocean Spaces Object Storage

My questions are these then:

  1. In the Heroku to Hatchbox it has a server for the loadbalancer, is that a feature that can be installed on anysize server, or would I need to use the specific Load Balancer with DigitalOcean?
  2. Does the managed Postgres servers count for the Pricing on Hatchbox?
  3. So with the hatchbox pricing it looks like I would only need 4(or 3 if I use DO Load Balancer) servers so could go with the growth plan, correct?
  4. As for the distribution of functions on each server, does this seem reasonable to start out?

  1. You can either pay for DigitalOcean's managed load balancer, or let Hatchbox create one. You probably just need a $5/mo server for that.
  2. If you use their managed database, it's not a server you'll have in Hatchbox, so it doesn't count. They also have managed Redis now too that you could use if you wanted. Having managed databases that you don't have to worry about is really really nice. Hatchbox doesn't do managed yet (and we might never need to if these services keep popping up), so those are worth looking into.
  3. The number is however many servers Hatchbox creates and runs for you.
  4. Depends on how many background jobs you plan on running, but yes, seems good.

Sweet, thanks for the quick response. Initially not expecting too much on the background jobs...And that would be a quick transfer to move redis/sidekiq to their own server in the future if it was needed since there isnt any persistent data for those, right?

Moving a database isn't so easy. You typically incur downtime, or you have to setup streaming replicas and things that are complicated.

Ok, so I'll probably start with the managed redis as well to make scaling easier in the future. Thanks for the info

Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 31,353+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.