Rev 431: Add a NEWS update, and HACKING commentary about the new code. in http://bazaar.launchpad.net/~jameinel/loggerhead/load-test

John Arbash Meinel john at arbash-meinel.com
Thu Feb 10 23:05:38 UTC 2011


At http://bazaar.launchpad.net/~jameinel/loggerhead/load-test

------------------------------------------------------------
revno: 431
revision-id: john at arbash-meinel.com-20110210230531-spb87czp526tljp7
parent: john at arbash-meinel.com-20110210015732-b3kkt1jp7bsqcv0v
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: load-test
timestamp: Thu 2011-02-10 17:05:31 -0600
message:
  Add a NEWS update, and HACKING commentary about the new code.
-------------- next part --------------
=== added file 'HACKING'
--- a/HACKING	1970-01-01 00:00:00 +0000
+++ b/HACKING	2011-02-10 23:05:31 +0000
@@ -0,0 +1,59 @@
+Loggerhead
+==========
+
+Overview
+--------
+
+This document attempts to give some hints for people that are wanting to work
+on Loggerhead.
+
+
+Testing
+-------
+
+You can run the loggerhead test suite as a bzr plugin. To run just the
+loggerhead tests::
+
+  bzr selftest -s bp.loggerhead
+
+
+Load Testing
+------------
+
+As a web service, Loggerhead will often be hit by multiple requests. We want
+to make sure that loggerhead can scale with many requests, without performing
+poorly or crashing under the load.
+
+There is a command ``bzr load-test-loggerhead`` that can be run to stress
+loggerhead. A script is given, describing what requests to make, against what
+URLs, and for what level of parallel activity.
+
+
+Load Testing Multiple Instances
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+One way that Launchpad provides both high availability and performance scaling
+is by running multiple instances of loggerhead, serving the same content. A
+proxy is then used to load balance the requests. This also allows us to shut
+down one instance for upgrading, without interupting service (requests are
+just routed to the other instance).
+
+However, multiple processes poses an even greater risk that caches will
+conflict. As such, it is useful to test that changes don't introduce coherency
+issues at load. ``bzr load-test-loggerhead`` can be configured with a script
+that will make requests against multiple loggerhead instances concurrently.
+
+To run multiple instances, it is often sufficient to just spawn multiple
+servers on different ports. For example::
+
+  $ bzr serve --http --port=8080 &
+  $ bzr serve --http --port=8081 &
+
+There is a simple example script already in the source tree::
+
+  $ bzr load-test-loggerhead load_test_scripts/multiple_instances.script
+
+
+
+.. vim: ft=rst tw=78
+

=== modified file 'NEWS'
--- a/NEWS	2011-02-10 17:01:10 +0000
+++ b/NEWS	2011-02-10 23:05:31 +0000
@@ -4,6 +4,11 @@
 1.19 [???]
 ----------------
 
+    - Add ``bzr load-test-loggerhead`` as a way to make sure loggerhead can
+      handle concurrent requests, etc. Scripts can be written that spawn
+      multiple threads, and issue concurrent requests.
+      (John Arbash Meinel)
+
     - If we get a HEAD request, there is no reason to expand the template, we
       shouldn't be returning body content anyway.
       (John Arbash Meinel, #716201, #716217)



More information about the bazaar-commits mailing list