All threads / Managed Postgres with DigitalOcean or thru own server with Hatchbox

Ask A Question

Notifications

You’re not receiving notifications from this thread.

Managed Postgres with DigitalOcean or thru own server with Hatchbox

Alex Deering asked in Rails

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

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 34,674+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.