What are you learning from the DEV open source codebase?

twitter logo github logo ・1 min read

First of all, huge congrats to the DEV team for hitting this milestone and making the codebase available to the community.

With the release of dev.to's codebase going open source today, I'm curious what are some things you're learning from the codebase?

For me, I'm learning that InstantClick is used to make all those awesome articles on the site show up fast. Learning that Rubocop is used to enforce a style guide on the codebase.

twitter logo DISCUSS (11)
markdown guide

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


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.


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.

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.


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


I am pretty new to coding (still learning the basics) and I took a look at the code and recognized some stuff that I have done before... There is just so much in there I don't know where to begin to look or what it is am I looking at! I think I just need to spend some more time and googling stuff


Nice! Keep going Akshay! It might seem daunting at first but keep going. You could try breaking it up into small portions as well. For example, curious as to what sort of other packages that dev.to relies on, poke through the project's Gemfile. Or think about features you think are neat and you want to know more about and see if you can figure out where in the app it is implemented.


How you are planning for DEV-Android? I am willing to contribute.


As a QA, I'm hoping I can help with test coverage someday, but I need to learn how Ruby and RSpec works first from the existing tests :)

Classic DEV Post from Sep 10 '18

What's your atomic bomb?

Inspired by Software that helps, except I disagree with Bertil's implicit asser...

Michael Lee 🍕 profile image
Husband, dad and currently serving Pathos Ethos, a full-service agency as their CTO in NC. I enjoy making things for humans - things that delight, make people smile and bring value to folks.
Join dev.to

If crime-fighting half-man/half-sharks can do it, so can you.