It’s now been one year since Automattic acquired Gravatar. “Gravatar now lives on about 20 servers. 2 Database servers, 1 File server, 2 Load balancers, 5 Caching servers, 9 Web servers, and 1 Development server. That combination of servers is handling an average of 7,214 of your requests every second of every day. That’s a whopping 623,293,056 requests daily!” Wowza!
Tags: database, serverWow it’s really been 1 year since Gravatar joined the Automattic family. Time sure flies when you’re having fun!
Gravatar has come a long way from the service that it was back in October 2007. My wife likes to laugh at me because I’ll pick something up in one room, like a remote control, and move around the house fidgeting with it. Then I’ll absentmindedly leave it in some random place like the bathroom, or the freezer. One year ago we picked up a small struggling avatar service with a great name and an awesome fan base. Now, in an attempt not to leave it in a random location, we’re looking back on the last year (and letting you look with us.)
The service was running version 2.0, and set up on two rented (or collocated, I don’t honestly know) servers. The servers were running at loads of around 20, and could spike to well over 100 (that’s a lot.) It was obvious that we needed both some stop-gap fixes and a plan. The first thing we did was throw some caching servers in front of the service — a couple of varnish servers as I recall. This dropped the workload of the two boxes considerably, and allowed us to look at Gravatar without bringing the service down. Next we replicated the setup 1 for 1 to two of our own (more powerful) servers. This gave us a bit more breathing room. And we began to plan.
It was obvious, from the very beginning that the service was going to have to handle a constant torrent of requests from the internet. Most of those requests would be for email addresses with no Gravatar and come from URLs that could be crafted in an unlimited number of ways. On top of that we knew that we wanted to make all the paid features free, and expand the size a Gravatar could be from 80 pixels to 512 pixels. So basically instead of our goals being to make the undertaking less daunting we we’re actively making it a more intense challenge than it could have been. But that was OK with us, because our goals for Gravatar weren’t to make it easier but to make it better. We wanted to make Gravatar the kind of free service that we could use, would want to use, and would be proud to share with the world. I know that last bit sounds like marketing crap, but that’s really what we wanted to do and is really how we look at Gravatar.
Pretty much the next thing we did was port Gravatars code from RoR (Ruby on Rails) to PHP. As I mentioned when we announced this change the reason for this wasn’t about Ruby or Rails. Simply put we’re a PHP shop, and once rewritten in PHP we have many more great minds that we can easily throw at it than if it were still in RoR. Since we ported it *pretty much* directly from rails there are some left-over rails-isms in Gravatars code that you wont find in, say, WordPress. Shh…. Don’t tell Matt
In the rewriting we tried to tackle the largest scalability problems with the design of the service. You can imagine that for an avatar serving service… storing, searching, and serving avatars is paramount. Gravatar 2.0 (pre PHP) suffered from some pretty significant inefficiencies in this regard, and I think that a big part of that was limited resources (time and servers.) Luckily we we’re now not significantly limited by either of those things.
– warning beginning technical details which may be safely skipped over if you don’t care –
The way that images were stored originally was: a complete image was made for all sizes between 1×1 and 80×80 pixels, a directory made for each rating, and a symlink placed from the rating to the appropriate image (either the users image or the default image in case the rating was too high.) So that’s 80 images, 5 directories, and 240 symbolic links. The reason for this, I believe, was to attempt to serve the avatar content without any database interaction whatever. The files were then archived, uploaded to Amazon S3, and an entry added to Amazon SQS. Finally the SQS entry was retrieved by the serving server, the file downloaded, extracted, and placed on the filesystem. So this is why it took several minutes once you uploaded and cropped your image for you to be able to browse the rest of the site again. You can imagine how many files Gravatar was comprised of by the time we got a hold of it! We knew that this would simply NOT work for our new 512×512px avatar sizes. Lastly there were a couple of directories which had several hundred thousand entries (either files or other directories) which were nearly impossible to even get a listing inside of. So we had a list of things NOT to do. We just needed to figure out what TO do
So we decided that we would render all our avatars dynamically from the highest quality copy of the image we can manage… down. We would only store one version of the image, though we would store it in multiple places (a local file server for speed, and S3 for redundancy.) We would still rely heavily on caching. And we would asynchronize as much of the workload as was possible, so that you don’t have to wait for things to happen after you finish cropping (to do this we employed various techniques and hacks best left for another day and another story.)
– ok this batch of details has been concluded –
So the problems were many, one year ago, and the challenges were fascinating. I recall being overwhelmed by support requests for quite some time. I would get 40 emails on a good day, more on a bad. And believe it or not your emails very much shaped the future of Gravatar. I would group them into specific problems, and always fix at least the largest problem (volume wise) each week. Over time the service has grown quite stable, support requests have gone down to just a handful every day, and things are generally peppier than ever.
We had some some bumps tuning our caches… for a while there we accidentally told your web browsers never EVER to re-validate an image. But we got that handled in short order… and things are zipping along quite nicely.
Gravatar now lives on about 20 servers. 2 Database servers, 1 File server, 2 Load balancers, 5 Caching servers, 9 Web servers, and 1 Development server. That combination of servers is handling an average of 7,214 of your requests every second of every day. That’s a whopping 623,293,056 requests each and every day! 96% of all of those requests are served directly from cache. These days we get around 5,000 uploaded images every day. Even with this staggering increase in the number of requests we’ve been able to make Gravatar faster, and more reliable than it’s ever been.
So here we are, one year later, looking out over the vast frontier of the internet and contemplating the future of Gravatar. There are a great many things that it could become. We know that we don’t want to loose focus on the core of the project: Serving your avatars (that’s what it’s all about!)
We know that an avatar is “a graphical image that represents a person, as on the Internet,” But it’s also “an embodiment or personification, as of a principle, attitude, or view of life.” And that is exactly where we are headed: Making Gravatar a place where you can do more than just store an image, making it a place that can be your presence online. So we’ll be rolling out more features in the near future to allow you to store more data inside Gravatar — and more importantly to allow you to use that information in other places on the internet through open standards.
We hope that you’ve had as awesome a time using your Gravatars as we’ve had making it all work. And we look forward to the future — to when your identity doesn’t have to be cemented to a specific site, but is fluid and flexible, and persistent. We hope to see you there!
Cheers!
The Gravatar Team.
The next installation in the bbPress 1.0 alpha series has been released. bbPress 1.0 alpha 2 introduces new features and fixes most of the issues raised by testers from the previous release.
A lot of the features were covered in a previous post. You can view the changes in bbPress between 1.0-alpha-1 and 1.0-alpha-2, as well [...]
WP Super Cache version 0.8.3 is now available. WP Super Cache is a page caching plugin for WordPress that will significantly speed up your website.
Double Caching
This releases fixes a long standing compression bug. In older versions of the plugin, the cached page was compressed twice. Once to display to the current visitor, and once again for the cached files stored on the server. This has now been fixed and there’s a noticeable speed increase for anonymous visitors. Unfortunately as a side effect, it’s not possible to display the “super cache gz” html comment now. To verify that html pages are being served from the supercache directory you’ll have to add an error_log() somewhere and check that visits aren’t logged.
The plugin now uses fopen() instead of gzopen() which according to a comment on the gzopen() manual page is unreliable under high load.
IE7 Fixes
Apparently IE7 has problems when gzipped files are served as “x-gzip” files, under certain circumstances. This is an obscure bug but this has been fixed. If you’re upgrading, either remove wp-content/cache/.htaccess and visit the admin page and that file will be regenerated, or edit that file and change “x-gzip” to “gzip”.
A number of smaller bugs were also fixed. Check the changelog for further info.
Related Posts
Tags: plugin, release, server, test, Wordpress, wpWeblog Tools Collection: WordPress Plugin Releases for 10/06
110 Views Published 3 months ago in WordpressRaven’s antispam is a WordPress plugin, powerful and invisible fighter against comment spam.
This plugin shows you all active WP cronjobs (scheduled tasks) of your weblog in the “Site Admin” area and if you want, you can stop the cronjob(s)
FTP Plugin for WP Database Backup Plugin
This plugin adds a fourth way to save the database backup files of the WP Database Backup plugin. With the standard WP Database Backup plugin you can save the database tables of your weblog a file. This backup file can stored on the server of your weblog, send to an email account or saved (manually) to your local hard disk.
When you move WordPress to a new domain or directory, the permalinks are not updated. This plugin updates all permalinks. In addition, it also gives the user the option to update any links within posts and pages.
Allow your visitors to add articles to the sidebar or anywhere else. Complete with moderation panel and a settings page, you can sit back while you have full control about the look and articles that being posted.
Caption Disabler is a WordPress plugin that removes and disables captions feature in WordPress so that all caption shortcode is not been parsed or translated, and no and HTML entities are automatically added while editing or writing.
Add “reply” and “quote” features on each comment list.
Redirection is a WordPress plugin to manage 301 redirections, keep track of 404 errors, and generally tidy up any loose ends your site may have.
WP Double Opt-In List Management
This WordPress email list management plugin allows the visitors of your blog subscribe to your mailing list using a double opt-in method. The signup form (Email, Name and other fields) is placed on the WordPress blog sidebar. After a user fills in the form and clicks “Subscribe”, WP double opt-in plugin sends an email with the subscription confirmation link to the user.
Tags: database, features, manage, plugin, release, server, Wordpress, wpYoutube/Google Video Downloader for your Forum
215 Views Published 3 months, 1 week ago in vBulletin 3.7 Add-ons, vBulletin Add-onsvBulletin Project Tools 2.0.0 Released
155 Views Published 3 months, 1 week ago in News and Announcements, vBulletin.orgvBulletin Project Tools 2.0.0 Released
65 Views Published 3 months, 1 week ago in Announcements, vBulletin FansvBulletin Project Tools 2.0.0 Released
86 Views Published 3 months, 1 week ago in Announcements, vBulletin FansvBulletin Project Tools 2.0.0 Released
62 Views Published 3 months, 1 week ago in Announcements, vBulletin FansvBulletin Project Tools 2.0.0 Released
54 Views Published 3 months, 1 week ago in Announcements, vBulletin FansvBulletin Project Tools 2.0.0 Released
54 Views Published 3 months, 1 week ago in Announcements, vBulletin FansvBulletin Project Tools 2.0.0 Released
94 Views Published 3 months, 1 week ago in vBulletin Announcements, vBulletin.comWeblog Tools Collection: WordPress Plugin Releases for 09/28
146 Views Published 3 months, 1 week ago in WordpressG4B Photo Gallery is a free, flexible plugin for WordPress. It provides a simple and effective way to include a complete gallery anywhere on your site, just by typing in a keyword.
It will allow you to add avatars or gravatars of comment-authors to the comment-feeds of your WordPress-blog.
This is a plugin that brings the anti-spam power of Mollom to WordPress. WP-Mollom protects your website against comment and trackback spam. The difference with other spam services is that Mollom takes care of everything. The idea is to relieve you, the administrator, editor, maintainer,… of whatever moderation or clean up tasks you would normally need to perform in order to keep your blog spamfree.
This plugin will help you and your readers to keep you on track for reaching your targets. We created this wordpress plugin that monitors the various blog goals and in an effort tries to engage your readers more effectively.
The Brokers Edge developed this free plugin to provide website owners with true easy to manage easy to configure menu solution for WordPress or WordPress CMS sites.
WordPress Help Desk is a comprehensive integrated help desk and trouble ticketing system that helps site admin to support there users and resolve issues quickly. Users and support personnel can interact in real time to report, diagnose and resolve issues quickly and with as little pain ass possible.
Instead of making the user agree to the Terms of Use when they join the site this plugin makes them agree to the terms and conditions the first time they login.
Yet another AJAX paged comments
When the user navigate through the comments via page selector,only the comments area will be send to the client,not the full page.This actually save your server load and bandwidth thus making your blog faster and more responsive.
The JavaScript Pull-Quotes plugin is an add-on for WordPress that allows you to easily insert pull-quotes into your posts and pages.
Tags: comments, features, manage, plugin, release, server, Wordpress, wpSearch
Delve Deeper
You are currently browsing the The Staff Lounge weblog archives for .
Longer entries are truncated. Click the headline of an entry to read it in its entirety.Archives
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- September 2007
- August 2007
- July 2007
- May 2007
- April 2007
- March 2007
- January 2007
- October 2006
- September 2006
- August 2006
- October 2005
Categories
- Categories
- Announcements
- bbPress
- CinVin
- Development
- ExtremePixels
- Invision Power Board
- Meta
- MyBB
- News and Announcements
- Phorum
- phpBB
- Releases
- SEO vBulletin
- Simple Machines Forum
- Site Announcements
- The vB Geek
- Transverse Styles
- UseBB
- vBadvanced
- vBDrupal
- vBSEO
- vBSEO Announcements
- vBSkinworks
- vBStyles
- vBulletin 3.7 Add-ons
- vBulletin Add-ons
- vBulletin Announcements
- vBulletin Fans
- vBulletin Quick Tips and Customizations
- vBulletin SEO
- vBulletin Setup
- vBulletin Setup Announcements
- vBulletin Tips
- vBulletin.com
- vBulletin.org
- Wordpress
- YaBB
- YaBB Chat and Support Community/YaBB News and Announcem
Popular Resources
- Phorum-5.2.9a released (6 replies) - 13612 Views
- Phorum-5.2.8 final released (13 replies) - 6036 Views
- Phorum-5.2.9 released! Security Upgrade! (1 reply) - 3061 Views













