0

I have a website with 200 000 visits in day, and using php output buffer, I have a questions:

With these number of hits, is the use of output buffering, right or not?

I use MVC Framework and i should using output buffer!

hakre
  • 193,403
  • 52
  • 435
  • 836
maxoya
  • 53
  • 1
  • 9
  • The most important thing in your case is to cache. Are your views cached? – Alain Tiemblo Sep 17 '12 at 18:24
  • Regarding output buffering a quick google search gave me [this SO thread](http://stackoverflow.com/questions/1556613/php-output-buffering-sounds-like-a-bad-idea-is-it), perhaps it might answer your question. – Simon Sep 17 '12 at 18:28
  • have 200000 visits a day visitors website and you don't know the output buffering ? – NullPoiиteя Sep 17 '12 at 18:29
  • i not using html cache, and i caching mysql data, such as memcache! – maxoya Sep 17 '12 at 18:29
  • 200000 hits/day = ~2.3hits/second. that's a very very light load, unless you're serving off an 8088-4.77mhz, or ENIAC. – Marc B Sep 17 '12 at 18:32
  • About which kind of output buffering are you talking? Please add the code you're using that is related to the buffering. If this is about the PHP output buffer, which configuration do you use? Also do you run into actual bottlenecks? If not, it seems that there is no problem. If yes, what is the bottleneck? I/O? CPU? Memory? – hakre Sep 17 '12 at 18:32
  • 2
    @MarcB: Never seen a site that get's the total visits equally distributed over the whole day. Never. – hakre Sep 17 '12 at 18:32
  • @hakra except for this one, ohhhhh burrrneedd! lol – wesside Sep 17 '12 at 18:46

1 Answers1

1

Output buffering never hurts, depending on what you're caching and if you want it to expire. I would use Memcache or APC, cache your pages for a certain period of time. Use a conventional Key system for proper identifiers on each page or resource and create triggers when something is updated to automatically reset the cache. (Use a PEAR Daemon for instance)

If it's a lot of database utilization, I would just cache data sets and let the pages serve up naturally. With APC, you're already freeing up a lot of I/O resources.

wesside
  • 5,622
  • 5
  • 30
  • 35