Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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 '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": "",
+ "public_url": "",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment