Top all-time · #806
instagram-engineering.com
Company blog · instagram-engineering.comwebprogramming
instagram-engineering.com is the company blog at instagram-engineering.com, writing about web and programming. Since 2018, 82 different Hacker News readers have linked it 106 times, most often “Sharding and IDs at Instagram (2012)”. No feed was found, so read it on the site itself.
Rarely recommended · 4 of 40 sampled comments recommend it?
Why HN links it
HN commenters link Instagram Engineering's posts, mostly on running Python at scale: disabling garbage collection, copy-on-write-friendly Python, strict mode, sharded IDs and static analysis, plus Django and React Native.
Summarised by Claude from a sample of 40 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
Most-linked posts?
- Sharding and IDs at Instagram (2012)12 people · 14 mentions · first linked 2018-05-23
- Dismissing Python Garbage Collection at Instagram12 people · 12 mentions · first linked 2018-04-30
- Python at Scale: Strict Modules9 people · 9 mentions · first linked 2019-10-17
- /copy-on-write-friendly-python-garbage-collection-ad6ed5233ddf7 people · 7 mentions · first linked 2019-07-18
- Static Analysis at Scale: An Instagram Story6 people · 7 mentions · first linked 2019-08-15
- Making instagram.com faster – code size and execution optimizations3 people · 3 mentions · first linked 2019-11-01
- Making Instagram.com Faster (Part 1)3 people · 3 mentions · first linked 2019-08-01
- /what-powers-instagram-hundreds-of-instances-dozens-of-technologies-adf2e22da2ad3 people · 3 mentions · first linked 2023-03-22
- Instagram: Adaptive process and memory management for Python web servers3 people · 3 mentions · first linked 2019-07-15
- Types for Python HTTP APIs3 people · 3 mentions · first linked 2019-09-13
What Hacker News says?
In case anybody missed this: https://instagram-engineering.com/dismissing-python-garbage-...
Comment linking /dismissing-python-garbage-collection-at-instagram-4dca40b29172
on “We at $Famous_company switched to $Hyped_technology”Submitted Python at Scale: Strict Modules as a story · 388 points
HN discussionFacebook runs the largest deployment of Django in the world -- Instagram. https://instagram-engineering.com/web-service-efficiency-at-...
Comment linking /web-service-efficiency-at-instagram-with-python-4976d078e366
on “Remote Code Execution on a Facebook server”Submitted Python at Scale: Strict Modules as a story · 225 points
HN discussionRead all about it: https://instagram-engineering.com/static-analysis-at-scale-a...
Comment linking /static-analysis-at-scale-an-instagram-story-8f498ab71a0c
on “Simple Systems Have Less Downtime”Submitted Making Instagram.com faster: Part 3 – cache first as a story · 213 points
HN discussionInstagram has very limited parts of the application written in RN, like 'Edit Profile'. [1] The vast majority of the app is implemented natively. [1] https://instagram-engineering.com/react-native-at-instagram-...
Comment linking /react-native-at-instagram-dd828a9a90c7
on “Building all of our new mobile apps using React Native”Submitted Types for Python HTTP APIs as a story · 213 points
HN discussionThere are articles like https://instagram-engineering.com/dismissing-python-garbage-... which seem to confirm some problems. One of the people involved with this Cinder project was an original author of https://github.com/microsoft/Pyjion (it's now being revamped by a new dev.) Dino had deep .NET/CLR implementation experience and had been the lead for IronPython which I think spawned the interest in perf improvement…
Comment linking /dismissing-python-garbage-collection-at-instagram-4dca40b29172
on “Cinder: Instagram's performance-oriented fork of CPython”Submitted Profiling CPython at Instagram (2017) as a story · 143 points
HN discussionYeah, it kind of reminded me the "python strict mode" they talked about before [1]. No designed to be cool but to be useful. [1] https://instagram-engineering.com/python-at-scale-strict-mod...
Comment linking /python-at-scale-strict-modules-c0bb9245c834
on “Cinder: Instagram's performance-oriented fork of CPython”Submitted Static Analysis at Scale: An Instagram Story as a story · 137 points
HN discussionThat's true but running VMs mutate their heaps, both managed and malloced. CoW also only works from parent to child. You can't share mutable memory this way. Empty space in internal pages gets used allocating new objects, refence counts updated or GC flags get flipped etc, and it just takes one write in each 4kb page to trigger a whole page copy. It doesn't take long before a busy web worker etc will cause a huge ch…
Comment linking /copy-on-write-friendly-python-garbage-collection-ad6ed5233ddf
on “What's Coming in Python 3.8”Submitted Thundering Herds and Promises as a story · 133 points
HN discussionIt looks like figma mostly just implemented the Instagram sharding paper, and then did the obvious next level of semi-intelligent yet delicate and fragile query routing. Definitely a technically challenging and overall fun / satisfying engineering exercise! https://instagram-engineering.com/sharding-ids-at-instagram-...
Comment linking /sharding-ids-at-instagram-1cf5a71e5a5c
on “How Figma's databases team lived to tell the scale”Submitted Instagram’s Explore Recommender System as a story · 109 points
HN discussionAnd because of Instagram: https://instagram-engineering.com/python-at-scale-strict-mod...
Comment linking /python-at-scale-strict-modules-c0bb9245c834
on “12 requests per second: A realistic look at Python web frameworks”Submitted Making Direct Messages Reliable and Fast as a story · 78 points
HN discussionRelated: https://instagram-engineering.com/python-at-scale-strict-mod...
Comment linking /python-at-scale-strict-modules-c0bb9245c834
on “How the Python import system works”Submitted Dismissing Python Garbage Collection (2017) as a story · 51 points
HN discussionGreat post, entertainingly written. Back in 2015, Instagram did a blog post on similar challenges they came across implementing emoji hashtags [1]. Spoiler alert: they programmatically constructed a huge regex to detect them. [1] https://instagram-engineering.com/emojineering-part-ii-imple...
Comment linking /emojineering-part-ii-implementing-hashtag-emoji-7b653b221c82
on “Emoji Under the Hood”Submitted Video Upload Latency Improvements at Instagram as a story · 47 points
HN discussionThere's a 2017 writeup from Instagram: https://instagram-engineering.com/dismissing-python-garbage-...
Comment linking /dismissing-python-garbage-collection-at-instagram-4dca40b29172
on “We have to talk about this Python, Gunicorn, Gevent thing”Submitted Making instagram.com faster – code size and execution optimizations as a story · 11 points
HN discussionEven if you manage to preload everything you need, Python's reference counting mechanism will cause everything to be copied anyway. Every time you access an object, its reference count is mutated, which will the memory page to be copied. There are workarounds if you're willing to mess with the Python interpreter: https://instagram-engineering.com/copy-on-write-friendly-pyt...
Comment linking /copy-on-write-friendly-python-garbage-collection-ad6ed5233ddf
on “We have to talk about this Python, Gunicorn, Gevent thing”Submitted Lessons Learned at Instagram Stories and Feed Machine Learning as a story · 11 points
HN discussionDjango is the closest I can think of. Many unicorns built on Django. Both Rails and Django are horribly slow though, so once you get to some critical scale you gotta start doing some real weird stuff like Instagram did with turning off Python's GC [1], etc. [1] https://instagram-engineering.com/copy-on-write-friendly-pyt...
Comment linking /copy-on-write-friendly-python-garbage-collection-ad6ed5233ddf
on “The One-Person Framework in Practice”Submitted Making Instagram.com Faster (Part 1) as a story · 10 points
HN discussionAs others have said, emoji are just unicode. What's interesting is that the some aren't just a single unicode character. For example, where skin tone is available for some emoji (e.g. Santa) it is represented as the generic emoji, plus a separate character representing skin colour. The client has to interpret this to show the intended glyph. Instagram engineering covered this quite nicely [1]. [1] https://instagram-…
Comment linking /emojineering-part-ii-implementing-hashtag-emoji-7b653b221c82
on “An entomologist rates ant emojis”Submitted Sharding and IDs at Instagram (2012) as a story · 5 points
HN discussion