kennygrant / gohackernews

Golang News - curated links about the Go programming language
https://golangnews.com
MIT License
282 stars 42 forks source link

Postgres #39

Closed pjebs closed 4 years ago

pjebs commented 4 years ago

@kennygrant Are you hosting the db on a $5 DO droplet (Self-managed)? How Are you running the server? On Docker swarm or kube?

kennygrant commented 4 years ago

I have the db hosted separately as I have a db server for other projects. The app itself runs on a $5 droplet, but the db runs on a separate droplet. So the entire setup is:

1 small VM for the app - no local state 1 larger VM for the db - holds all the state

The VMs are set up with cloudconfig (was CoreOS, now Ubuntu), and I deploy with rsync for the app. I don't bother with containers as don't see much advantage to them for this. Because this is a simple project it's been running for years on this one droplet without issue, I don't bother with a load balance as it sees very little downtime.