can't sleep, guess I'll work

my mind is too.. um.. awake.. to sleep

let's see. I'm running 4 dynos right now for february-fire. I don't think I need that many, but I have no idea how many I do need. I want to test it. My idea for testing it is to create a new heroku account with 2 dynos, and run a 5000 person blitz on it, and see what happens..

so let's set that up.. first, let's create a new directory: february-ice..
next let's point my development environment at it..
next, let's get my readme instructions up..
ok, now let's run through them..
hm.. the git repo is still somehow linked to the old heroku app.. maybe if I delete it.. ok.. now how do I create a new .git directory? "git init" seemed to do it..
now to link it to heroku.. Stack Overflow says "git remote add heroku git@heroku.com:project.git"..
ok, good, it's uploading..
done.. it's all setup (pretty easy.. very satisfied with heroku right now)..
now let's get a dump of the database from february-fire..
actually I have one already.. let's upload it..
sweet, it's actually running in the new heroku app. I can login and everything..
..hopefully it's truly separated.. it has it's own database.. I'm not running the payments cron job..
ok.. now we want to stress test this sucker..
..for safety's sake, I just ran a test to make sure the new app is really using the new database.. so paranoid..

ok, let's add blitz..
ok, added, the expensive plan, so let's blitz and remove it asap..
what url do we want to blitz to?

so.. 2 dynos apparently does not serve 5000 blitz people..
let's try 4..
hm.. it seems to be failing at about 64 users, even with 4 dynos.. I wonder if the indexes have finished building in mongodb.. I wonder how to check that..
well, "explain" says it's using an index, at least it is now, I guess I can try again..

looks like I get about 10 hits/second before the app crumbles. Increasing the number of dynos, even to 6, doesn't seem to help. I'm guessing the database is crumbling. I suppose I could try again with a fancier database.. in any case, that's good information. I feel like my current 4 dynos is probably unnecessary, since the real bottleneck is the database.

huh.. I didn't realize I could change the name of my heroku apps. sweet!

No comments:

Post a Comment