Build an online wallet service with Bitcoind, can it scale? If not, what can be done? I would like to build an online wallet service. I thinks it will be easy to implement all the functionalities if I go with Bitcoind. Here is a possible workflow:


New user with email bob@g.com can obtain a new account (in Bitcoind) with new address by calling getnewaddress bob@g.com
We can then start polling listsinceblock xxx to get all new transactions. If we receive a new incoming transaction, store txid in database, then iteratively call gettransaction txid on all unconfirmed transactions. When the number of confirmations are bigger than a certain threshold, credit the account in database, then call move bob@g.com safe, just to make the next step easier.
When safe account exceeds say 50BTC, send them to offline wallet.
When user wants to withdraw, refill safe if necessary, send the coins from safe, and update user's balance in the database.


However, in all the related questions I've read, most people say Bitcoind won't scale. Even the Bitcoin wiki says so. Now, if we are only to use the JSONRPC to interface the network, I can imagine the following workflow:


We generate say 1M addresses in database. When user signs up or require new address, we assign one address to them.
We enable blocknotify to get new block hash blkhash.
Call getblock blkhash to get all transaction hashes in the new block.
Call getrawtransaction txid to see whether we received an incoming transaction to our addresses. If so, keep the txid and keep polling gettransaction txid to update the confirmation number.
Call signrawtransaction, sendrawtransaction to move funds to offline wallet.


My questions are, 


Do you think my proposals are reasonable?
What are the nuances in the operations above? For example, 


by moving all funds to one account and then send money, does that count as one transaction or one transaction for each account? Are transaction fees the same?
when doing getrawtransaction, in the vout array, each object represents a destination, but each of them has an addresses array. There are cases where it contains multiple addresses. Does it mean it's a "multisig" transaction? Or is it related to reqSigs field? How do we handle such cases?



I've read following questions, but didn't find my answer: 

Does the original Bitcoin client scale to contain millions of addresses?

Bitcoin Client API-RPC: Efficient way to list transactions from a list of addresses

Please help.. Thank you very much!
I hate to be this guy but if you're struggling with this chances are that you'll struggle to secure the private keys. Those private keys are the keys to your empire in a way you don't even want to think about.

Think very seriously about outsourcing this to a company with insurance for it. Or get insurance yourself. The outsourcing also takes the performance hassle away from you.

If you don't, please don't forget to make (really) cold wallets. Just place that cash elsewhere.

Perhaps more directly, there's several bitcoin daemons out there. You could make your own, too, with something like bitcoinJ. I met the guys behind btcd ("BitcoinD in Go") https://github.com/conformal/btcd at Bitcoin2014, their lead coder made a good impression.

I'm afraid there's no shelved answer for this question yet. Perhaps the best advice is "Do it, once you run into trouble you're successful already. Time enough to solve it later.".