Bluehost.com Web Hosting $6.95

Re: [PHP] Whats more efficient? (Conclusion)

This is a discussion on Re: [PHP] Whats more efficient? (Conclusion) within the PHP General forums, part of the PHP Programming Forums category; Hey, thanks for replying. /* ....but you can still overcome this with some good server-side caching (for example, is it ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-22-2003
Ryan A
 
Posts: n/a
Default Re: [PHP] Whats more efficient? (Conclusion)

Hey,
thanks for replying.

/*
....but you can still overcome this with some good server-side
caching (for example, is it necessary to dynamically generate a response for
every request if the data isn't very volatile?).
*/

My main pages are basically querying the databases for hosting plans
depending on what the client chooses....
what do you suggest? and any urls for reading up on caching?

Thanks,
-Ryan
Reply With Quote
  #2 (permalink)  
Old 10-22-2003
Chris Shiflett
 
Posts: n/a
Default Re: [PHP] Whats more efficient? (Conclusion)

--- Ryan A <ryan@coinpass.com> wrote:
> My main pages are basically querying the databases for hosting plans
> depending on what the client chooses....
> what do you suggest? and any urls for reading up on caching?


Caching is a generic term, so it's tough to search for documentation about a
specific type of caching.

The type I am referring to is a lot like how Slashdot works. Imagine if they
queried the database and generated every single page (with mod_perl) for every
single request. That would take a lot of resources to sustain, right? But, they
only have a handful of servers.

Most of their popular content (like the front page) are generated on the server
at regular intervals, not at request time. So, when you request the front page,
you get a static document, even though the content is dynamic. This is why you
will notice a slight delay in refreshes (number of posts, etc.).

This is a good way to take control of the load on your server. If you generate
a page once per minute, that page will only be generated 525,600 times (I
enjoyed Rent, if you're wondering if I calculated that). Compare this to
millions of generations a day, and you can see how you can significantly reduce
the amount of resources you need. The site I currently operate gets 10 million
hits a day, which works out to about 3.5 billion hits a year. So, I could
generate content once a second, and it would still be better than doing it once
per request.

That wasn't the greatest explanation, but hopefully you get the idea.

Chris

=====
My Blog
http://shiflett.org/
HTTP Developer's Handbook
http://httphandbook.org/
RAMP Training Courses
http://www.nyphp.org/ramp
Reply With Quote
  #3 (permalink)  
Old 10-22-2003
Mika Tuupola
 
Posts: n/a
Default Re: [PHP] Whats more efficient? (Conclusion)

On Wed, 22 Oct 2003, Ryan A wrote:

> what do you suggest? and any urls for reading up on caching?


Some benchmarks on content and bytecode caching:

http://www.appelsiini.net/~tuupola/a...hmarking-phpa/

--
Mika Tuupola http://www.appelsiini.net/~tuupola/
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 02:09 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0