Can the 49ers afford not to re-sign Whitner?

Is it mandatory that the 49ers re-sign Donte Whitner?

If the 49ers let him walk and replace him with a rookie, the defense probably would be vulnerable up the middle for at least the first half of the season because there would be no Whitner and no NaVorro Bowman. The 49ers would have to rely on a rookie strong safety and Michael Wilhoite at inside linebacker.

On the other hand, if the 49ers re-sign Whitner they probably will have to over-pay for him because he had an excellent season in 2013. But he mostly has struggled in coverage during his career.

What should the 49ers do about Whitner?