What are you learning from the DEV open source codebase?

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.

Did you find this post useful? Show some love!

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.


Hey there, we see you aren't signed in. (Yes you, the reader. This is a fake comment.)

Please consider creating an account on dev.to. It literally takes a few seconds and we'd appreciate the support so much. ❤️

Plus, no fake comments when you're signed in. 🙃

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 May 25

Stop saying you dont have time!

This week I want to talk about something that I have used for a excuse quite a few times. Before I finally started getting a schedule going. And that is saying the excuse I don’t have time to learn blank.

Follow @alexgwartney to see more of their posts in your feed.
dev.to is now open source!
View Announcement Post View GitHub Repo
Michael Lee 🍕
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.
Trending on dev.to
#womenintech #shecoded #career #discuss
My first PR merged!
#github #opensource #contribution
Open Source Has Not Failed. Don't Cover Up Corporate Abuse of Open Source
#opensource #technology #career #rant
Tips and Tricks to Finding Issues to Contribute to on Github
#opensource #beginners #tutorial #tipsandtricks
Looking For a Simpler Way To Develop WordPress Themes Locally.
#wordpress #discuss #help
What is the simplest code to explain a loop?
#basics #anylang #discuss
What part of your first dev job were you least prepared for?
#discuss #career
How many computers do you use?