1

I have an audio site where user can upload their music files , but problem is i can't go for expensive hosting , since i am not monetizing this service.I am searching for some shortcuts to store the mp3 files to cut some hosting cost.

What will be best idea to do technically or any (hosting)suggestion will be help full.

I need to save server space as much as possible.

Community
  • 1
  • 1
Senthil
  • 946
  • 1
  • 14
  • 34

2 Answers2

5

In most cases, the size of your database will also count against your overall hosting space as well. Furthermore, inserting huge BLOBs into your database isn't going to help performance with it.

The typical pattern to follow when doing something like this is to save the MP3 (or any binary file) on the server in a particular directory, and save the path to the file in the database.

The least expensive way, outside of using the original hosting environment, would probably be to utilize Amazon AWS S3 reduced redundancy storage, which starts at $0.093 per GB/per month. Pretty darn cheap.

But in answer to your original question, inserting stuff in the database probably won't save server space, and if your host is worth its salt, they will pick up on a huge database that keeps growing and growing, even if they claim "unlimited databases" or similar.

Joshua
  • 1,788
  • 1
  • 11
  • 18
  • Joshua , i think bandwidth is little costly in S3. They giving 1 GB free , but my hope total download will cross 6GB/day. – Senthil Aug 14 '12 at 19:15
  • That's true, the bandwidth is charged. However, let's say you do 6GB/day = 180GB/month. You're still only looking at about $21/month. Here's a rough estimate based on what you've said: http://calculator.s3.amazonaws.com/calc5.html?key=calc-886A93A9-9B28-4ABD-A8A3-55BE0A6E26DD . If you are looking to to bandwidth like that, then you should really look to monetize the service somehow, because this sort of stuff does unfortunately cost money. – Joshua Aug 14 '12 at 19:35
0

Just consider that storing in a database (BLOB) is usually a bad practice because it slows the queries, makes the database big and fall off the database performance. A database is used to store "searchable" information, not as a data store. Although a database can do it, it's not designed for that.

Take a look to some cloud storage service/provider instead, as the ADrive services like their personal plan ( http://www.adrive.com/personal_basic ) that let you store 50G for free (Im not sure if it's a trial), and also has Remote File Transfer functionality that allows you to transfer files from external websites.

I never tried this service, but give it a try, it's free and maybe solves your problem

Miguel A. Carrasco
  • 1,379
  • 1
  • 15
  • 26