Managed Postgres with DigitalOcean or thru own server with Hatchbox
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:
- 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?
- Does the managed Postgres servers count for the Pricing on Hatchbox?
- 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?
- As for the distribution of functions on each server, does this seem reasonable to start out?
- 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.
- 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.
- The number is however many servers Hatchbox creates and runs for you.
- 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