Hello,
Does anyone have experience with high load websites where you deliver static content through PHP? I am setuping a file download site and I am serving some files through PHP. Actually I am limiting the file download speed with PHP so that it sends x bytes and then sleeps one second... this way I can effectively make more premium users, but I am wondering if this is too challenging for the processor to handle all file downloads through PHP? Or are there Apache modules that can do the same?
Serving static content through PHP - bad idea?
Moderator: General Moderators
- kaisellgren
- DevNet Resident
- Posts: 1675
- Joined: Sat Jan 07, 2006 5:52 am
- Location: Lahti, Finland.
- jaoudestudios
- DevNet Resident
- Posts: 1483
- Joined: Wed Jun 18, 2008 8:32 am
- Location: Surrey
Re: Serving static content through PHP - bad idea?
Apache's htaccess file can limit the connection speed. It might be more efficient than php?
Re: Serving static content through PHP - bad idea?
i would imagine that to be at TCP level, not IP. if you have limited speed access from your server out, the only way is to ask your host for faster link out. I really don't think servers choke for downloads. Once triggered, the sockets do the work.
- kaisellgren
- DevNet Resident
- Posts: 1675
- Joined: Sat Jan 07, 2006 5:52 am
- Location: Lahti, Finland.
Re: Serving static content through PHP - bad idea?
Sounds good.jaoudestudios wrote:Apache's htaccess file can limit the connection speed. It might be more efficient than php?
It's not because of having a bad server. It's because I want to have a feature. VIP users should get faster downloads than guests, for instance. Just like MegaUpload, RapidShare, etc do.php_east wrote:i would imagine that to be at TCP level, not IP. if you have limited speed access from your server out, the only way is to ask your host for faster link out. I really don't think servers choke for downloads. Once triggered, the sockets do the work.
- jaoudestudios
- DevNet Resident
- Posts: 1483
- Joined: Wed Jun 18, 2008 8:32 am
- Location: Surrey
Re: Serving static content through PHP - bad idea?
You must have a big server with a fat pipe?
- kaisellgren
- DevNet Resident
- Posts: 1675
- Joined: Sat Jan 07, 2006 5:52 am
- Location: Lahti, Finland.
Re: Serving static content through PHP - bad idea?
Not me.jaoudestudios wrote:You must have a big server with a fat pipe?
Re: Serving static content through PHP - bad idea?
ah, i see. you cruel beastkaisellgren wrote: It's not because of having a bad server. It's because I want to have a feature. VIP users should get faster downloads than guests, for instance. Just like MegaUpload, RapidShare, etc do.
- jaoudestudios
- DevNet Resident
- Posts: 1483
- Joined: Wed Jun 18, 2008 8:32 am
- Location: Surrey
Re: Serving static content through PHP - bad idea?
Your pipe and traffic must be quite big if you want to host lots of files.
I am planning on hosting some virtual server images in the near future, fedora10, centos5.2, ubunut8.10 (including latest updates). Zipped they are about 1.4GB, I am affraid that I will go over my 4TB limit each month
I am planning on hosting some virtual server images in the near future, fedora10, centos5.2, ubunut8.10 (including latest updates). Zipped they are about 1.4GB, I am affraid that I will go over my 4TB limit each month