<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>The Codebelay Blog</title>
	
	<link>http://www.codebelay.com/blog</link>
	<description>A Journal of Software That Makes Coding Safer and Easier to Manage</description>
	<lastBuildDate>Wed, 11 Nov 2009 23:04:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/codebelay" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Notes on adding more MySQL databases</title>
		<link>http://www.codebelay.com/blog/2009/11/10/notes-on-adding-more-mysql-databases/</link>
		<comments>http://www.codebelay.com/blog/2009/11/10/notes-on-adding-more-mysql-databases/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 23:56:04 +0000</pubDate>
		<dc:creator>barce</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[WebApps]]></category>
		<category><![CDATA[scalability hacking]]></category>

		<guid isPermaLink="false">http://www.codebelay.com/blog/?p=665</guid>
		<description><![CDATA[Just notes for myself on adding more MySQL databases without shutting down the master database.
on existing slave:

/etc/init.d/mysqld stop

copy data dir from /var/lib/mysql and data from /var/run/mysqld to new slave database:

cd /var/lib
tar cvf Mysql_slave.tar mysql/*
scp Mysql_slave.tar root@new-db.com:/var/lib/.
cd /var/run
tar cvf Mysqld_slave.tar mysqld/*
scp Mysqld_slave.tar mysqld/*
scp Mysqld_slave.tar root@new-db.com:/var/run/.

copy /etc/my.cnf from old slave to new slave
add entry for new server-id
start [...]]]></description>
			<content:encoded><![CDATA[<p>Just notes for myself on adding more MySQL databases without shutting down the master database.</p>
<p>on existing slave:</p>
<div style="border: 1px solid #fff; background: #000; color: #fff; padding: 5px 5px 5px 5px;">
/etc/init.d/mysqld stop
</div>
<p>copy data dir from /var/lib/mysql and data from /var/run/mysqld to new slave database:</p>
<div style="border: 1px solid #fff; background: #000; color: #fff; padding: 5px 5px 5px 5px;">
cd /var/lib<br />
tar cvf Mysql_slave.tar mysql/*<br />
scp Mysql_slave.tar root@new-db.com:/var/lib/.<br />
cd /var/run<br />
tar cvf Mysqld_slave.tar mysqld/*<br />
scp Mysqld_slave.tar mysqld/*<br />
scp Mysqld_slave.tar root@new-db.com:/var/run/.
</div>
<p>copy /etc/my.cnf from old slave to new slave<br />
add entry for new server-id</p>
<p>start existing slave:</p>
<div style="border: 1px solid #fff; background: #000; color: #fff; padding: 5px 5px 5px 5px;">
cd /var/lib<br />
tar xvf Mysql_slave.tar<br />
cd /var/run<br />
tar xvf Mysqld_slave.tar<br />
/etc/init.d/mysqld start
</div>
<p>start new slave:</p>
<div style="border: 1px solid #fff; background: #000; color: #fff; padding: 5px 5px 5px 5px;">
/etc/init.d/mysqld start<br />
mysql<br />
start slave;
</div>
<p>on masterdb:<br />
e.g.:</p>
<div style="border: 1px solid #fff; background: #000; color: #fff; padding: 5px 5px 5px 5px;">
grant replication slave on *.* to &#8216;repl&#8217;@'192.168.107.33&#8242; identified by &#8216;password&#8217;;
</div>
<p>test on master:<br />
create database repl;</p>
<p>check on slave:<br />
show databases; /* should show new database */</p>
<p>test on master:<br />
drop database repl;</p>
<p>check on slave:<br />
show databases; /* new database should be dropped */</p>
<p>Now it&#8217;s time to turn this into an automated shell script with <a href="http://expect.nist.gov/">Expect</a> in there.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codebelay.com/blog/2009/11/10/notes-on-adding-more-mysql-databases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Part II: Getting to 600 Concurrent Users</title>
		<link>http://www.codebelay.com/blog/2009/11/08/part-ii-getting-to-600-concurrent-users/</link>
		<comments>http://www.codebelay.com/blog/2009/11/08/part-ii-getting-to-600-concurrent-users/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 18:42:57 +0000</pubDate>
		<dc:creator>barce</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[scalability hacking]]></category>

		<guid isPermaLink="false">http://www.codebelay.com/blog/?p=658</guid>
		<description><![CDATA[I couldn&#8217;t sleep last night. I&#8217;m worried we&#8217;ll lose this client.
So just to be clear. I wasn&#8217;t part of the crew responsible for scaling this site. I had already set up a scalable architecture for the site, that would automatically and horizontally scale at Amazon. That idea got shot down for legal reasons that to [...]]]></description>
			<content:encoded><![CDATA[<p>I couldn&#8217;t sleep last night. I&#8217;m worried we&#8217;ll lose this client.</p>
<p>So just to be clear. I wasn&#8217;t part of the crew responsible for scaling this site. I had already set up a scalable architecture for the site, that would <a href="http://aws.amazon.com/autoscaling/">automatically and horizontally scale at Amazon</a>. That idea got shot down for legal reasons that to my surprise haven&#8217;t been in play for awhile. Can we say, &#8220;Office politics?&#8221;</p>
<p>I totally recommend Amazon&#8217;s Autoscaling to anybody that&#8217;s new to this.</p>
<p>Instead of auto-scaling, the site was architected by a local San Francisco firm who I won&#8217;t mention here.</p>
<p>Let&#8217;s just hope enough people read this so that they won&#8217;t even have to know the name of the company and will just know the smell of an un-scaleable architecture.</p>
<p>Scalability requirement: 100,000 concurrent users</p>
<p>This is how they set it up:</p>
<ul>
<li>two web servers
<li>one database
<li>four video transcoders that hits the master database
<li>one more app server that hits the master database
<li>no slave db <img src='http://www.codebelay.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' />
</ul>
<p>If they had even <a href="http://www.google.com/search?hl=en&#038;client=safari&#038;rls=en&#038;q=building+scalabe+websites&#038;aq=f&#038;oq=&#038;aqi=">googled &#8216;building scalable websites&#8217;</a> they would have come across a book that would have avoided all of this, <a href="http://www.amazon.com/Building-Scalable-Web-Sites-applications/dp/0596102356">Cal Henderson&#8217;s Building Scalable Websites</a>. It should be mandatory reading for anybody working on a large website, and it just scratches the surface.</p>
<p>So, how did we get to 600 concurrent users?</p>
<p>We tweaked mysql by putting this in /etc/m.cnf:</p>
<div style="color: #fff; background: #000; border: 1px solid #000; padding 5px 5px 5px 5px">
[mysqld]<br />
max_connections=10000<br />
query_cache_size=50000000<br />
thread_cache_size=16<br />
thread_concurrency=16 # only works on Solaris and is ignored on other OSes
</div>
<p>We ran siege and were able to get to about 300 concurrent users without breaking a sweat, but now apache was dying.</p>
<p>So we tweaked apache. We started out with this:</p>
<p>StartServers       8<br />
MinSpareServers    5<br />
MaxSpareServers   20<br />
ServerLimit      256<br />
MaxClients       256<br />
MaxRequestsPerChild  4000</p>
<p>And ended up with this:</p>
<div style="color: #fff; background: #000; border: 1px solid #000; padding 5px 5px 5px 5px">
StartServers       150<br />
MinSpareServers    50<br />
MaxSpareServers   200<br />
ServerLimit      256<br />
MaxClients       256<br />
MaxRequestsPerChild  4000
</div>
<p>RAM and CPU were doubled.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codebelay.com/blog/2009/11/08/part-ii-getting-to-600-concurrent-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scaling from 100 to 100000 concurrent users in a day?</title>
		<link>http://www.codebelay.com/blog/2009/11/06/scaling-from-100-to-100000-concurrent-users-in-a-day/</link>
		<comments>http://www.codebelay.com/blog/2009/11/06/scaling-from-100-to-100000-concurrent-users-in-a-day/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 18:21:44 +0000</pubDate>
		<dc:creator>barce</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[scalability hacking]]></category>

		<guid isPermaLink="false">http://www.codebelay.com/blog/?p=655</guid>
		<description><![CDATA[Well, it looks pretty bad right now. A vendor just ceded control for web application architecture. Initial tests say that the site won&#8217;t do no more 100 users concurrently.
Who the hell makes a web app without a slave database and calls themselves website architects? Apparently these guys did.
Please start following if you want to see [...]]]></description>
			<content:encoded><![CDATA[<p>Well, it looks pretty bad right now. A vendor just ceded control for web application architecture. Initial tests say that the site won&#8217;t do no more 100 users concurrently.</p>
<p>Who the hell makes a web app without a slave database and calls themselves website architects? Apparently these guys did.</p>
<p>Please start following if you want to see if this web app can make it to launch.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codebelay.com/blog/2009/11/06/scaling-from-100-to-100000-concurrent-users-in-a-day/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>App Identifier and Bundle Identifier Gotcha in iPhone Dev</title>
		<link>http://www.codebelay.com/blog/2009/10/11/app-identifier-and-bundle-identifier-gotcha-in-iphone-dev/</link>
		<comments>http://www.codebelay.com/blog/2009/10/11/app-identifier-and-bundle-identifier-gotcha-in-iphone-dev/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 06:52:19 +0000</pubDate>
		<dc:creator>barce</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[iPhone Dev]]></category>

		<guid isPermaLink="false">http://www.codebelay.com/blog/?p=652</guid>
		<description><![CDATA[This is one of those things they don&#8217;t mention in the docs.
When you create a provisioning profile for an iPhone app you get an app identifier. It looks like this:
KED2IOCNA.com.codebelay.barceftw
In order to get your iPhone app in development into your iPhone you got to have a bundle identifier. The docs that I&#8217;ve found so far [...]]]></description>
			<content:encoded><![CDATA[<p>This is one of those things they don&#8217;t mention in the docs.</p>
<p>When you create a provisioning profile for an iPhone app you get an app identifier. It looks like this:<br />
KED2IOCNA.com.codebelay.barceftw</p>
<p>In order to get your iPhone app in development into your iPhone you got to have a bundle identifier. The docs that I&#8217;ve found so far tell you that your bundle identifier is the same as your app identifier. After struggling for close to 4 hours, I found out that your bundle identifier really is:<br />
com.codebelay.barceftw</p>
<p>Just strip out the encrypted looking part and the dot (.) before com and you&#8217;re set.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codebelay.com/blog/2009/10/11/app-identifier-and-bundle-identifier-gotcha-in-iphone-dev/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Social Media Backup – What are the options now?</title>
		<link>http://www.codebelay.com/blog/2009/10/04/social-media-backup-what-are-the-options-now/</link>
		<comments>http://www.codebelay.com/blog/2009/10/04/social-media-backup-what-are-the-options-now/#comments</comments>
		<pubDate>Sun, 04 Oct 2009 17:13:57 +0000</pubDate>
		<dc:creator>barce</dc:creator>
				<category><![CDATA[Social Media]]></category>
		<category><![CDATA[TechBiz]]></category>
		<category><![CDATA[WebApps]]></category>

		<guid isPermaLink="false">http://www.codebelay.com/blog/?p=643</guid>
		<description><![CDATA[Bad things happen:

Dear Twitter,
My Twitter page @mostlylisa has been hacked and deleted. It&#8217;s GONE!!! I am currently catatonic. Please help me restore my account, it&#8217;s like, my meaning in life.
Much love to whom ever helps me!
PS. If you miss me like I miss you, you can always be my Friend OR Fan on Facebook. I [...]]]></description>
			<content:encoded><![CDATA[<p>Bad things happen:</p>
<div style="border: 1px solid #000; padding: 5px 5px 5px 5px;">
Dear Twitter,</p>
<p>My Twitter page <a href="http://twitter.com/mostlylisa">@mostlylisa</a> has been hacked and deleted. It&#8217;s GONE!!! I am currently catatonic. Please help me restore my account, it&#8217;s like, my meaning in life.</p>
<p>Much love to whom ever helps me!</p>
<p>PS. If you miss me like I miss you, you can always be my Friend OR Fan on Facebook. I know it&#8217;s not the same, but it&#8217;s all I have now. *hold me*
</p></div>
<p>It only took twitter about 3 days to recover from this.</p>
<p><a href="http://twitter.com/djsteen/statuses/4599867733" border="0"><img src="http://www.codebelay.com/blog/wp-content/uploads/2009/10/djsteen.png" alt="djsteen" title="djsteen" width="534" height="166" class="aligncenter size-full wp-image-644" /></a></p>
<p>Is there a faster way?</p>
<p>First let&#8217;s look at the current options:</p>
<ul>
<li><a href="http://tweetbackup.com/">TweetBackup</a> (<a href="http://www.nytimes.com/external/gigaom/2009/08/06/06gigaom-back-up-your-social-media-profiles-69520.html">NY Times</a>)</li>
<li><a href="http://backupmytweets.com/">BackUpMyTweets</a></li>
<li>If you are popular enough and folks raise a raucous, Twitter will go into the database back-up and restore your account into its pristine set up.</li>
</ul>
<p>BackupMyTweets required too much info to get it working. No, you cannot have my gmail password.</p>
<p>I&#8217;ve tried Tweetbackup and they get kudos for using <a href="http://oauth.net/">OAuth</a> to make it easy to back your tweets up.</p>
<p>The 3rd option, begging Twitter, simply can&#8217;t scale and will only work for those few elites close to Twitter or popular enough. There isn&#8217;t a consumer solution.</p>
<p>How do we solve the problem of social media backup?</p>
<p>The great thing is the problem is:</p>
<ul>
<li>technical</li>
<li>can have the same business model as insurance</li>
<li>will gain recognition as more snafus happen</li>
</ul>
<p>Once again, if you haven&#8217;t already, use <a href="http://backupmytweets.com/">BackUpMyTweets</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codebelay.com/blog/2009/10/04/social-media-backup-what-are-the-options-now/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Benchmarking Inserts on Drizzle and MySQL</title>
		<link>http://www.codebelay.com/blog/2009/09/08/benchmarking-insert-on-drizzle-and-mysql/</link>
		<comments>http://www.codebelay.com/blog/2009/09/08/benchmarking-insert-on-drizzle-and-mysql/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 17:00:40 +0000</pubDate>
		<dc:creator>barce</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[WebApps]]></category>
		<category><![CDATA[scalability hacking]]></category>
		<category><![CDATA[mysql drizzle benchmarking]]></category>

		<guid isPermaLink="false">http://www.codebelay.com/blog/?p=630</guid>
		<description><![CDATA[I&#8217;m not comparing apples to apples yet&#8230; but out of the box, drizzle does inserts faster than MySQL using the same table type, InnoDB.
Here&#8217;s what I&#8217;m comparing:
drizzle r1126 configured with defaults, and
MySQL 5.1.38 configured with 


./configure --prefix=/usr/local/mysql --with-extra-charsets=complex \
--enable-thread-safe-client --enable-local-infile --enable-shared \
--with-plugins=partition,innobase


which is really nothing complicated.
SQL query caching is turned off on both database servers. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not comparing apples to apples yet&#8230; but out of the box, <a href="https://launchpad.net/drizzle">drizzle</a> does inserts faster than <a href="http://www.mysql.com/">MySQL</a> using the same table type, <a href="http://en.wikipedia.org/wiki/Innodb">InnoDB</a>.</p>
<p>Here&#8217;s what I&#8217;m comparing:<br />
drizzle r1126 configured with defaults, and<br />
MySQL 5.1.38 configured with </p>
<div style="color: #fff; background: #000; padding: 5px 5px 5px 5px">
<pre>
./configure --prefix=/usr/local/mysql --with-extra-charsets=complex \
--enable-thread-safe-client --enable-local-infile --enable-shared \
--with-plugins=partition,innobase
</pre>
</div>
<p>which is really nothing complicated.</p>
<p>SQL query caching is turned off on both database servers. Both are using the InnoDB engine plug-in.</p>
<p>I&#8217;m running these benchmarks on a MacBook Pro 2.4 GHz Intel Core 2 Duo with 2GB 1067 MHz DDR3 RAM.</p>
<p>I wrote <a href="http://www.codebelay.com/blog/2007/04/19/more-mysql-51-benchmarks-my-code-is-faster-and-slower-wtf/">benchmarking software about 2 years ago to test partitions</a> but I&#8217;ve since abstracted the code to be database agnostic.</p>
<p>You can get <a href="http://github.com/barce/partition_benchmarks/tree/master">the benchmarking code at Github</a>.</p>
<p>At the command-line, you type:</p>
<div style="color: #fff; background: #000; padding: 5px 5px 5px 5px">
php build_tables.php 10000 4 drizzle
</div>
<p>where 10000 is the number of rows allocated total, and 4 is the number of partitions for those rows.</p>
<p>You can type the same thing for mysql:</p>
<div style="color: #fff; background: #000; padding: 5px 5px 5px 5px">
php build_tables.php 10000 4 mysql
</div>
<p>and get interesting results.</p>
<p>Here&#8217;s what I got:</p>
<h3>MySQL</h3>
<pre>
bash-3.2$ php build_tables.php 10000 4 mysql
Elapsed time between Start and Test_Code_Partition: 13.856538
last table for php partition: users_03
Elapsed time between No_Partition and Code_Partition: 14.740206
-------------------------------------------------------------
marker           time index            ex time         perct
-------------------------------------------------------------
Start            1252376759.26094100   -                0.00%
-------------------------------------------------------------
No_Partition     1252376773.11747900   13.856538       48.45%
-------------------------------------------------------------
Code_Partition   1252376787.85768500   14.740206       51.54%
-------------------------------------------------------------
Stop             1252376787.85815000   0.000465         0.00%
-------------------------------------------------------------
total            -                     28.597209      100.00%
-------------------------------------------------------------
20000 rows inserted...
</pre>
<h3>drizzle</h3>
<pre>
bash-3.2$ php build_tables.php 10000 4 drizzle
Elapsed time between Start and Test_Code_Partition: 7.502141
last table for php partition: users_03
Elapsed time between No_Partition and Code_Partition: 7.072367
-------------------------------------------------------------
marker           time index            ex time         perct
-------------------------------------------------------------
Start            1252376733.68141500   -                0.00%
-------------------------------------------------------------
No_Partition     1252376741.18355600   7.502141        51.47%
-------------------------------------------------------------
Code_Partition   1252376748.25592300   7.072367        48.52%
-------------------------------------------------------------
Stop             1252376748.25627400   0.000351         0.00%
-------------------------------------------------------------
total            -                     14.574859      100.00%
-------------------------------------------------------------
20000 rows inserted...
</pre>
<p>MySQL: 699 inserts per second<br />
drizzle: 1372 inserts per second<br />
As far as inserts go, drizzle is about 2 times faster out of the box than MySQL.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codebelay.com/blog/2009/09/08/benchmarking-insert-on-drizzle-and-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>If You Miss tr.im use j.mp</title>
		<link>http://www.codebelay.com/blog/2009/09/07/if-you-miss-tr-im-use-j-mp/</link>
		<comments>http://www.codebelay.com/blog/2009/09/07/if-you-miss-tr-im-use-j-mp/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 21:02:40 +0000</pubDate>
		<dc:creator>barce</dc:creator>
				<category><![CDATA[TechBiz]]></category>
		<category><![CDATA[WebApps]]></category>
		<category><![CDATA[url shortener]]></category>
		<category><![CDATA[urls]]></category>

		<guid isPermaLink="false">http://www.codebelay.com/blog/2009/09/07/if-you-miss-tr-im-use-j-mp/</guid>
		<description><![CDATA[I&#8217;ve been using j.mp for two weeks now and it&#8217;s filled the void that tr.im left after going out of business.

Long Live j.mp.
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using <a href="http://j.mp/">j.mp</a> for two weeks now and it&#8217;s filled the void that tr.im left after going out of business.</p>
<p><a href="http://j.mp/"><img src="http://www.codebelay.com/img/jmp.png" alt="j.mp" border='0' /></a></p>
<p>Long Live j.mp.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codebelay.com/blog/2009/09/07/if-you-miss-tr-im-use-j-mp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Advice for Middle Management</title>
		<link>http://www.codebelay.com/blog/2009/08/27/advice-for-middle-management/</link>
		<comments>http://www.codebelay.com/blog/2009/08/27/advice-for-middle-management/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 03:29:47 +0000</pubDate>
		<dc:creator>barce</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[TechBiz]]></category>
		<category><![CDATA[management]]></category>

		<guid isPermaLink="false">http://www.codebelay.com/blog/2009/08/27/advice-for-middle-management/</guid>
		<description><![CDATA[Your team will sabotage your career worse than any other nemesis at work, if you let them.
Here&#8217;s what you need to know to protect yourself and your company from sabotage:
Who&#8217;s popular? Yeah, I know. It sounds like highschool, but like then it&#8217;s still in important and socially real factor that&#8217;s now kept track of on [...]]]></description>
			<content:encoded><![CDATA[<p>Your team will sabotage your career worse than any other nemesis at work, if you let them.</p>
<p>Here&#8217;s what you need to know to protect yourself and your company from sabotage:</p>
<p>Who&#8217;s popular? Yeah, I know. It sounds like highschool, but like then it&#8217;s still in important and socially real factor that&#8217;s now kept track of on social media sites.</p>
<p>What is your team&#8217;s weakness as perceived by those outside? By the team itself? A good manager can appease the two.</p>
<p>Whose skills are the most respected? Yup you have to get along with this douchebag, if she or he is one. Just create enough space between the two of you.</p>
<p>Any others?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codebelay.com/blog/2009/08/27/advice-for-middle-management/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Amazon EC2 in the Enterprise</title>
		<link>http://www.codebelay.com/blog/2009/08/27/amazon-ec2-in-the-enterprise/</link>
		<comments>http://www.codebelay.com/blog/2009/08/27/amazon-ec2-in-the-enterprise/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 23:15:54 +0000</pubDate>
		<dc:creator>barce</dc:creator>
				<category><![CDATA[TechBiz]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://www.codebelay.com/blog/?p=617</guid>
		<description><![CDATA[This is just a quick summary of what it was like implementing Amazon&#8217;s EC2 in an enterprise environment.
1. You&#8217;ll need to write your own LDAP plug-ins to interface with any access control lists. E.G. where I work WordPress is used for corporate communications so an LDAP plug-in had to be written to make sure the [...]]]></description>
			<content:encoded><![CDATA[<p>This is just a quick summary of what it was like implementing Amazon&#8217;s EC2 in an enterprise environment.</p>
<p>1. You&#8217;ll need to write your own LDAP plug-ins to interface with any access control lists. E.G. where I work WordPress is used for corporate communications so an LDAP plug-in had to be written to make sure the right people saw the right information.</p>
<p>2. Migration can be expensive if you&#8217;re using EBS on the first go. On windows, and I&#8217;m not sure why, it can cost about $50 to migrate 2GB of data into EBS. In linux, it happens at a fraction of that cost and as advertised.</p>
<p>3. Windows can be very expensive. Although they say it&#8217;s 12 cents per hour per small instance beware of hidden costs like authentication services and SQL server. With both, you are using a server at the cost of $1.35 / hour, which IMHO could be run cheaper with just a small linux instance and do the same thing at 10 cents per hour.</p>
<p>I&#8217;m pretty sure that with the right Amazon EC2 set up you could run a cluster of servers for a Fortune 500 company for under $1000.00 (one thousand dollars) per month without the CapEX costs associated with new hardware.</p>
<p>If you have any more questions about Amazon EC2 in the enterprise I&#8217;d be happy to answer them. Please ask them in the comments below.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codebelay.com/blog/2009/08/27/amazon-ec2-in-the-enterprise/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Load Balance and Auto Scale with Amazon’s EC2</title>
		<link>http://www.codebelay.com/blog/2009/08/02/how-to-load-balance-and-auto-scale-with-amazons-ec2/</link>
		<comments>http://www.codebelay.com/blog/2009/08/02/how-to-load-balance-and-auto-scale-with-amazons-ec2/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 07:28:25 +0000</pubDate>
		<dc:creator>barce</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[TechBiz]]></category>
		<category><![CDATA[WebApps]]></category>
		<category><![CDATA[scalability hacking]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://www.codebelay.com/blog/?p=615</guid>
		<description><![CDATA[This blog post is a quick introduction to load balancing and auto scaling on with Amazon&#8217;s EC2.
I was kinda amazed about how easy it was.
Prelims: Download the load balancer API software, auto scaling software, and cloud watch software. You can get all three at a download page on Amazon.
Let&#8217;s load balancer two servers.
elb-create-lb lb-example &#8211;headers [...]]]></description>
			<content:encoded><![CDATA[<p>This blog post is a quick introduction to load balancing and auto scaling on with Amazon&#8217;s EC2.</p>
<p>I was kinda amazed about how easy it was.</p>
<p>Prelims: Download the load balancer API software, auto scaling software, and cloud watch software. You can <a href="http://developer.amazonwebservices.com/connect/kbcategory.jspa?categoryID=88">get all three at a download page</a> on Amazon.</p>
<p>Let&#8217;s load balancer two servers.</p>
<p>elb-create-lb lb-example &#8211;headers \<br />
   &#8211;listener &#8220;lb-port=80,instance-port=80,protocol=http&#8221; \<br />
   &#8211;availability-zones us-east-1a</p>
<p>The above creates a load balancer called &#8220;lb-example,&#8221; and will load balance traffic on port 80, i.e. the web pages that you serve.</p>
<p>To attach specific servers to the load balancer you just type:</p>
<p>elb-register-instances-with-lb lb-example &#8211;headers &#8211;instances i-example,i-example2</p>
<p>where i-example and i-example2 are the instance id&#8217;s of the servers you want added to the load balancer.</p>
<p>You&#8217;ll also want to monitor the health of the load balanced servers, so please add a health check:</p>
<p>elb-configure-healthcheck lb-example &#8211;headers \<br />
   &#8211;target &#8220;HTTP:80/index.html&#8221; &#8211;interval 30 &#8211;timeout 3 \<br />
   &#8211;unhealthy-threshold 2 &#8211;healthy-threshold 2</p>
<p>Now let&#8217;s set up autoscaling:</p>
<p>as-create-launch-config example3autoscale &#8211;image-id ami-mydefaultami \<br />
   &#8211;instance-type m1.small</p>
<p>as-create-auto-scaling-group example3autoscalegroup  \<br />
   &#8211;launch-configuration example3autoscale \<br />
   &#8211;availability-zones us-east-1a \<br />
   &#8211;min-size 2 &#8211;max-size 20 \<br />
   &#8211;load-balancers lb-example</p>
<p>as-create-or-update-trigger example3trigger \<br />
   &#8211;auto-scaling-group example3autoscalegroup &#8211;namespace &#8220;AWS/EC2&#8243; \<br />
   &#8211;measure CPUUtlization &#8211;statistic Average \<br />
   &#8211;dimensions &#8220;AutoScalingGroupName=example3autoscalegroup&#8221; \<br />
   &#8211;period 60 &#8211;lower-threshold 20 &#8211;upper-threshold 40 \<br />
   &#8211;lower-breach-increment=-1 &#8211;upper-breach-increment 1 \<br />
   &#8211;breach-duration 120</p>
<p>With the 3 commands above I&#8217;ve created an auto-scaling scenario where a new server is spawned and added to the load balancer every two minutes if the CPU Utlization is above 20% for more than 1 minute.</p>
<p>Ideally you want to set &#8211;lower-threshold to something high like 70 and &#8211;upper-threshold to 90, but I set both to 20 and 40 respectively just to be able to test.</p>
<p>I tested using siege.</p>
<p>Caveats: the auto-termination part is buggy, or simply didn&#8217;t work. As the load went down, the number of the server on-line remained the same. Anybody have thoughts on this?</p>
<p>What does auto-scaling and load balancing in the cloud mean? Well, the total cost of ownership for scalable, enterprise infrastructure just went down by lots. It also means that IT departments can just hire a cloud expert and deploy solutions from a single laptop instead of having to figure out the cost for hardware load balancers and physical servers.</p>
<p>The age of Just-In-Time IT just got ushered in with auto-scaling and load balancing in the cloud.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codebelay.com/blog/2009/08/02/how-to-load-balance-and-auto-scale-with-amazons-ec2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss><!-- Dynamic Page Served (once) in 0.299 seconds --><!-- Cached page served by WP-Cache -->
