DEV Community

Discussion on: What are you learning from the DEV open source codebase?

Collapse
 
rohit profile image
Rohit Awate

Wow you guys run on Heroku! Doesn't it get expensive compared to something like DigitalOcean?

Collapse
 
michaelgv profile image
Mike

Naturally Heroku is quite expensive, if you don’t optimize what you’re doing properly. I remember from a previous post of Ben’s, he had mentioned they try to get as much cached as possible, I imagine the same goes for posts, etc and the only meat for returning users is cached items with a small load of latest that’ll be cached quickly.

If you can optimize caching, and have very little requests to the backend, the cost of using Heroku does decrease significantly.

Collapse
 
ben profile image
Ben Halpern

Yeah, the raw Heroku expenses don't account for much.

Of course we have a bunch of different services and it adds up, but the bottom line host costs aren't a big difference for our type of app.

So yeah, sometimes we overspend if we're not tuned well, but all in all the delta is gonna be pretty negligible.

As we scale, we need to keep all of this in mind, but we have bigger concerns than Heroku vs DigitalOcean at this point.

For what it's worth, I think DigitalOcean is awesome. At the time a few years ago when I started this as a side project, Heroku was what I knew best. Everything's been great with them, but I can't say we weighed every choice in the world and optimized.

Thread Thread
 
michaelgv profile image
Mike

If I may make an estimate on what your costs are for just infrastructure (Heroku, Fastly, Postgres, Emailing, Aloglia), I'd guess:

Heroku: 2x Standard Dyno - $50

Fastly: Assuming you do 1024 GB (1 TB) of bandwidth on average, with 100,000,000 file requests it's $198 per month

Postgres: I'd assume Standard 0, with 2 GB ram, 64 GB storage, 120 active connections, as most content hits Fastly you wouldn't need that many active connections, mainly storage for the data. Under this assumption that's $50 per month.

Mailchimp: I'd take a higher guess at 50,000 subscribers for a baseline price point, that's $240 per month

Searching via Algolia: Assuming 100k records, with 100k indexing ops, you're looking at $70 per month

All in all, I'd guess a high line cost of $608 per month to run infrastructure wise, I'm going to safely assume I'm off, as I'm not sure of the configuration of all services mentioned, and I like to estimate on the higher side.

Within a reasonable guess I'd say around the $400 mark all-in, with peak estimates around $600-$700 for sudden influxes of traffic when not optimized, etc.

Collapse
 
manzanit0 profile image
Javier Garcia

I'm not sure that they'll show numbers... but I'm really interested on this one tho :thinking: