<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" ><channel><title>Beachballin' &#187; Hardware</title> <atom:link href="http://cdslash.net/category/geekery/hardware/feed/" rel="self" type="application/rss+xml" /><link>http://cdslash.net</link> <description>A sysadmin/programmer/Mac geek blog</description> <lastBuildDate>Fri, 12 Feb 2010 21:34:07 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.1-alpha</generator> <item><title>The iPhone 3GS: How does it make you feel?</title><link>http://cdslash.net/2009/06/iphone-3gs-how-does-it-make-you-feel/</link> <comments>http://cdslash.net/2009/06/iphone-3gs-how-does-it-make-you-feel/#comments</comments> <pubDate>Thu, 25 Jun 2009 20:43:02 +0000</pubDate> <dc:creator>dan</dc:creator> <category><![CDATA[Geekery]]></category> <category><![CDATA[Hardware]]></category> <category><![CDATA[Musings]]></category> <category><![CDATA[feelings nothing more than feelings]]></category> <category><![CDATA[iphone]]></category> <category><![CDATA[iPhone 3GS]]></category> <category><![CDATA[Tweetie]]></category> <category><![CDATA[Twitterrific]]></category><guid isPermaLink="false">http://cdslash.net/?p=312</guid> <description><![CDATA[So I had a few days this week to play around with a new iPhone 3GS, courtesy of Tris Hussey and the fine folks at M2O Productions. I won&#8217;t bore you with beautiful macro photography, insipid &#8216;I&#8217;m making a video!&#8217; videos, or side-by-side speed comparisons, because those have all been done to death. If you]]></description> <content:encoded><![CDATA[<p>So I had a few days this week to play around with a new iPhone 3GS, courtesy of <a href="http://www.trishussey.com/" onclick="pageTracker._trackPageview('/outgoing/www.trishussey.com/?referer=');">Tris Hussey</a> and the fine folks at <a href="http://www.media2o.com/" onclick="pageTracker._trackPageview('/outgoing/www.media2o.com/?referer=');">M2O Productions</a>. I won&#8217;t bore you with <a href="http://www.flickr.com/photos/mezzoblue/sets/72157620157623916/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/mezzoblue/sets/72157620157623916/?referer=');">beautiful macro photography</a>, <a href="http://www.youtube.com/user/danudey" onclick="pageTracker._trackPageview('/outgoing/www.youtube.com/user/danudey?referer=');">insipid &#8216;I&#8217;m making a video!&#8217; videos</a>, or <a href="http://www.ilounge.com/index.php/news/comments/iphone-3g-s-speed-comparison-videos-posted/" onclick="pageTracker._trackPageview('/outgoing/www.ilounge.com/index.php/news/comments/iphone-3g-s-speed-comparison-videos-posted/?referer=');">side-by-side speed comparisons</a>, because those have all been done to death. If you want to see those (and they&#8217;re all worth seeing), go check out <a href="http://daringfireball.net/" onclick="pageTracker._trackPageview('/outgoing/daringfireball.net/?referer=');">Daring Fireball</a>. Gruber&#8217;s shared (<a href="http://daringfireball.net/linked/2009/06/19/benchmark-3g-3gs" onclick="pageTracker._trackPageview('/outgoing/daringfireball.net/linked/2009/06/19/benchmark-3g-3gs?referer=');">and created</a>) a half-dozen links by now, and there&#8217;s nothing more I can add. I&#8217;d rather talk about something less concrete – specifically, how the device feels.</p><p>It&#8217;s hard to come up with an analogy that everyone can appreciate and which fits well enough that it will help, but I&#8217;ll try. Consider the first time you saw a TV show or movie in HD – perhaps you bought an HDTV, perhaps you upgraded from digital cable to HD, or you bought a Blu-Ray or HD-DVD player. Maybe you just saw one at Best Buy playing your favourite summer blockbuster. You see what&#8217;s on the screen, and it&#8217;s still the same, really. It&#8217;s the same movie you&#8217;ve enjoyed in the past, the same TV shows you&#8217;ve always loved. The plot hasn&#8217;t changed, the writing isn&#8217;t any better. It&#8217;s quantitatively clearer, but that provides a qualitative improvement.</p><p>If you&#8217;re a gamer, the comparison is easy. Do you remember the first time you upgraded your video card to the latest and greatest? The frame rate increased, you get more texture quality, it&#8217;s smoother. There&#8217;s less jitter, scrolling and panning is smoother. You didn&#8217;t really notice it before, but now it feels better. It&#8217;s more natural, it flows better.</p><p>And that&#8217;s really the key. The iPhone isn&#8217;t <em>faster</em>, because &#8216;faster&#8217; doesn&#8217;t connote the right differences. The iPhone is more <em>fluid</em>. Moving from one application to another, or from one screen to the next, or scrolling around on a website or reading your e-mail, it <em>flows</em> better. It&#8217;s not just that the current iPhone is slow, it&#8217;s more that it breaks your stride.</p><p>Here&#8217;s another example. Let&#8217;s say you&#8217;ve got a room in your house with doors on two sides, directly opposite. On the other two sides, you have a couch and a TV, and in the middle, there&#8217;s a coffee table. Let&#8217;s also say you have to walk through this room to get from your bedroom to the kitchen, so it&#8217;s a trip you make fairly often. If you put your coffee table directly between the two doors, then every time you cross this room, you&#8217;ll have to go around it. It&#8217;s not a big deal, but it throws off your momentum. You&#8217;ll have to step to the side twice every time you go through the room. You&#8217;ll also have to go through the line of sight from the couch to the TV, so you might have to slow down if someone&#8217;s playing games or watching a movie, waiting for the perfect opportunity, and you&#8217;re more likely to bang your knee while going around it, maybe if you&#8217;re in a hurry or it&#8217;s dark.</p><p>Using the iPhone 3G now is a lot like that. There are a lot of situations now where the flow of action from one activity to the next is disrupted. The straight path from point A to point B has a detour in the middle, an obstacle, a delay, and it slows your momentum ever so slightly. Enough of these delays and it becomes subconsciously frustrating. The iPhone 3GS does away with that.</p><p>Now here&#8217;s the key, and here&#8217;s why it&#8217;s hard to quantify. You probably didn&#8217;t notice any of those delays. You go around that coffee table so often that you don&#8217;t even realize it&#8217;s there, but on a subconscious level, it bothers you. You don&#8217;t think to move the coffee table because you don&#8217;t realize it bothers you, but if you moved it a half a foot out of the way, you&#8217;d decrease your subconscious frustration ever so slightly, and you&#8217;d find yourself enjoying your home more (and you&#8217;d have fewer bruised shins to show for it).</p><p>I didn&#8217;t dislike <a href="http://iconfactory.com/software/twitterrific" onclick="pageTracker._trackPageview('/outgoing/iconfactory.com/software/twitterrific?referer=');">Twitterrific</a> on the iPhone, not really. It was ok, but not great. The UI was nice, but I just didn&#8217;t really care for it, preferring <a href="http://www.atebits.com/tweetie-mac/" onclick="pageTracker._trackPageview('/outgoing/www.atebits.com/tweetie-mac/?referer=');">Tweetie</a>. I couldn&#8217;t tell you why, I just didn&#8217;t like Twitterrific&#8217;s interface, or maybe it was the colours, or maybe it was just kind of convoluted to use. I don&#8217;t know why I didn&#8217;t care for it, but I didn&#8217;t.</p><p>Now, however, I know. Twitterrific wasn&#8217;t <em>slow</em>, you have to understand. I wasn&#8217;t sitting there, staring at loading screens or progress bars, waiting for it to accomplish the task I&#8217;d set it to. The real reason I didn&#8217;t care for Twitterrific was because there was some subtle, imperceptible lag when moving from one action to the next. I didn&#8217;t notice it consciously, but subconsciously it bothered me, it made me dislike the app for reasons I didn&#8217;t realize or understand. On the 3GS this week, I used Twitterrific exclusively. I didn&#8217;t try any other Twitter apps, and it didn&#8217;t occur to me to want to. Twitterrific was great, and I was happy to keep using it, because that unconscious frustration with minute waits and imperceptible lag was gone.</p><p>And that&#8217;s what it feels like to move from an iPhone 3G to a 3GS. It&#8217;s a more satisfying experience, a more enjoyable device, but not for reasons that you might think. It takes better pictures, but I don&#8217;t really care. It records video, but I don&#8217;t really care. It has faster data access, but I don&#8217;t really care. It has voice control, but I don&#8217;t really care.</p><p>The <em>real</em> difference between the iPhone 3G and 3GS isn&#8217;t something that you&#8217;re likely to notice unless you&#8217;re looking for it. You&#8217;ll enjoy the new phone for reasons that you can&#8217;t really explain, and when people ask why you paid an extra few hundred dollars for a not-so-different phone, you won&#8217;t regret it, but you won&#8217;t be able to defend your decision either, because you can&#8217;t reduce the experience to numbers.</p><p>It just <em>feels</em> better.</p> ]]></content:encoded> <wfw:commentRss>http://cdslash.net/2009/06/iphone-3gs-how-does-it-make-you-feel/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Fido and Rogers Tethering on iPhoneOS 3.0</title><link>http://cdslash.net/2009/06/fido-and-rogers-tethering-on-iphoneos-30/</link> <comments>http://cdslash.net/2009/06/fido-and-rogers-tethering-on-iphoneos-30/#comments</comments> <pubDate>Wed, 17 Jun 2009 17:53:44 +0000</pubDate> <dc:creator>dan</dc:creator> <category><![CDATA[Geekery]]></category> <category><![CDATA[Hardware]]></category> <category><![CDATA[Macintosh]]></category> <category><![CDATA[Whatever]]></category> <category><![CDATA[fido]]></category> <category><![CDATA[hacks]]></category> <category><![CDATA[iphone]]></category> <category><![CDATA[iphone 3g]]></category> <category><![CDATA[rogers]]></category> <category><![CDATA[setup]]></category> <category><![CDATA[tethering]]></category><guid isPermaLink="false">http://cdslash.net/?p=303</guid> <description><![CDATA[Update: As of iPhoneOS 3.1, the iPhone will not accept unsigned config files (unless you have jailbroken); as such, this file will no longer work. If you have installed it (or any similar file for other carriers, like AT&#38;T, T-Mobile, etc.) and upgraded to iPhoneOS 3.1 or 3.1.2, you will need to remove it. Open]]></description> <content:encoded><![CDATA[<p><strong><em>Update</em></strong><em>: As of iPhoneOS 3.1, the iPhone will not accept unsigned config files (unless you have jailbroken); as such, this file will no longer work. If you have installed it (or any similar file for other carriers, like AT&amp;T, T-Mobile, etc.) and upgraded to iPhoneOS 3.1 or 3.1.2, you will need to remove it. Open Settings &gt; General &gt; Profiles (at the bottom). Tap, then remove the profile you see there. Tethering should hopefully show up for you afterwards. I&#8217;ve preserved the rest of the entry for historical purposes, but it will no longer work on iPhone OS 3.1 or higher.</em><span id="more-303"></span></p><p>With the release of the iPhone 3.0 software, the iPhone 3G now has an interesting new feature – tethering. In order to do this in Canada on Rogers or Fido, you must have a 3G data plan of 1GB or higher and be using an iPhone 3G (or 3G S). You must also call Rogers or Fido and get them to enable the plan on your account.</p><p>There is another option – do it yourself. All it takes is a simple config file, and because I love you so much, I will now provide them to you at no extra charge.</p><p>Here are the simple steps to enabling tethering:</p><ol><li>Copy, e-mail, or text this URL to your phone: <a href="http://iphone.cdslash.net/" onclick="pageTracker._trackPageview('/outgoing/iphone.cdslash.net/?referer=');">iphone.cdslash.net</a></li><li>Visit the URL on your iPhone and choose Rogers or Fido</li><li>You will be asked whether you want to install the file or not. Tap Install.</li><li>Confirm that you want to install the file</li><li>After installation is finished, go to Settings &gt; General &gt; Network, and you should see the option for tethering appear.</li><li>Enable it, then connect over USB or pair via Bluetooth.</li></ol><p>That&#8217;s it. Then all you have to do is open Settings &gt; General &gt; Network and enable tethering, and you&#8217;re on your way. Plug in via USB or pair via Bluetooth and you&#8217;ll find tethering enabled and working.</p><p><em>(Credit where it&#8217;s due: I found these files at </em><a href="http://www.adammcnamara.com/2009/03/19/64/" onclick="pageTracker._trackPageview('/outgoing/www.adammcnamara.com/2009/03/19/64/?referer=');"><em>Adam McNamara&#8217;s blog post</em></a><em> on the topic)</em></p><p><strong>Update</strong>: If you install and something goes wrong, or if you change your mind or whatever, you can uninstall the profile and revert back to the default like so:</p><ol><li>Open Settings &gt; General &gt; Profiles</li><li>On this page, you&#8217;ll see a heading of &#8216;Configuration Profiles&#8217;, under which should be the update you&#8217;ve installed either fido_com or rogers_com. Just tap on that to see more details about it (the same screen you were provided when you installed it).</li><li>Tap &#8216;Remove&#8217;. This will remove the provisioning profile from your iPhone, which will revert the changes made.</li><li>Done!</li></ol><p><strong>Update 2</strong>: This seems to have enabled MMS on Fido as well – MMS wasn&#8217;t working for me until I installed this update (but tethering was working fine!) so if MMS isn&#8217;t working for you, you can try this too, even if you don&#8217;t want to tether your iPhone.</p><p><strong>Update 3</strong>: If you are getting the message &#8220;to enable tethering on this account contact rogers&#8221; from your iPhone, then you&#8217;ve come to the right place. Going through these steps will fix it.</p><p><strong>Update 4</strong>: Some people have reported problems with Visual Voicemail. Users affected can&#8217;t fetch messages or change their greeting. To see if you&#8217;re affected, open your voicemail and try to play back your greeting. If it sits and spins for a few seconds, you&#8217;re affected.Thanks to a tip from @<a href="http://twitter.com/andrewe" onclick="pageTracker._trackPageview('/outgoing/twitter.com/andrewe?referer=');">andrewe</a>, I&#8217;ve fixed the config files. You&#8217;ll need to first remove the old ones, then install the new ones.</p><p>To uninstall, go to General &gt; Profiles, tap the profile, and remove it. After that&#8217;s done, go back to the page and re-download for your carrier, and Visual Voicemail should work again.</p> ]]></content:encoded> <wfw:commentRss>http://cdslash.net/2009/06/fido-and-rogers-tethering-on-iphoneos-30/feed/</wfw:commentRss> <slash:comments>35</slash:comments> </item> <item><title>Fantasy Cricket: Initial Migration (Part 1)</title><link>http://cdslash.net/2009/05/fantasy-cricket-initial-migration-part-1/</link> <comments>http://cdslash.net/2009/05/fantasy-cricket-initial-migration-part-1/#comments</comments> <pubDate>Wed, 20 May 2009 20:54:44 +0000</pubDate> <dc:creator>dan</dc:creator> <category><![CDATA[Geekery]]></category> <category><![CDATA[Hardware]]></category> <category><![CDATA[Interblogs]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[cloud servers]]></category> <category><![CDATA[cricket.com]]></category> <category><![CDATA[dns]]></category> <category><![CDATA[fantasy cricket]]></category> <category><![CDATA[mod_rails]]></category> <category><![CDATA[mosso]]></category> <category><![CDATA[mysql]]></category><guid isPermaLink="false">http://cdslash.net/?p=291</guid> <description><![CDATA[We&#8217;ve recently migrated cricket.com&#8217;s Fantasy Cricket application from a single server running at ServerBeach to a multi-server cluster running on Mosso&#8216;s Cloud Servers system. In an attempt to document the problems we&#8217;ve had and the solutions we&#8217;ve found, I&#8217;ve decided to write down my thoughts and memories, and the processes we went through, in the]]></description> <content:encoded><![CDATA[<p><em>We&#8217;ve recently migrated cricket.com&#8217;s <a href="http://fantasy.cricket.com/" onclick="pageTracker._trackPageview('/outgoing/fantasy.cricket.com/?referer=');">Fantasy Cricket</a> application from a single server running at <a href="http://www.serverbeach.com/" onclick="pageTracker._trackPageview('/outgoing/www.serverbeach.com/?referer=');">ServerBeach</a> to a multi-server cluster running on <a href="http://www.mosso.com/" onclick="pageTracker._trackPageview('/outgoing/www.mosso.com/?referer=');">Mosso</a>&#8216;s <a href="http://www.mosso.com/cloudservers.jsp" onclick="pageTracker._trackPageview('/outgoing/www.mosso.com/cloudservers.jsp?referer=');">Cloud Servers</a> system. In an attempt to document the problems we&#8217;ve had and the solutions we&#8217;ve found, I&#8217;ve decided to write down my thoughts and memories, and the processes we went through, in the hopes that it will help others.</em></p><h3>Atomic Migrations</h3><p>The actual act of copying the data from one server to another is simple. It’s not difficult to take a point-in-time snapshot of a Rails app and move it to another server. The difficult part, when dealing with a dynamic website, is keeping the two servers in sync.</p><p>Because of DNS propagation issues, you will continue to have clients hitting the old server while some users start hitting the new server as well. This can cause concurrency issues; if a user is hitting the old server, then they may make modifications to their account (or in our case, modifications to their team) that will not show up on the new site once their DNS changes. This can be a pretty big issue, and we came up with a pretty useful method of dealing with the issue that eliminates concurrency issues with minimal impact on the users.</p><h3>Testing the Server</h3><p>The first step was to copy the app over and get it &#8216;working&#8217;. To do this, we used a dump of the MySQL database, using the mysqldump utility included with MySQL. We got the app up and working, tested it, and made sure that it was going to work properly (i.e. all Ruby gems were installed, etc.). Next we took a fresh dump of the database using the &#8211;master-data option to mysqldump, which includes the information necessary to set up a replication slave.</p><h3>MySQL Replication</h3><p>MySQL provides realtime replication between two servers, and it&#8217;s pretty simple to set up. Setting up MySQL replication between the two servers required briefly opening MySQL to the outside world (having it listen on port 3306), but we used iptables firewalling rules to ensure that no one else could connect. Once replication was set up, we knew that the new server would be an exact replica of the old server. The application was working, the database was identical, and so on. Any changes happening on the old server would happen instantly on the new server.</p><p>MySQL provides functionality called multi-master replication, which allows two servers to be written to, and have them push their changes back and forth between two servers. While I&#8217;ve set this up and used it in the past, it&#8217;s more complicated to set up and can be a pain to maintain. If replication fails in one direction, you can get inconsistent results between the two. For this reason, we wanted to ensure all of our traffic would switch over all at once – an atomic migration. Either all traffic hits the new site, or all traffic hits the old site. This is where Apache comes in.</p><h3>Apache&#8217;s mod_proxy</h3><p>We use Apache to run our websites, including our rails applications (using Passenger&#8217;s mod_rails). The solution we came up with was to make use of Apache&#8217;s built-in modules to ease our transition. We set up two config files, the original (which we had already) and a new configuration that, instead of serving pages, proxied all traffic to the secondary server. In essence, all traffic to the old site was transparently proxied to the new server, and the responses were proxied back. This is the config snippet we used:</p> <script src="http://gist.github.com/115079.js" type="text/javascript"></script> <p>This had two benefits: first of all, it was instantaneous and atomic – all users would see traffic from the same server, either the old one or the new one. We wouldn&#8217;t have any frustrating situations where one user would hit the old server and another user would hit the new one. Secondly, it&#8217;s quick and easy. If there were problems on the new server that we hadn&#8217;t forseen, it would be easy for us to switch everything back to the old server (by swapping out the config files again).</p><h3>The Changeover</h3><p>In order to ensure we didn&#8217;t run into any collisions with replication, our solution was to stop Apache entirely for a second, then bring it back online with the new config. This ensured that if there was any latency between the master (old) and slave (new) servers, it would catch up in the second that we were down. After we made the change, we checked, and the site was up and running. Users were all logged out, but beyond that the experience was largely smooth. Once we knew the server was working, we changed the DNS to point to the new server, and the changeover had finished. We were live on our new (virtual) server.</p><p><em>In Part 2, I plan to discuss the initial scaling issues we found, as we tried to learn the bounds of Mosso&#8217;s virtual servers, and of our own application and server design.</em></p> ]]></content:encoded> <wfw:commentRss>http://cdslash.net/2009/05/fantasy-cricket-initial-migration-part-1/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Scaling clouds: more, not bigger</title><link>http://cdslash.net/2009/04/scaling-clouds-more-not-bigger/</link> <comments>http://cdslash.net/2009/04/scaling-clouds-more-not-bigger/#comments</comments> <pubDate>Mon, 27 Apr 2009 18:50:27 +0000</pubDate> <dc:creator>dan</dc:creator> <category><![CDATA[Geekery]]></category> <category><![CDATA[Hardware]]></category> <category><![CDATA[Interblogs]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[cloud servers]]></category> <category><![CDATA[finally I can sleep at night]]></category> <category><![CDATA[head in the clouds]]></category> <category><![CDATA[I've looked at clouds from both sides now]]></category> <category><![CDATA[mosso]]></category> <category><![CDATA[scalability]]></category> <category><![CDATA[serverbeach]]></category><guid isPermaLink="false">http://cdslash.net/?p=286</guid> <description><![CDATA[Scalability is a problem. It always has been. The solution in the past has always been either to buy more servers to cope with your peak load (at great expense), or to… I dunno. Crash, I guess. Or go broke. Or lose all your users. Scalability is a pain because you&#8217;ve got all manner of]]></description> <content:encoded><![CDATA[<p>Scalability is a problem. It always has been. The solution in the past has always been either to buy more servers to cope with your peak load (at great expense), or to… I dunno. Crash, I guess. Or go broke. Or lose all your users. Scalability is a pain because you&#8217;ve got all manner of bottlenecks; I/O system, memory, and CPU are generally your big evildoers, and building a system that can handle all of those issues at once is like trying to build a building that is both the tallest, widest, and most expensive – complicated, and… expensive.</p><p>Ok, the similes suck, I get it. I&#8217;ll stop.</p><p>Enter The Cloud™. The great thing about The Cloud™ is that it&#8217;s all a nebulous, formless void, allowing you to create light and form from nothingness – in this case, servers. Let me explain.</p><p>In The Cloud™, you don&#8217;t buy a server then upgrade it later. You rent an abstraction of a server from people that (presmuably) have bought thousands of servers, each of which is more expensive than my house, and combined them together into a giant cluster of ultimate power. You rent a little space on this giant cluster and bend it to your will.</p><p>One of the domains my company owns is <a href="http://www.cricket.com/" onclick="pageTracker._trackPageview('/outgoing/www.cricket.com/?referer=');">Cricket.com</a>, for which we also have an associated <a href="http://fantasy.cricket.com/" onclick="pageTracker._trackPageview('/outgoing/fantasy.cricket.com/?referer=');">fantasy sports league thing</a>. Now, you&#8217;ll be forgiven if you don&#8217;t know anything about the game, because god knows I don&#8217;t. In fact, the only thing I know about Cricket is that they&#8217;re bigger fans of it in India than they are of housing, money, and oxygen combined. People from India are fanatical about the game, and so when the <a href="http://www.iplt20.com/" onclick="pageTracker._trackPageview('/outgoing/www.iplt20.com/?referer=');">Indian Premier League </a>(of Cricket; like the MLB or NHL or MBA or whatever) started up this year and we were providing the only officially licensed online fantasy sportsbook kind of game, we got some traffic.</p><p>Lots. Lots of traffic.</p><p>We had previously had the site running on a server at <a href="http://www.serverbeach.com/" onclick="pageTracker._trackPageview('/outgoing/www.serverbeach.com/?referer=');">Serverbeach</a> (a Peer1 company), which was fine, but it was underpowered because I had specced it out for what we needed at the time, and not for an entire subcontinent hitting the server all at once, which is what started happening this week. Which sucked. The site is running on <a href="http://rubyonrails.org/" onclick="pageTracker._trackPageview('/outgoing/rubyonrails.org/?referer=');">Ruby on Rails</a>, using <a href="http://www.mysql.com/" onclick="pageTracker._trackPageview('/outgoing/www.mysql.com/?referer=');">MySQL</a>, memcached, and duct tape, and was running well until the IPL started.</p><p>The site started getting pretty slow, and so I thought hey, let&#8217;s stick it in the cloud and that&#8217;ll make everything better. Brian and I, harnessing the power of the free snacks the company stocks the kitchen with, migrated the server over to a roughly equivalent machine at <a href="http://www.mosso.com/" onclick="pageTracker._trackPageview('/outgoing/www.mosso.com/?referer=');">Mosso</a>, which is where things start to fall apart. Not because of Mosso, per se, but because we were getting dramatically more traffic than we were planning for. Still, the timing was kind of conspicuous, and we needed to update. Upgrading the machine from a 4GB machine to 8GB provided almost no increase in performance whatsoever, and we began to become concerned.</p><p>Our first step was to fork services off. Until then, the entire site had been running on one server; we added a second server at Mosso just to run MySQL, and that provided some benefit, but nothing on the scale we needed. Enough to hobble along, but not enough long-term. That was when we decided to evolve in a different direction – horizontally.</p><p>Vertical scaling involves growing up – you have a server, you make it bigger. More memory, more CPU, more disk, and so on. Horizontal scaling involves growing *out* – more smaller servers instead of one large server. Building a cluster on Rackspace&#8217;s cluster seemed like the next logical step, and that&#8217;s what we did.</p><p>What we&#8217;ve ended up with is a database server, three web servers, and a load balancer in front of them. This solution is more scalable, and also seems to perform better. How much better? Enjoy some graphs!</p><div id="attachment_287" class="wp-caption alignnone" style="width: 505px"><img class="size-full wp-image-287" title="fantasy2-dead" src="http://cdslash.net/wp-content/uploads/2009/04/fantasy2-dead.png" alt="fantasy.cricket.com would die at around 30 accesses/second" width="495" height="271" /><p class="wp-caption-text">fantasy.cricket.com would die at around 30 accesses/second</p></div><p>This graph shows the apache &#8216;accesses per second&#8217; for our old (8GB) server. As you can see load would rise to about 30 requests per second, after which point the server would be so overloaded that we could no longer get statistics out of it. We would still be serving pages, but only about 30 of them per second, and they would be slow – anywhere from 5-30 seconds per page load. Unacceptable. We would only start to get more data back from the server once load dropped below 30 accesses per second. This was obviously unacceptable.</p><div id="attachment_288" class="wp-caption alignnone" style="width: 505px"><img class="size-full wp-image-288" title="fantasyweb1-alive" src="http://cdslash.net/wp-content/uploads/2009/04/fantasyweb1-alive.png" alt="One of our current servers, showing a marked increase in capacity" width="495" height="271" /><p class="wp-caption-text">One of our current servers, showing a marked increase in capacity</p></div><p>This graph shows the same data as above, but for one of our cluster&#8217;s web servers. The other servers show nearly identical usage, so the real numbers are three times what you see here. You can see that during peak hours, we average around 15-18 accesses per second on this server. The statistics for the other two servers are similar, giving us around 45-55 accesses/sec total, and with very little latency. Whereas before we were <em>dying</em> at 30 accesses/sec, we&#8217;re currently <em>averaging</em> that throughout the whole day.</p><p>Think about that. We&#8217;re using the same software and configuration, using the same amount of total memory, and paying about the same, but we can now handle half again the load as before, and we&#8217;re spiking to <em>three times our previous maximum load</em>.</p><p>The moral of the story? If you&#8217;re going to move into the cloud, especially somewhere like Mosso, you have to be willing to re-think your architecture. The old plan of &#8216;bigger servers&#8217; just doesn&#8217;t work – or at least, it didn&#8217;t for us – but now, for about the same price, we can handle up to three times our previous maximum load without any trouble at all.</p><p>We won&#8217;t know what our maximum is until we hit it, but I have a sneaking suspicion that it&#8217;ll be a while before that happens, if at all. Until then. I&#8217;m going to enjoy sleeping through the night without Pingdom whispering sweet nothings into my phone at 3 AM.</p> ]]></content:encoded> <wfw:commentRss>http://cdslash.net/2009/04/scaling-clouds-more-not-bigger/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Possibly the funniest blog post ever</title><link>http://cdslash.net/2008/12/funniest-blog-post-ever/</link> <comments>http://cdslash.net/2008/12/funniest-blog-post-ever/#comments</comments> <pubDate>Wed, 03 Dec 2008 19:20:00 +0000</pubDate> <dc:creator>dan</dc:creator> <category><![CDATA[Geekery]]></category> <category><![CDATA[Hardware]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Whatever]]></category><guid isPermaLink="false">http://cdslash.net/?p=82</guid> <description><![CDATA[Hilarious take on The Blogess&#8217;s Android experience. Jenny: Wait. This thing doesn’t have a positronic brain. Just a bunch of wires. Also, it’s very hard to take apart. Jenny: This phone is not waterproof and does not float at all. If you are lol-inclined, this will lol you.]]></description> <content:encoded><![CDATA[<p>Hilarious take on <a href="http://thebloggess.com/?p=682" onclick="pageTracker._trackPageview('/outgoing/thebloggess.com/?p=682&amp;referer=');">The Blogess&#8217;s Android experience</a>.</p><blockquote><p><em><strong>Jenny:</strong> Wait. This thing doesn’t have a positronic brain. Just a bunch of wires. Also, it’s very hard to take apart.</em><br /> <em><strong>Jenny:</strong> This phone is not waterproof and does not float at all.</em></p></blockquote><p>If you are lol-inclined, this will lol you.</p> ]]></content:encoded> <wfw:commentRss>http://cdslash.net/2008/12/funniest-blog-post-ever/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using memcached
Page Caching using memcached (user agent is rejected)
Database Caching 4/13 queries in 0.000 seconds using memcached

Served from: cdslash.net @ 2010-09-10 11:39:12 -->