Skip to Content

Facebook Gets a Short-Term Memory, to Keep You Commenting

A new feature makes the site into one giant instant-messaging chat room.
February 7, 2011

Facebook may be about to suck up even more of your time. Two weeks ago a feature rolled out that I’m told many users may not have noticed, but that is predicted to soon have them interacting with each other more on the the social network.

That feature was instantly updating comments, and it turns every piece of content on Facebook into an instant messaging chat room. Any time you add a comment to, say, a photo or status update it will now appear instantly in front of anyone else looking at that same page.

It feels like another example of how all kinds of asynchronous messaging tools like email and sms are being converted into synchronous ones. Google Wave (RIP) created a realtime combination of email, IM and wikis; Facebook messages did the same to email, SMS and IM. “Having a conversation in a comment thread was a stuttering experience,” Facebook newsfeed engineer Ken Deeter told me, “you had to keep refreshing the page to see new comments.”

Switching to live updating may seem a small change from a user’s perspective. But the engineering decisions Deeter and colleagues had to make illustrate how complex it is to operate a site with more than half a billion users.

The most obvious way for Facebook to go instant – having your browser check for new comments every second or so when viewing a page – “would have made the site fall down for sure,” Deeter says. Instead Facebook had be given a kind of short term memory to keep track of who was looking at what at any given moment. Each time a new comment is added it is run past that memory, which checks to see who needs to see it immediately and directs it where it needs to go.

What’s more, unlike most data stored in the cloud, it couldn’t be put onto hard disks, because that wouldn’t keep pace with the rapid rate at which people log on to and off of Facebook. “We’re handling around 16 million viewer-to content associations per second so it’s unfeasible to do this on disk,” says Deeter, “we had to build a memory-based [i.e. RAM] system that can handle a very high write rate.”

That new memory couldn’t be in one place, because the delay in reaching it from all corners of Facebook’s global empire of users would be too great. Instead the team added one in each of the firm’s data centers, tasked with keeping track of its closest users. When a comment is added each of the local systems is polled to ensure everyone sees what they need to. You can read more details on this on Facebook’s engineering blog.

Any change made by Facebook is a vast social experiment a much as an exercise in software engineering, though, and the firm expects the way people behave on the site to change. In the course of building out the new feature it was uncovered that in any given minute over 100 million comment threads are being viewed online and that over 650,000 comments are made. Those and other figures are now being watched closely. “You have to wait a while for people realize that it is has changed,” says Deeter, “in another two weeks or so I think we’ll find that people have more conversations in comments because it makes you feel like there are people on the site with you.”

To paraphrase, we may all be about to start spending even more time on their site.

Deep Dive


Five poems about the mind

DREAM VENDING MACHINE I feed it coins and watch the spring coil back,the clunk of a vacuum-packed, foil-wrappeddream dropping into the tray. It dispenses all kinds of dreams—bad dreams, good dreams,short nightmares to stave off worse ones, recurring dreams with a teacake marshmallow center.Hardboiled caramel dreams to tuck in your cheek,a bag of orange dreams…

Work reinvented: Tech will drive the office evolution

As organizations navigate a new world of hybrid work, tech innovation will be crucial for employee connection and collaboration.

lucid dreaming concept
lucid dreaming concept

I taught myself to lucid dream. You can too.

We still don’t know much about the experience of being aware that you’re dreaming—but a few researchers think it could help us find out more about how the brain works.

panpsychism concept
panpsychism concept

Is everything in the world a little bit conscious?

The idea that consciousness is widespread is attractive to many for intellectual and, perhaps, also emotional
reasons. But can it be tested? Surprisingly, perhaps it can.

Stay connected

Illustration by Rose WongIllustration by Rose Wong

Get the latest updates from
MIT Technology Review

Discover special offers, top stories, upcoming events, and more.

Thank you for submitting your email!

Explore more newsletters

It looks like something went wrong.

We’re having trouble saving your preferences. Try refreshing this page and updating them one more time. If you continue to get this message, reach out to us at with a list of newsletters you’d like to receive.