<?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/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
xmlns:rawvoice="http://www.rawvoice.com/rawvoiceRssModule/"
>

<channel>
	<title>Solution Hacker &#187; charles http proxy</title>
	<atom:link href="http://www.solutionhacker.com/tag/charles-http-proxy/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.solutionhacker.com</link>
	<description>This blog provides solutions for enterpreneurs!</description>
	<lastBuildDate>Mon, 06 Feb 2012 07:19:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=212</generator>
<!-- podcast_generator="Blubrry PowerPress/2.0.4" -->
	<itunes:summary>This blog provides solutions for enterpreneurs!</itunes:summary>
	<itunes:author>Solution Hacker</itunes:author>
	<itunes:explicit>no</itunes:explicit>
	<itunes:image href="http://www.solutionhacker.com/wp-content/plugins/powerpress/itunes_default.jpg" />
	<itunes:subtitle>This blog provides solutions for enterpreneurs!</itunes:subtitle>
	<image>
		<title>Solution Hacker &#187; charles http proxy</title>
		<url>http://www.solutionhacker.com/wp-content/plugins/powerpress/rss_default.jpg</url>
		<link>http://www.solutionhacker.com</link>
	</image>
		<item>
		<title>Load and stress testing my website</title>
		<link>http://www.solutionhacker.com/implement-your-idea/test-your-website/load-and-stress-testing-my-website/</link>
		<comments>http://www.solutionhacker.com/implement-your-idea/test-your-website/load-and-stress-testing-my-website/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 02:18:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Testing]]></category>
		<category><![CDATA[AMF]]></category>
		<category><![CDATA[charles http proxy]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[jmeter]]></category>
		<category><![CDATA[load testing]]></category>
		<category><![CDATA[stress testing]]></category>

		<guid isPermaLink="false">http://www.solutionhacker.com/?p=209</guid>
		<description><![CDATA[<h2>Purpose of Load and Stress testing</h2>
<p>The key goals of load testing are:</p>
<ol>
	<li>Find out whether your website can support the<strong> expected </strong># of concurrent users.</li>
	<li>At what load does the app break?</li>
</ol>
<p>To do that, you normally follow these steps:</p>
<ol>
	<li>Identifying the primary user path</li>
	<li>Identifying the expected # of concurrent users. (Both now and future)</li>
	<li>Set up virtual users to hit the app (<strong>load generation capability </strong>is the key factor to pick the right tool. You don&#39;t want too much hardware investment to generate the load you want, right? <img alt=":wink:" onclick="grin(':wink:');" src="../../../../../wp-includes/images/smilies/icon_wink.gif" />)</li>
	<li>Run the test</li>
	<li>Analyze the result (throughput under load, avg response time under load)</li>
</ol>
<p>&#160;</p>
<h2><!--more-->Challenges to load test Flex app</h2>
<p>We have a web application that has <strong>Flex </strong>frontend talks to J2EE web application backend via <strong>AMF</strong>. How do we load and stress test this system? We certainly can just perform load test against our backend. However, it may need to expose our service via Servlet and load test it as typical restful web service. If we want to simulate Flex and load test through AMF. We need to find a way to capture the AMF requests from Flex client and replay it in our load testing suite. To do that, we can use <a href="http://www.charlesproxy.com/">Charles http proxy</a> to capture the AMF request and tell <strong>JMeter </strong>to load test our application via replaying this AMF request. This&#160; <a href="http://note19.com/2008/05/06/how-to-use-jmeter-to-load-test-flex-applications/">article</a> can give us the detail. However, Charles is a commerical product. If you want a free solution, you can try <a href="http://90kts.com/blog/2008/performance-testing-flex-remoting-amf-with-jmeter/">this</a>.</p>
<p>I know that JMeter comes with proxy to record the request. You can <a href="http://jakarta.apache.org/jmeter/usermanual/best-practices.html#proxy_server">try it out</a> to see whether you can exam the AMF message. Let me know if it works!</p>
<h2>JMeter</h2>
<p><strong><span class="docEmphasis">Load</span> </strong>is all of the users using your web site at a point in time. Load includes users making requests to your web site as well as those reading pages from previous requests. However, we do need some way of differentiating between all clients and those clients actually making requests to our web site. We use the terms <strong><span class="docEmphasis">concurrent load</span></strong> and <strong><span class="docEmphasis">active load</span></strong> (making request) to make this distinction. We use the <strong>JMeter </strong>to help us to generate the load to our system. In term of load generation, we should make sure that we can simulate the <strong>peak load</strong>. JMeter is a great load testing tool. I have heard that Google is using this to load and stress test its application.</p>
<p><embed allowfullscreen="true" allowscriptaccess="always" id="VideoPlayback" src="http://video.google.co.uk/googleplayer.swf?docid=-6891978643577501895&#38;hl=en&#38;fs=true" style="width: 400px; height: 326px;" type="application/x-shockwave-flash"></embed></p>
<p><u><strong>To use JMeter, follow the steps below:</strong></u></p>
<ol>
	<li><strong>Set up Thread Group</strong> - use to model concurrent virtual users and decide how you want the load be generated.
		<ul>
			<li><strong>Number of threads</strong>.</li>
			<li><strong>The ramp-up period</strong> (it tells JMeter the amount of time for creating the total number of threads). At the beginning of a load test, if the ramp-up period is zero, JMeter will create all the threads at once and send out requests immediately, thus potentially saturating the server and, more importantly, deceivingly increasing the load. That is, the server could become overloaded, not because the average hit rate is high, but because you send all the threads&#39; first requests simultaneously, causing an unusual initial peak hit rate. The rule of thumb for determining a reasonable ramp-up period is to keep the initial hit rate close to the average hit rate.</li>
			<li><strong>The number of times</strong> to execute the test.</li>
			<li>If the client machine running JMeter lacks enough computing power to model a heavy load, JMeter&#39;s <strong>distributive testing feature</strong> allows you to control multiple remote JMeter engines from a single JMeter console.</li>
		</ul>
	</li>
	<li><strong>Introduce user think time</strong></li>
	<li><strong>Specify response-time requirements and validate test results.</strong></li>
</ol>
<p>To get familiar with it, here are some articles I found it useful</p>
<ol>
	<li><a href="http://www.linux.com/feature/34432">Stress testing with JMeter by Daniel Rubio - Linux.com</a></li>
	<li><a href="http://www.devx.com/webdev/Article/17950/0/page/1">Loading testing with Apache JMeter by Kulvir Singh Bhogal, - Devx.com</a></li>
	<li><a href="http://jakarta.apache.org/jmeter/usermanual/jmeter_distributed_testing_step_by_step.pdf">JMeter distributed testing</a></li>
	<li><a href="http://jakarta.apache.org/jmeter/usermanual/jmeter_proxy_step_by_step.pdf">JMeter recording testing</a></li>
	<li><a href="http://www.johnandcailin.com/blog/john/load-test-your-drupal-application-scalability-apache-jmeter">Load test your drupal app scalability with JMeter</a> - Part 1, <a href="http://www.johnandcailin.com/blog/john/load-test-your-drupal-application-scalability-apache-jmeter%3A-part-two">Part 2</a></li>
	<li><a href="http://www.scribd.com/doc/7499267/Load-Testing-With-JMeter">Load testing with JMeter - powerpoint</a> - very good!</li>
	<li><a href="http://www.scribd.com/doc/3805411/Scalability-Factors-of-JMeter-in-Performance-Testing-projects">Scalability Factors of JMeter in Performance Testing</a> - response size, response time, protocol, hardware configuration, load generating tool architecture and configuration, complexity of client-side processing.</li>
	<li><a href="http://www.javaworld.com/javaworld/jw-07-2005/jw-0711-jmeter.html?page=1">JMeter Tips - Javaworld</a></li>
</ol>
<h2>&#160;Reference</h2>
<ol>
	<li>Someone has written a nice <a href="http://flex.sys-con.com/node/614811/mobile">article </a>in sys-con to talk about how to load test Flex application.</li>
	<li><a href="http://mdzyuba.blogspot.com/2008/05/using-flexunit-for-stress-testing.html">Use FlexUnit for stress testing</a></li>
	<li><a href="http://mdzyuba.blogspot.com/2008/05/testing-remote-data-services-with.html">Test Remote Data Service via FlexUnit</a></li>
	<li><a href="http://www.igvita.com/2008/09/30/load-testing-with-log-replay/">Load testing with log replay - interesting idea</a></li>
</ol>
]]></description>
			<content:encoded><![CDATA[<h2>Purpose of Load and Stress testing</h2>
<p>The key goals of load testing are:</p>
<ol>
<li>Find out whether your website can support the<strong> expected </strong># of concurrent users.</li>
<li>At what load does the app break?</li>
</ol>
<p>To do that, you normally follow these steps:</p>
<ol>
<li>Identifying the primary user path</li>
<li>Identifying the expected # of concurrent users. (Both now and future)</li>
<li>Set up virtual users to hit the app (<strong>load generation capability </strong>is the key factor to pick the right tool. You don&#39;t want too much hardware investment to generate the load you want, right? <img alt=":wink:" onclick="grin(':wink:');" src="../../../../../wp-includes/images/smilies/icon_wink.gif" />)</li>
<li>Run the test</li>
<li>Analyze the result (throughput under load, avg response time under load)</li>
</ol>
<p>&nbsp;</p>
<h2><span id="more-209"></span>Challenges to load test Flex app</h2>
<p>We have a web application that has <strong>Flex </strong>frontend talks to J2EE web application backend via <strong>AMF</strong>. How do we load and stress test this system? We certainly can just perform load test against our backend. However, it may need to expose our service via Servlet and load test it as typical restful web service. If we want to simulate Flex and load test through AMF. We need to find a way to capture the AMF requests from Flex client and replay it in our load testing suite. To do that, we can use <a href="http://www.charlesproxy.com/">Charles http proxy</a> to capture the AMF request and tell <strong>JMeter </strong>to load test our application via replaying this AMF request. This&nbsp; <a href="http://note19.com/2008/05/06/how-to-use-jmeter-to-load-test-flex-applications/">article</a> can give us the detail. However, Charles is a commerical product. If you want a free solution, you can try <a href="http://90kts.com/blog/2008/performance-testing-flex-remoting-amf-with-jmeter/">this</a>.</p>
<p>I know that JMeter comes with proxy to record the request. You can <a href="http://jakarta.apache.org/jmeter/usermanual/best-practices.html#proxy_server">try it out</a> to see whether you can exam the AMF message. Let me know if it works!</p>
<h2>JMeter</h2>
<p><strong><span class="docEmphasis">Load</span> </strong>is all of the users using your web site at a point in time. Load includes users making requests to your web site as well as those reading pages from previous requests. However, we do need some way of differentiating between all clients and those clients actually making requests to our web site. We use the terms <strong><span class="docEmphasis">concurrent load</span></strong> and <strong><span class="docEmphasis">active load</span></strong> (making request) to make this distinction. We use the <strong>JMeter </strong>to help us to generate the load to our system. In term of load generation, we should make sure that we can simulate the <strong>peak load</strong>. JMeter is a great load testing tool. I have heard that Google is using this to load and stress test its application.</p>
<p><embed allowfullscreen="true" allowscriptaccess="always" id="VideoPlayback" src="http://video.google.co.uk/googleplayer.swf?docid=-6891978643577501895&amp;hl=en&amp;fs=true" style="width: 400px; height: 326px;" type="application/x-shockwave-flash"></embed></p>
<p><u><strong>To use JMeter, follow the steps below:</strong></u></p>
<ol>
<li><strong>Set up Thread Group</strong> &#8211; use to model concurrent virtual users and decide how you want the load be generated.
<ul>
<li><strong>Number of threads</strong>.</li>
<li><strong>The ramp-up period</strong> (it tells JMeter the amount of time for creating the total number of threads). At the beginning of a load test, if the ramp-up period is zero, JMeter will create all the threads at once and send out requests immediately, thus potentially saturating the server and, more importantly, deceivingly increasing the load. That is, the server could become overloaded, not because the average hit rate is high, but because you send all the threads&#39; first requests simultaneously, causing an unusual initial peak hit rate. The rule of thumb for determining a reasonable ramp-up period is to keep the initial hit rate close to the average hit rate.</li>
<li><strong>The number of times</strong> to execute the test.</li>
<li>If the client machine running JMeter lacks enough computing power to model a heavy load, JMeter&#39;s <strong>distributive testing feature</strong> allows you to control multiple remote JMeter engines from a single JMeter console.</li>
</ul>
</li>
<li><strong>Introduce user think time</strong></li>
<li><strong>Specify response-time requirements and validate test results.</strong></li>
</ol>
<p>To get familiar with it, here are some articles I found it useful</p>
<ol>
<li><a href="http://www.linux.com/feature/34432">Stress testing with JMeter by Daniel Rubio &#8211; Linux.com</a></li>
<li><a href="http://www.devx.com/webdev/Article/17950/0/page/1">Loading testing with Apache JMeter by Kulvir Singh Bhogal, &#8211; Devx.com</a></li>
<li><a href="http://jakarta.apache.org/jmeter/usermanual/jmeter_distributed_testing_step_by_step.pdf">JMeter distributed testing</a></li>
<li><a href="http://jakarta.apache.org/jmeter/usermanual/jmeter_proxy_step_by_step.pdf">JMeter recording testing</a></li>
<li><a href="http://www.johnandcailin.com/blog/john/load-test-your-drupal-application-scalability-apache-jmeter">Load test your drupal app scalability with JMeter</a> &#8211; Part 1, <a href="http://www.johnandcailin.com/blog/john/load-test-your-drupal-application-scalability-apache-jmeter%3A-part-two">Part 2</a></li>
<li><a href="http://www.scribd.com/doc/7499267/Load-Testing-With-JMeter">Load testing with JMeter &#8211; powerpoint</a> &#8211; very good!</li>
<li><a href="http://www.scribd.com/doc/3805411/Scalability-Factors-of-JMeter-in-Performance-Testing-projects">Scalability Factors of JMeter in Performance Testing</a> &#8211; response size, response time, protocol, hardware configuration, load generating tool architecture and configuration, complexity of client-side processing.</li>
<li><a href="http://www.javaworld.com/javaworld/jw-07-2005/jw-0711-jmeter.html?page=1">JMeter Tips &#8211; Javaworld</a></li>
</ol>
<h2>&nbsp;Reference</h2>
<ol>
<li>Someone has written a nice <a href="http://flex.sys-con.com/node/614811/mobile">article </a>in sys-con to talk about how to load test Flex application.</li>
<li><a href="http://mdzyuba.blogspot.com/2008/05/using-flexunit-for-stress-testing.html">Use FlexUnit for stress testing</a></li>
<li><a href="http://mdzyuba.blogspot.com/2008/05/testing-remote-data-services-with.html">Test Remote Data Service via FlexUnit</a></li>
<li><a href="http://www.igvita.com/2008/09/30/load-testing-with-log-replay/">Load testing with log replay &#8211; interesting idea</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.solutionhacker.com/implement-your-idea/test-your-website/load-and-stress-testing-my-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

