Hotlinking
- January 29th, 2008
- Write comment
What happens when you give too much of space for a very low price? People host forums in there, and give a lot of previlleges to its users. Lots of storage, and a lot of searches at any time. This means, a heavy database load for your server.
So, if you decide to put limitations on the number of database connections at any given time to 20 or 50 or 100 depending on your server’s capacity, what would people do with a lot of space? 600 GB for $10 a month is the standard that is being sold. Overselling it is, I shall discuss that later, but what would you do if your client uploads a php script that downloads all images and stores it into your hard drive, and he just opens a forum at some free phpbb sites and hotlinks to the photos in your servers?
You just waste a lot of space, and a lot of bandwidth, all that for just $10 a month that you get from the client.
How to prevent this? Have a good TOS, where you clearly mention that the user is not to host anything on the space that he has been provided that is other than anything related to the site. If he is displaying pictures on his site, let him store them there, but if he is just hotlinking, you reserve the rights to suspend his account and distribute the photos to charity.
Never allow databases to be accessed from outside your server. This is a security issue first, second, it is a waste of bandwidth and server load again. Why serve as a database server and give trouble to other clients who are sharing the database system as well?