Search This Blog

Saturday, April 3, 2010

Release It! - Chapter 4.9 Slow Responses

Slow Responses are harmful because they tie up resources on both the front-end and the back-end and are usually the result of high demand on the system. Memory leaks can also cause slow responses as the JVM works harder to manage memory. WANs can also cause slow responses due to network congestion.  Typically, hand-rolled low-level socket code is responsible for slow responses, so be careful when dealing with socket code.  Slow responses tend to result in a Cascading Failure as the effects are felt between layers.  Having your system monitor its performance can give you a heads up when SLAs aren't being met.

  • slow response times trigger Cascading Failures as the slowness is felt upstream
  • slow responses causes more traffic on websites because users will get frustrated and pound on the reload button
  • consider Fail Fast - in a system that monitors itself you might elect to send an error response instead of letting things slow down once a certain threshold is crossed.
  • hunt for memory leaks or resource contention - waiting for database connections causes slow responses.  Slow responses aggravates
    contentions because more threads are vying for resources that are getting released at a slower rate.  Memory leaks eat up CPU cycles as the JVM works to manage memory.
  • Inefficient low-level protocol implementations can cause network stalls, resulting in slow response.  Consider using a proven library before rolling your own.
     

No comments:

Post a Comment