Sorry if you saw application errors this morning; best guess based on logs is the memory usage got in a weird state, restarted the dyno, hopefully it's working a bit better now. And because, probably related, I was asked for about pricing things for better performance, a summary!
There are many things that can be paid for when running an app like this (unsurprisingly). Here's the list as I'm currently considering it. I may have forgotten things; feel free to point them out / ask for a breakdown / whatever.
- App dynos. One of these is what serves up standard, someone-opened-a-Constellation-page traffic. Right now we have one running. First is free, additional are $7/month.
- Worker dynos. These do work that is explicitly "does not need to happen within the page load." This is the long term goal for things like subscribing to a post that you are not an author in- when an author posts, a worker dyno would take care of emailing you, because email is slow and it doesn't need to finish emailing you before showing the author the "success you posted the thing" page. I currently have none. Like app dynos, they cost $7/month.
- Database. We're on the standard Heroku PostgreSQL instance now, at Hobby level (up to 10M rows) for $9/month. If I have to upgrade again, this goes up to $50/mo.
- Redis. This is (in my long term plan, at least) used for caching things that are accessed frequently and change rarely. It's also where you store the information about delayed jobs that the workers work on. It's free for basic, upgrades start at $15/mo.
- Image hosting for icons. I'm using Amazon S3 for this. It's currently free up to 5 GB storage (we're at about 0.05 GB, plenty of room for now), 2k add or deletes (we run at about 30% of this right now) and 20k get requests (we exceed this pretty regularly.) For the get requests, we're running at about 420k a month, and they cost 0.004 per 10k requests; this puts me at about $0.17 a month.*
- I probably eventually want a CDN in front of the images so I serve them less. Amazon Cloudfront is the obvious answer since I'm using S3 for the images already. Free tier is 50GB data transfer and 2M requests a month. After that, it's $0.085 per GB and $0.0075 per 10k requests, but these do vary slightly by request origin cause it's geobased and I know we're rather international.*
- Performance monitoring. Right now I'm going by guesswork. NewRelic has a good Rails monitoring framework which comes in free and paid tiers; I'm hoping to keep it to free, as it jumps from free to start at $49/month, and the paid plans cost more the more dynos I'm running.
- A domain! So we're not vastjourneyblahblahblah. Looked into a couple registrars already;
www.glowfic.com with privacy protection is about $2/mo.
(*Also important caveat: I think my Amazon free tier runs out after a year, so costs may go up next February/March.)
Soooo tl;dr we're getting by okay for now at a bit over $9/mo. Mid term setup, assuming I install most of the things I want but don't go out of free tiers too fast, will put me at more like $20-30 a month (this adds: domain name, worker dyno, pads the image hosting costs, and adds wiggle room for an extra app dyno, but assumes everything else is free). Long term... presumably I'll have to upgrade the database at minimum, but ugh I'm trying not to think about that xD