Another S3 outage
Amazon’s Simple Storage Service experienced a fairly hefty outage earlier this year in February and it looks like they’re up to it again as I write this post. As seen on the previous link, the S3 service has some great rates. It also happens to have an SLA which some people might be taking advantage of this time around.
The interesting thing is how I discovered this on a Sunday afternoon while doing some routine web browsing. Turns out I was shopping on a fairly big retailer’s website (officemax.com) only to find that the pages weren’t loading due to something hanging on a third party interaction with sb.sellpoint.com. Hmmm:
rwoodrum@slard:~$ host sb.sellpoint.net sb.sellpoint.net CNAME sb.sellpoint.net.s3.amazonaws.com sb.sellpoint.net.s3.amazonaws.com CNAME s3-directional-w.amazonaws.com s3-directional-w.amazonaws.com CNAME s3-2-w.amazonaws.com s3-2-w.amazonaws.com A 207.171.183.117
Interesting. So I went to my old job’s website www.avvo.com which, like many other web 2.0 companies, find the S3 service a good compromise to a complex media distribution mechanism. Having worked there and all, I also happened to know that they’re using S3 for media storage. No secret there. Sure enough, no images load causing the site to suffer on both performance and aesthetic fronts. Lame, Amazon, lame.
Somehow or another I noticed some time ago that Woot! was also using S3 for hosting their product images. That doesn’t appear to be the case anymore, however. Probably a wise move on their part.
According to the external AWS Service Health Dashboard, it looks like this problem has been going on for over 4 hours. That’s a pretty freakin’ long time. The only service I know which has outages longer than that in their production systems is aspone.com; a garbage third party exchange provider. Now, in no way shape or form am I comparing S3 (or any other AWS service for that matter) to a managed Exchange provider - that’d be a grave injustice - AWS is orders of magnitude more reliable.
I’ve heard from quite a few people previously employed by Amazon that their infrastructure reliability leaves much to be desired. There must be some grain of truth to all that insider knowledge and another S3 outage in the span of a few months is a pretty reliable indicator. More reliable than the service, anyway.
So sorry, OfficeMax, Amazon has prevented me from continuing to shop for tables on your site.
Update:
Official downtime? 09:05 PDT - 17:12 PDT - 8 hours 7 minutes
||= (or equal operator) in bash?
If you’re used to writing code in ruby, perl, or other languages that provide an ||= (or equal) type operator, you may someday find yourself wanting to do the same in a shell script. While this isn’t directly provided in bash, for example (at least not that I could find), you can emulate the same functionality.
The answer lies in using a little bit of of tomfoolery from the Advanced Bash Scripting Guide, specifically under the Parameter Substitution section.
The part we’re interested in at this point is the ability to use a default parameter. These constructs in bash look like so:
${parameter-default}
and
${parameter:-default}
Note that as pointed out in the documentation, the difference between the two is that the former will not evaluate if parameter is null whereas the latter will.
So just how do we accomplish something like:
$foo ||= $bar ||= $baz
Like so:
FOO=${FOO:-$BAR}
FOO=${FOO:-$BAZ}
FOO=${FOO:-foo}
So this short circuits just like the ||= type operator above. So say, for example, you wanted to spit out a diff of some code before confirmation of a submit or something. Ideally you want to fire up the diff program the user prefers. So why not do something like:
DIFF=${DIFF:-$MYOTHERDIFF}
DIFF=${DIFF:-diff}
In this example, we use what is in $DIFF first. If there’s nothing in $DIFF, we use $MYOTHERDIFF. Finally, if there is nothing in either, we use straight up diff. This way if certain diff variables are set to programs like gvimdiff, tkdiff, etc., they will be invoked.
Clearing konsole history with dcop
Here’s another quick tip for manipulating your Konsole sessions using DCOP. Need to clear the history buffer in an automated fashion for some reason? Use DCOP!
There are three steps to this endeavor:
- Find out the reference to the application.
- List the available methods (just so you know what’s available).
- Send your Konsole session a command!
Here’s an example:
rwoodrum@frums:~$ echo $KONSOLE_DCOP_SESSION DCOPRef(konsole-12065,session-1) rwoodrum@frums:~$ rwoodrum@frums:~$ dcop konsole-12065 session-1 QCStringList interfaces() QCStringList functions() bool closeSession() bool sendSignal(int signal) void clearHistory() void renameSession(QString name) QString sessionName() int sessionPID() QString schema() void setSchema(QString schema) QString encoding() void setEncoding(QString encoding) QString keytab() void setKeytab(QString keyboard) QSize size() void setSize(QSize size) rwoodrum@frums:~$ rwoodrum@frums:~$ dcop konsole-12065 session-1 clearHistory rwoodrum@frums:~$
Voila! History cleared.