Archive for April, 2011

Lessons From a Cloud Failure: It’s Not Amazon, It’s You

Chaos Monkey will eat your cloud.

Amazon’s cloud-hosted Web Services experienced a catastrophic failure last week, knocking hundreds of sites off the web. Some developers saw the AWS outage as a warning about what happens when we rely too much on the cloud. But the real failure of Amazon’s downtime is not AWS, but the sites that use it.

The problem for those sites that were brought down by the AWS outage is the sites’ own failure to implement the one key design principle of the cloud: Design with failure in mind.

That’s not to say that Amazon didn’t fail rather spectacularly, taking out huge sites like Quora, Reddit, FourSquare and Everyblock, but as Paul Smith of Everyblock admits, while Amazon bears some of the responsibility, Everyblock failed as well:

Frankly, we screwed up. AWS explicitly advises that developers should design a site’s architecture so that it is resilient to occasional failures and outages such as what occurred yesterday, and we did not follow that advice

But perhaps the most instructive lesson comes from those sites that were not affected, notably Netflix, SimpleGeo and SmugMug. Netflix published a look at how it uses AWS last year and, by all appearances, those lessons served the company well, because Netflix remained unaffected by the recent failure.

Among Netflix’s suggestions is to always design for failure: “We’ve sometimes referred to the Netflix software architecture in AWS as our Rambo Architecture. Each system has to be able to succeed, no matter what, even all on its own.”

To ensure that each system can stand on its own, Netflix uses something it calls the Chaos Monkey (no relation). The Chaos Monkey is a set of scripts that run through Netflix’s AWS process and randomly shuts them down to ensure that the rest of the system is able to keep running. Think of it as a system where the parts are greater than the whole.

The photo sharing site SmugMug has also detailed its approach to designing for failure and why SmugMug was largely unaffected by the recent AWS outage. SmugMug co-founder and CEO Don MacAskill, echos Netflix’s redundancy mantra, writing, “Each component (EC2 instance, etc.) should be able to die without affecting the whole system as much as possible. Your product or design may make that hard or impossible to do 100 percent — but I promise large portions of your system can be designed that way.”

