Personally, I feel this "Attrition" is the toughest challenge for any software team - especially when the team size is very small. Attritions aren't something new in the software industry. It keeps happening everywhere and the rate becomes high during the IT market booms. People change jobs for better pays, for better positions and sometimes even to escape from the current bad managers.
The after-effects, when a team member leaves depends upon how prepared the team was. If seen from top, 20 members leaving a 1000 people organization, might appear less effective, but a single person leaving a three member team will have its own big impact.
So how to handle this situation in a small software team??
When an important resource from a small software team leaves, it really becomes very hard to find an immediate replacement and to keep the momentum going. Finding a right replacement isn't a easy task - it might take few weeks and in worst cases it might even take few months. Hence for small software teams, prevention and being prepared are the only ways to handle an attrition.
# Keep the team members happy : ensure they get correct rewards for their good work and ensure they knew about the stronger career paths available. Still pay checks alone will not retain a good employee - hence also make sure the workplace has more fun working.
# Be a good people friendly manager - its ok if people leave for better pay/positions, but a team member leaving because of a bad manager, isn't really good for the team and the manager himself.
# Work as a team. Make everyone realize and get involved in the team's goals. This is always good for the team.
# Be watchful - one need not keep watching someone for 24x7. Any degradation in work/behavior can be easily felt in a small team. If you suspect something to happen, sit down, analyze well, try to avoid it or get prepared for the challenge.
# Always have an extra person in the team. If 4 members can manage all the works in a team, then have 5 members in the team.