IMVU Memcached Usage at 150k Requests per Second per Node

By: Jon W

Running a large web site is quite interesting. Not only do you have a *lot* of customers to keep happy, but you also have a *lot* of hardware to keep happy. Racks and racks of servers go into making sure that IMVU is always available, 24 hours a day, 7 days a week, except for occasional brief outages.

One of the kinds of servers we use is known as “memcached,” which is a simple way of reducing the workload for database servers by caching the result of frequent database queries in memory. This has two benefits:

  • It reduces load on the database servers (which are expensive) and moves it to machines that just have a lot of memory (which is cheap).
  • It allows us to serve web pages faster. Each web page within imvu.com is the result of several database queries; if the result of all of those queries is already in memory somewhere, we can send the page back in less than a second, whereas it would take longer than that if we had to go to the database for each query.

That being said, it’s no surprise that we have a significant number of servers running memcached to improve the speed and performance of our site. It used to be that when your memcaches hit 50,000 requests per second, they would top out — but that was a couple of years ago. It also used to be that you would switch to (potentially lossy) UDP for memcached traffic, rather than staying on (potentially laggy) TCP. However, for better or for worse, we’ve stayed on TCP for our memcached traffic for now.

3 thoughts to “IMVU Memcached Usage at 150k Requests per Second per Node”

  1. This post intends to convey two things:

    1) For IMVU users who may not be web server gurus, give a peek into what goes into building a large, 24/7 website.

    2) For those who already know memcached, provide some data on load capability for comparison and amusement.

    This particular memcached is running an ancient version of Debian on a three year old dual-Xeon 1U box, and it is using TCP. (This is different from many users who move to UDP, to get more throughput but more loss)

    The main tuning happens in the switches, where we attempt to have sufficient capacity to avoid packet loss except under the absolutely worst load transients.

    I’d love to see other similar data from other sites, btw!

  2. This is absolutely amazing to browse the site and use the client and then discover this blog explaining how this mass of data is being handled and routed so efficiently, its practically perfect.

    I’m new to the concept of memcached but I see how it works. Is there a particular amount of time that data from the database is cached by a memcached server and served continuously before getting fresh data? Example: the number of currently online IMVU users probably comes from a database query, so a memcached server must cache and serve the “answer” to the example 1000 clients who request it per second. I know that this particular data is not time sensitive or critical, but probably is handled the same as AND differently from other types of queries like product prices, or avatar names. Does IMVU use differently configured memcached servers for certain types of queries?

Leave a Reply