1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Can a PHP script handle 30K visitors daily without a framework??

Discussion in 'PHP' started by david_ben, Jun 8, 2013.

  1. #1
    Hello guys,

    I'm curious about that. As far as I know, having 10,000+ daily visitors, a script should have framework. Now, I want to build a website but without zend or other frameworks. Is it possible or real? Let's say, how can a simple php handle 10K++ visitors daily?? If it's possible, then why to use frameworks?

    Thanks in advance for your oppinions
     
    Solved! View solution.
    david_ben, Jun 8, 2013 IP
  2. sorindsd

    sorindsd Well-Known Member

    Messages:
    201
    Likes Received:
    3
    Best Answers:
    2
    Trophy Points:
    118
    #2
    Usually a script build in simple php would be handled easier by the server than a script build in any framework. Any framework would need more resources(CPU and memory)
     
    sorindsd, Jun 8, 2013 IP
    digitalpoint and browntwn like this.
  3. #3
    Hi David,

    Th reason to use framework is that theoretically you should write less code.
    Depending by the site, it is not always true.
    Anyhow the frameworks will add some CPU overhead.
    The problem with the number of visitors is if they come all in the same time/second or if they are nicely spread over the entire day.

    BR,
    Marcel
     
    Marcel Preda, Jun 8, 2013 IP
  4. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #4
    It should not be a real big problem! :) most databases and webservers can handle with ease 10k - 100k of visitors a day... the only thing you need to do is optimalize your site...
     
    EricBruggema, Jun 10, 2013 IP
  5. ActiveFrost

    ActiveFrost Notable Member

    Messages:
    2,072
    Likes Received:
    63
    Best Answers:
    3
    Trophy Points:
    245
    #5
    ActiveFrost, Jun 10, 2013 IP
  6. gudzik

    gudzik Member

    Messages:
    44
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #6
    it all depends on the style of writing scripts, database queries and the power of the server...
    for example:
    P4 2.4 / 4 GB RAM / 4*250 GB Raid 10 had hit a 20-22mln per day.
    Unique visitors in 2mln/day.
     
    gudzik, Jun 10, 2013 IP
  7. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #7
    Given that frameworks are often LARGER than custom code, incur MORE overhead, and are a crutch for the inept, I'm left wondering just where the **** you got the idea a framework is better with more traffic.

    At best they are a sleazy shortcut used by the inept -- at worst they are bloat that decreases performance and leaves you at the mercy of some other developers choices. I do not advocate the use of frameworks in ANY interpreted language -- I don't care if it's PHP with trash like codeignitor, templating asshattery like Smarty, javascript idiocy like mootools or jquery, or HTML/CSS idiotic BS like YUI, Grid960 or LESS.

    They all do more harm than good, and people are dumber for these even existing -- The end result is most always bloated slow, halfit garbage that often defeat the entire point of using the underlying technologies.

    This sums up my opinion of web frameworks quite nicely
     
    deathshadow, Jun 10, 2013 IP
  8. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #8
    Until we know your actual business requirements and your time/financial budgets for meeting those requirements there's alot we can't say.

    Will the site be serving up cachable articles or doing complex calculations for each of those 10,000 visitors? Even a low traffic site running openx will crash the server and find themselves booted off shared hostgator hosting (for instance).

    So sure you can deliver the site without using one - but you cut the security aspect down to the most basic protection and I believe that is a good reason to use a library/framework/cms as there will be a group of people working to ensure the security is good enough. In some cases, like WordPress (cms) it also makes you a target and that needs to be taken into account too.

    The key reason people use frameworks, I believe, is that they can deliver a product to their client on time and on budget more easily than if they recreate the wheel.
     
    sarahk, Jun 10, 2013 IP
  9. reyfus

    reyfus Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    3
    #9
    Well facebook was built off PHP/Mysql and it handles around a billion hits a day.
     
    reyfus, Jun 23, 2013 IP
  10. qtriangle

    qtriangle Active Member

    Messages:
    179
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    75
    #10
    a PHP script that is not on a framework is lighter, and can handle traffic. Traffic handling is usually dependent on database access, so you must optimize database access.
    You may also use some web servers like litespeed and varnish plugins to increase performance.
     
    qtriangle, Jun 23, 2013 IP
  11. blueparukia

    blueparukia Well-Known Member

    Messages:
    1,564
    Likes Received:
    71
    Best Answers:
    7
    Trophy Points:
    160
    #11
    Already answered many times, but frameworks are generally a bad thing. I've used them before (sometimes heavily) and have phased out the practice to only things personally used by me (and not redistributed, I use a graphing API for analytics for instance.)

    It is a time saver, but you usually do not need most of the functions which a framework used - rendering it unnecessary.

    In PHP you don't even have the excuse of functions to save time really - since everything you can dream of is already function. file_get_contents(), function_exists(), levenshtein(), trim(), rtrim() and ltrim() are all functions. Hell, there's even a similar_text() function. What more do you want? I can read an RSS feed with one function. No other language lets you do that off the bat.

    Facebook compiles their PHP to C. It is optimized as f**k. Unfortunate about the lack of that on the frontend though.
     
    blueparukia, Jun 25, 2013 IP
  12. creativeD

    creativeD Member

    Messages:
    37
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #12
    Frameworks are often necessary to offload complex issues and make development easier, while it's true that they add another overhead, they also can have tons of features that help performance for traffic heavy sites ( load balancing, cdn etc ). What it really comes down to is that if you're writing a highly interactive site, that is dynamic ( needs constant code updates ) then a framework is definitely the way to go. As to how much users raw vs framework, thats generally a web server issue unless the framework is horribly coded ( and the same can happen with your raw code ).
     
    creativeD, Jun 26, 2013 IP
  13. Pod2G

    Pod2G Member

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #13
    If you are not using any framework then write well optimized queries and short codes instead of long queries. I reckon any PHP script can handle any amount of users if you Optimize it correctly.
     
    Pod2G, Jun 29, 2013 IP