I think, it depends on, where you play and what stakes. If you play on a well established large site, which has been around for 10+ years, your money should be reasonably safe. So if you are a micro or low stakes player, the easiest solution is to just keep your entire bankroll on the site. You can decrease risk also by playing on multible sites and then split the roll evenly between then.
If however you are a mid or high stakes player, I would prefer to keep a decent chunk of the bankroll in a traditional bank, where it is covered by some kind of depositors insurance. This also fall in line with the fact, that mid or high stakes players need a larger bankroll measured in BI´s, because winrates are lower.
It also depends, how many tables you play at once. The minimum to have deposited must of course cover the money, you are sitting with on the tables, with a reasonable margin for rebuys or top-ups. Its also not great to have to visit the cashier constantly to move money in and out, so I would probably not go much below 20BIs.
Finally it depends on, where you live. If its a country, where
online poker is not legal, like the US, then it is obviously way more risky to have money in any poker site. We can just look at, what happened on "Black Friday" in 2011 because of this.