Release It! Capacity Patterns and Best Practices

In my last blog I discussed some of the capacity anti-patterns of Michael Nyguard’s excellent but tragically misnamed book “Release It!”  I finished reading the patterns and best practices portion, some of which are discussed below:

  • Pool Connections. If bad connections are not removed from the pool, they will be given to proportionally more threads since they finish more quickly.  You also need to consider your strategy for checking out resources from a pool.  If you go per-page, you will have better protection against deadlock in multi-pool scenarios, but you will need a larger pool as these connections will be held longer.  You also need to monitor calls to your connection pools to see how long threads are waiting.
  • Use Caching Carefully. You need to be able to set the maximum memory usage for your cache.  You should also be monitoring your hit rates to make sure the cache is buying you something.  Don’t cache things which are cheap to regenerate, and use soft references where possible for when memory gets tight.
  • Precompute Content. There is no need to recompute content that never changes or changes infrequently, yet this happens all the time.  This is a great area to explore for increasing capacity.

An excellent resource in Rails is the “RailsLab: Scaling Rails” podcast I downloaded on iTunes.  I have watched it before, but after reading this book, I will likely watch it again and start playing with what they suggest.

In the next blog, I will summarize the remainder of the book.  However, I will likely hold off on publishing that until after the holidays.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s