Skip to content

Instantly share code, notes, and snippets.

Created January 9, 2013 00:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/4489329 to your computer and use it in GitHub Desktop.
Save anonymous/4489329 to your computer and use it in GitHub Desktop.
How to load test persona on amazon EC2

How to load test persona on EC2

build your environment

Let's create two virtual machines:

$ scripts/deploy.js create loader -t c1.xlarge
... (lots of output) ...
$ scripts/deploy.js create loadee -t c1.xlarge
... (lots of output) ...
$ git push loadee HEAD:master
... (lots of output)...

Now you got loadee and loader, two machines with 8 processes each. Let's tweak loadee so that it can simulate a production deployment in a meaningful way.

disable SSL

In our production environment we handle SSL at a separate layer. Assume that this is infinitely scalable and disable it in the AWS environment so we can stress other parts of the system.

First kill the proxy:

$ ssh proxy@loadee.personatest.org 'forever stopall'

Now let's fiddle the router process from persona to run directly on port 8080 (which on awsbox is mapped to port 80 with fancy ipfwadm magic so that non-root processes can bind the default HTTP port of 80). Apply this patch to ~app/post-update.js

-    process.env['PORT'] = 10000;
+    process.env['PORT'] = 8080;

And next, let's tell persona that it's actually not on SSL with a patch to ~app/config.json:

- "public_url": "https://loadee.personatest.org",
+ "public_url": "http://loadee.personatest.org",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment