We think many developers believe system/application performance is a dark art. It is not. In our experience, well performing systems come down to this: fewer and faster.
If you are doing something a lot, do it fewer times. If you are doing something that is slow, make it faster. Here is our patented (not really) 3 step process.
Step 1: Measure
The only way you can know if you are doing something fewer or faster than before is if you are measuring. Ensure that you know how many requests (or jobs or messages or whatever) you are receiving and how long it takes to fullfill them.
Note: If you are using Ruby on Rails, you can use the gem nunes. If you do, please let us know what you think with a tweet or email.
Step 2: Improve
Once you have measured, you have three choices:
- Do something less often (fewer).
- Make something faster (faster).
- All of the above* (fewer and faster).
Note: * denotes preferred option.
Step 3: Repeat
Both fewer and faster are relative — less often or less time than before, whatever before was. You are never done, but after a round of fewer and faster, you are perhaps done for now.
The key is to set goals between steps 1 and 2. When you hit those goals (and you will, we have faith in you), stop improving, but keep measuring. Whenever the measurement fails to meet your goals, repeat step 2.
Conclusion
Go forth and spread this simple concept throughout the world. Oh, and if you find it helpful, be sure to let us know (a tweet or email will do just fine).
Sincerely,
Fewer & Faster