We use Capistrano over here for deployment and it makes it really easy for us. If everything goes correct it takes 6 different lines in the terminal window, some passwords, and we’re good to go. Last week we deployed using the latest rails revision 7199 (updated with piston) and started using memcached. From these 2 things we were able to increase our req/sec by 10x! Very exciting! Although, we haven’t setup our build to properly set the memcached server during deploy, and Capistrano doesn’t correctly restart the memcached server. That’s ok, because since this was new there was a lot of testing. No heart attack yet.
We have 4 servers that we use. One is for staging, one is the database, and 2 are running mongrel – one of which has apache and the other now runs the memcached server. There is a memcache yml file that tells rails where the memcached server is running. For production and staging it is localhost, and same with mongrel machine #2 .. however mongrel machine #1 needs to point to mongrel machine #2. This makes our deployment to machine #1 not completely automated because we have to change the production memcached setting for machine #1 after we upgrade the server. So, if anyone out there can tell us how to automate this that’d be great – otherwise we will get to it soon to ensure our longevity.
Now the fun of deploying at 1 this morning. Run the 6 lines. Do the manual step of telnetting to the memcachd server to flush_all so the home page updates, since we can’t use Capistrano for this yet .. bring everything up and yeay! we deployed! Oh wait, 500 error? yeay it works! 500 error? Aaaahhh .. !! Machine #2 was fine, but the logs told us promptly that machine #1 didn’t know about the memcached server.
@#$%^@#$ were the lines in the IRC chat window.
Russell brings server #1 offline, while brave young Doug goes in to the servers to work his magic. Crush3r.com now doesn’t come up at all!! AAAhhhh .. Eric has a mini-heart attack via the chat window. OMG MHA!! (haha .. he did spell it out in the chat) Somehow Apache mysteriously decided it didn’t like machine #1. Brave young Doug promptly starts Apache and the servers with the proper memcached settings.
Just like that, we now have the “demolished bridge in Poznan!” release. Properly named and swimming laps without a problem