MacAskill also has strong words for those who think the recent AWS outage is a good argument for sticking with your own data center: “[SmugMug's] data-center related outages have all been far worse … we’re working hard to get our remaining services out of our control and into Amazon’s.”

“Cloud computing is just a tool,” writes MacAskill, “Some companies, like Netflix and SimpleGeo, likely understand the tool better.”

If you’d like to learn more about how designing for cloud services differs from traditional data-center setups, check out this excellent post on O’Reilly. Also, be sure to read Netflix’s advice and learn from Everyblock’s downtime by following the guidelines in Amazon’s own documentation.

Photo: Technically not a monkey. (DBoy/Flickr/CC)

See Also:

File Under: Multimedia, Web Services

Google Video Adds YouTube Export Option

Good news Google Video users, Google has given the video sharing site a reprieve. Early this month Google announced it would shut down Google Video’s hosting services on April 29. Now Google has abandoned that deadline and is offering a new option to export your movies directly to the company’s far more popular YouTube video hosting.

In a moment of candor Google has admitted that the lack of YouTube export option in the original announcement was a bad idea. “We … should have done better,” writes Mark Dochtermann, Engineering Manager at Google, on the YouTube blog.

To help smooth the transition, Google has created an “Upload Videos to YouTube” option on the Google Video status page. To migrate your videos you’ll need to have a YouTube account associated with your Google Video account. If you don’t head over to YouTube and set up an account using the same email address tied to your Google Video account.

There’s still one problem for some users though, the time restriction. If you’ve got longer videos on Google Video it’s unclear what happens when you try to migrate them to YouTube (which has a 15 minute limit on videos). Some users also report losing their upload time stamps in the migration.

Still, for most users this should be welcome news. Not only is there no need to panic about April 29th, moving your old Google Video movies into YouTube just became a whole lot easier.

See Also:

File Under: Identity, Security, Web Basics

EFF Wants to Secure the Web With “HTTPS Now” Campaign

The Electronic Frontier Foundation (EFF) has kicked off a new “HTTPS Now” campaign to educate consumers and help “make web surfing safer.”

The new campaign is a two part effort. First the EFF would like to encourage users to install the HTTPS Everywhere Firefox add-on, which will automatically redirect you to https connections. HTTPS Everywhere makes sure you’re always using a secure connection when you visit Gmail, Twitter and several dozen other sites; you don’t need to worry about checking the URL everytime you login.

While HTTPS Everywhere is a good suggestion for users, the primary thrust of the HTTPS Now campaign is aimed at popular websites. After all, HTTPS Everywhere only works if your favorite sites offer secure connections, and an alarming number of sites do not.

The EFF has partnered with Access, a digital freedom activist group, to create the new HTTPS Now website. The new site will keep track of which sites offer HTTPS connections, how much of the site is secure and whether or not the site mixes secure and insecure content.

Why all the fuss about HTTPS? Well, every time you log in to Twitter, Facebook or any other service that uses a plain HTTP connection, you expose your data to the world. It’s a bit like writing your username and password on a postcard and dropping it in the mailbox.

There is a better way, the secure version of HTTP — HTTPS. That extra “S” in the URL means your connection is secure, and it’s much harder for anyone else to see what you’re doing. Think of the extra “S” as the envelop that keeps prying eyes from looking at your postcards.

The problem gets a bit more complicated than just HTTPS though. Most sites already use HTTPS to handle your login info — that’s a good first step — but once you’re logged in the sites often revert back to using an insecure HTTP connection. That means you’re vulnerable to simple attacks like those made possible by the Firesheep Firefox plugin. Firesheep sniffs network traffic and looks for insecure cookies which it then uses to spoof your login credentials to the site. Firesheep allows other people to quickly and easily become you on the web.

So why doesn’t the entire web use HTTPS all the time? The answer is slightly complicated, but the primary reason is speed. HTTPS can’t be cached on CDN networks and there are also some (minor) costs involved with HTTPS certificates.

But obviously neither cost nor minor speed hits have stopped big sites like Twitter, Facebook, Gmail and Flickr from implementing HTTPS. The EFF would like to encourage other sites to follow suit.

If you’d like to see how your favorite sites fair when it comes to protecting your data from traffic snoops, head on over to the HTTPS Now website.

Photo: Joffley/Flickr/CC

See Also:

File Under: CSS, Web Standards

Speed Up Your Website With CSS 3

The drive behind the adoption of new web technologies often revolves around experimentation — developers use HTML5 or CSS 3 because it’s something new and exciting. That experimental drive is great for pushing boundaries and discovering cool new possibilities. But there’s another, more practical reason, to start using the newest features of the web, particularly in the case of CSS 3, which can make not only speed up your development time, but make your site faster as well.

Eliminating images in favor of CSS 3 transitions, web fonts and animations means fewer HTTP requests, fewer files for users to download and faster page loads. Examples include replacing rounded corner images with border-radius, ditching faux-shadow images for drop-shadow and replacing images of fancy fonts with the actual web fonts.

In some cases the fallbacks necessary for older browsers will negate the speed gain for those that aren’t using modern web browsers. You need to be aware of your audience and which browsers make up the majority of your site’s visitors before you jump in with both feet, but in those cases where newer browsers dominate, transitioning your site to CSS 3 can provide a significant speed boost.

Our friends at Smashing Magazine recently broke down the process by creating the same page twice, once using CSS 3, and then again using more traditional techniques like background images for buttons and rounded corners. The result is that CSS 3 not only sped up development time, but also made the page load faster in the browser.

Not convinced? Last year Google began using CSS 3 rules to render elements of the Gmail interface in those browsers that can handle CSS 3. The company reports that using CSS 3 sped up rendering times by 12 percent.

Naturally the speed gains possible by transitioning to CSS 3 will vary considerably depending on the design of your site and how well it lends itself to CSS 3′s new features. But even a tiny speed boost, combined with the great flexibility of CSS 3, the ability to build responsive websites and the ability to tweak designs without opening Photoshop, makes CSS 3 not only fun and experimental, but downright necessary.

See Also:

File Under: HTML5, Multimedia, Web Apps

YouTube Begins Serving Up Native WebM Video

YouTube has announced it will begin offering HTML5 videos in the WebM codec to web browsers that support it. So far YouTube says that it has encoded 30 percent of its videos in WebM, which accounts for 99 percent of all traffic to the site.

YouTube’s move to WebM is no surprise; Google has already dropped the competing H.264 codec from its Chrome web browser and it was only a matter of time before YouTube began moving to WebM as well.

The WebM Project, a partnership between Google, Mozilla, Opera and dozens of other software and hardware makers, provides web developers a way of embedding video and audio in HTML5 pages without plug-ins, and without the need to pay the expensive licensing fees that surround the competing H.264 codec. Currently WebM video works in Firefox 4, Chrome, Opera and Internet Explorer (via a plugin). The other main HTML5 video codec, H.264, works on all Apple devices and in Internet Explorer 9.

While YouTube is adding WebM support, it isn’t following Chrome’s lead and dropping H.264. The site will continue to serve up H.264 video to those browsers that support it (in other words, Safari, Mobile Safari and Internet Explorer 9).

Despite the new WebM support, YouTube still isn’t serving up HTML5 videos by default. If you’d like to get in on the new WebM fun, you’ll still need to sign up for the opt-in HTML5 player.

See Also: