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?
Reply
  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.
Reply

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?

Reply

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

Reply

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

Reply

I'm in a similar position. I would like a load balanced cluster in Digital Ocean but I'd like to take advantage of their load balancers, Managed Postgres and Managed Redis. Is there a guide to configuring a cluster that doesn't have a DB, Redis or Load Balancer? From what I can tell, a load balancer and Redis are required when creating or updating a cluster?

Basically I would like Hatchbox to manage my web servers (2+) and workers (2+) but allow me to configure the URLs to Redis and Postgres.

Reply
Join the discussion
Create an account Log in

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

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

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