Jump to content
  • Advertisement
Sign in to follow this  
sathenzar

MySQL different HD handling?

This topic is 4842 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey everyone, I have my database system currently running off of my one and only server that's running my website. I just realized that with all these users taking up space on the HD, I would have to support multipule HDs (I've already done this) for storage purposes. However, once the first HD runs out of space the MySQL runs out of space to save into. What should I do? Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
1) get a bigger HD and migrate your DB over.

2) what we did at my old company was to parallelize the database because we were running out of possible giant servers we could buy. You basically split all your data onto n databases. Our site had it's data driven primarily based on userID. So we took half the users and put them and their data on one DB and put the other half onto another. Going forward we would load balance users across available DBs as they registered. At any point we could just hot-plug in a new DB and the load balancer would fill up the new DB. This new architecture required that we have one central database that contained maybe 2 tables and acted as a traffic controller. Those tables simply told the requester on which database any given user lived so the session could continue.

I don't know your data-set so it's hard to say what bumps you'll run into. We had to create some "ghost" objects on the parallelized DBs that linked across DBs for things like a friends list and such (in the case where friends were on different DBs).

(it's early, haven't had coffee yet. sorry if point #2 didn't come out clearly)

-me

Share this post


Link to post
Share on other sites
...and in addition, I find it useful to keep track of active users and get rid of old ones. A user hasn't logged in for a year? Send them a warning about their account being in danger. No reply within a week? delete it. Something like this can be somewhat automated, depending on the database. I don't think MySQL has triggers or I don't know about them.

Share this post


Link to post
Share on other sites
You should probably ensure that no partition ever becomes full; but if one does, you ideally want the one where you place your web logs to become full first.

The one which people dump their junk in should become full next,

Then the partition that your MySQL data etc is stored on should become full last.

To achieve this, you'll have to ensure that your

- Web access logs
- User file storage area
- MySQL database storage area

are all on different partitions.

It might be handy if the OS files / logs are also on a different partition (or you could share it with MySQL).

By "users" do you mean users of your web application, or people who are creating their own web applications? Do the users have their own storage area?

No, MySQL does not have triggers*, nor can you use a trigger to trigger or something not happening anyway. Plus even if you could, you probably wouldn't want to.

Mark

* In any version which has been released in a production-ready state.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!