Panasonic Youth rob sanheim writes about software, business, ruby, music, stuff and things



Posts Tagged Scalability

Staging Environments in Rails

(photo @ flickr)
Most Rails apps that grow beyond the “toy” or “small” stage benefit greatly from the addition of a staging environment. Staging is where you deploy to flush out integration issues, to demo new features to users and clients, and generally put the app through its paces in a “production-like” environment before [...]


Beware the default nginx config - old IE6 hates gzip

I had some issues with an application deployed to EngineYard recently, using their standard nginx config with a few mongrels behind it. The issue was only happening with IE6, and only happening intermittently. And of course, I could not reproduce it locally. After some fun-filled research and gotomeeting’s with folks who saw [...]


Handling asset caching nicely in Rails 2.0

update: fix some incorrect paths that did not have the public in front. (thanks Jon)
From your rails root:
mkdir public/javascripts/cache
mkdir public/stylesheets/cache
svn add public/javascripts/cache/
svn add public/stylesheets/cache/
svn propset svn:ignore '*' public/javascripts/cache/
svn propset svn:ignore '*' public/stylesheets/cache/
svn ci -m "add cache directories for combined assets, but ignore their contents"
Then wherever you are doing the js and css includes:
< %= [...]


RailsConf 2007 - Memcaching Rails - Chris Wansrath

Chris Wanstrath helped scaling gamespot
had to turn off gzipping to avoid burning the cpus
3000 req/seconds
50M pages in the day, no downtime
Chris is a sloppy programmer (jk)

a distributed hash with no each or keys – just get and set
written in c – fast

at first – you dont need memcached – YAGNI
unless you really do need it [...]


Facebook’s architecture - 200 memcached servers

Great thread on the memcached list. Facebook has 200 dedicated memcached servers, all 4 core boxes with 16 GB ram. Thats serious hardware. Having to scale to that size is a nice problem to have.


Cleaning ActiveRecord Sessions

We realized recently that we never setup a job to clean up our active record sessions. So this accounts for our database size growing rapidly:

mysql> select count(*) from sessions;
+----------+
| count(*) |
+----------+
| 2188080 |
+----------+
1 row in set (24.64 sec)

Derp!
Not a big deal, really, except for the size its taking up for backups. Its [...]