External service dependencies can really screw over your site, but as an engineer, your job is to design around it.

Watch for dependencies on external services like ad serving networks or RSS feeds. If a service isn’t responding or can’t handle your growing request load, make sure that you have a fallback strategy.

This from a list of tips on Rails scaling from Engine Yard.

This is so true. If you ever make an external request, you should expect it to fail at some point in the future. You should test what happens when it's down. Make sure there's a recovery strategy so that your site doesn't fall over or block users.

Timeouts are a good way to handle this. It's better to slightly degrade service temporarily than to wait for minutes or hours for a service to return. Be able to clean up / recover once the service you were depending on returns.

This goes for everything from S3 (which is rarely down), to Twitter API (which is... down all the time.)

views