best approach to storing offline messages between users?
my website-hoster is allowing me unlimited amount of MS SQL databases - but each database may only be a max of 3GB.
My Users database is separate from my Main database. The Main db contains several tables consisting of strings and numbers (no blobs), for example: "Messages", "BugReports", "UserOptions"
I am allowing offline messages between users - when a message can't be delivered it is stored in the "Messages" table. This works great, but I worry: in the long term, what happens when the website gets a lot of traffic and the database nears 3GB ?
Should I make the "Messages" and "开发者_如何转开发BugReports" tables separate databases instead ?
If you store them in a separate database, they will still fill that one up, wouldn't they? So you'll need to shard the Messages
table across a number of databases.
If you 're site is so successful to get enough traffic that you run into the 3Gb limit, then look at changing the provider to someone that allows bigger databases, or a dedicated host, or collocation. Yes, you can argue that if you make your app work on 3 GB shards you can scale easier later, but you'll spend a lot of effort to get this working to surpass such an artificial limit. Spend you effort on features useful to your end users instead. With a good design, 3Gb should go a long mile.
Host MyPhpAdmin on ur server. I'm not sure who your hosting with but a lot of them offer unlimites disk space. That way you will have unlimited databases with unlimited capacity.
精彩评论