NYCPHP Meetup

NYPHP.org

[nycphp-talk] Writing large files to client efficiently

Michael B Allen ioplex at gmail.com
Thu Jan 10 17:44:54 EST 2008


On 1/10/08, John Campbell <jcampbell1 at gmail.com> wrote:
> > In your experience, how much slower is fpassthru compared to serving
> > static content? Is it twice as slow?
>
> Well, I just tested it and it doesn't appear to make much difference.
> You have to fire up the php interpreter either way.   I am running
> PHP+APC, and I see 4.2 ms for both requests with the redirect method
> and 4.7ms per request using fpassthru.  (I am testing with ab on the
> local machine).
>
> Bandwidth and storage will bite you first anyway.
>
> > Also, regarding fpassthru on multiple servers, do you mean that with
> > static files you can redirect to other servers and distribute the
> > load?
>
> Yeah that was what I was getting at.  You have a lot of options, but I
> recommend designing your system so it separates the "what" from the
> "where".

Sound advice.

Thanks,
Mike

-- 
Michael B Allen
PHP Active Directory SPNEGO SSO
http://www.ioplex.com/



More information about the talk mailing list