Instagram used Folly Futures to create a set of recommendation services that can handle tens of thousands of queries per second and generate tens of millions of connections per day.
The services generate lists of additional Instagram accounts that users could follow, drawing from a pool of known friends, friends of friends, and popular accounts in the user's area.
"After moving to Futures, we had a performant system with clear, readable code," Instagram said. "Our services can fully exploit system resources and are more reliable and efficient."
Because of the restructuring of the code, CPU utilization of the suggested user service bounced to 90 percent from the 10 to 15 percent range. Better CPU utilization meant fewer copies of the program needed to be run at once, from 720 to 38, thus requiring fewer servers. Each program is capable of handling 800 requests per second, with an average latency of 40 milliseconds.
Sign up for MIS Asia eNewsletters.