Is Django useful without the ORM? [Instagram case study]

James Bennet says: the Django ORM is probably the single most tightly-integrated component of the entire framework — if you stop using it, you’re throwing away so much other stuff that “why are we even still using Django” becomes a really significant question.

And yet in this talk Carl Meyer describes how Instagram used (and probably still uses?) Django without the ORM. See around 9:00 minute mark in the video.

I am trying to understand why Instagram would have kept the framework without the inbuilt ORM?

Thanks in advance for any insights! (Beginner here, posting for the first time)

That’s easy to understand.

They’re dealing with scalability issues that 99.999 % of all websites wish they had. (And 99% of the rest are glad they don’t.)

They’re clearly one of the top 10 most active websites in the world. (The precise ranking varies by which statistics site you look at, but most appear to have them around the middle of that 10.)

They are so far away from the average regarding usage and volume that they are the very archetype of an “unusual situation”.

Their requirements for performance of operations far exceed whatever reduction in the rate of development is incurred by their usage of their alternate backends.

From this talk and other info I’ve understood that Instagram uses (or used) Django’s URLs, views, internationalisation, translations, and maybe static asset handling. That’s still quite a bit of stuff that would be hard to replace with other packages.

Also, they didn’t arrive at “no ORM” instantly. I believe they used the ORM for years but then after the purchase by Facebook, moved over to Facebook’s in-house scalable data store built on MySQL.

So yes, as Ken says they’ve reached a point that 99.999% of projects won’t. And the way to get there is to use the easier, less scalable things, and gradually swap out what doesn’t work. Jumping to tooling for such a high scale means developing your project much slower, not a good trade off.