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
loader, two machines with 8 processes each. Let's tweak loadee so that it can simulate a production deployment in a meaningful way.
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 email@example.com '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
- 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
- "public_url": "https://loadee.personatest.org", + "public_url": "http://loadee.personatest.org",