Load testing PHP script

by gat0r
11 replies
Hey everyone! I just built a new URL shortener and it's getting really good reviews so far in another thread here. The URL is NAGG - Free, Editable, Offshore URL Shortener.

I see it growing quite a bit so I'm here in the programming section to ask a few questions about caching, load testing, etc before it becomes an issue.

I've used loader.io to test my main php redirect script and I'm getting roughly the following:
10 - 25 requests per second result in no timeouts or failures.
100 requests per second result in some failed requests and time outs.

Do you use anything else for load testing? How do you actually locate slow spots in your code?

Thank you!!
#load #php #script
  • Profile picture of the author Blakos
    Debug it, time stuff, and you can then see the flaws within the code.
    {{ DiscussionBoard.errors[8232092].message }}
    • Profile picture of the author Paul Moss
      Originally Posted by Blake Michelutti View Post

      Debug it, time stuff, and you can then see the flaws within the code.
      No, this is the worst suggestion anyone can make. There are no real-world metrics here.

      If you want to see how your site does under load. Try https://www.blitz.io I'm not in any way affiliated with the site. However I have used server optimisation techniques for nginx, mysql, memcacheD, apc and cloudflare and gotten down page requests to double digits milliseconds lol.

      This site, athough it costs money is a good way to get metrics!
      {{ DiscussionBoard.errors[8247677].message }}
      • Profile picture of the author gat0r
        Thank you guys for all of your suggestions and for the compliments. So far it hasn't been an issue because the site is only generating a few thousand redirects per day. But I can see it growing pretty quickly and me needing more resources.
        {{ DiscussionBoard.errors[8252732].message }}
  • Profile picture of the author Blakos
    Dude, I really like your website design, very good, only thing wrong is when you hover over the buttons, the mouse arrow does not change into a hand. It will just make it easier for the viewer to identify it as a clickable button, although it may be obvious, just a suggestion.
    {{ DiscussionBoard.errors[8232107].message }}
  • Profile picture of the author temmokan
    I'd suggest to look into Web server/database backend error logs for a start, raising log level if necessary, to detect possible reason for that behaviour.

    Also, I would emulate high load on local installation (not on primary site), using, say, jmeter.
    {{ DiscussionBoard.errors[8238190].message }}
  • Profile picture of the author Michael71
    Signature

    HTML/CSS/jQuery/ZURB Foundation/Twitter Bootstrap/Wordpress/Frontend Performance Optimizing
    ---
    Need HTML/CSS help? Skype: microcosmic - Test Your Responsive Design - InternetCookies.eu

    {{ DiscussionBoard.errors[8238826].message }}
  • Profile picture of the author Andrew H
    add to your .submit css
    cursor: pointer
    Signature
    "You shouldn't come here and set yourself up as the resident wizard of oz."
    {{ DiscussionBoard.errors[8239191].message }}
  • send me a PM I'll be more then happy to help out.
    Signature
    WebDevelopmentGroup NYC & CA- Small Business Web Development, App Development, WordPress Development, Graphic Designs, Online Marketing, Local Marketing & more!. "Call us 1.800.219.1314 or message us!". Visit us today! "Now On Live Chat Mon-Fri.". www.WebDevelopmentGroup.org
    (Whitelable our Services)
    ===================================
    ==> #1 OFFLINE MARKETING FORUM ON THE WEB! <==
    www.OFFLINEMARKETINGFORUM.com
    (Register Now)
    {{ DiscussionBoard.errors[8255932].message }}

Trending Topics