Learned about the Apache2 MaxClients directive which I set in my /etc/apache2/apache2.conf file. To figure out which MPM section to put the setting in I ran:
# apache2 -V | grep MPM
Learned about the Apache2 MaxClients directive which I set in my /etc/apache2/apache2.conf file. To figure out which MPM section to put the setting in I ran:
# apache2 -V | grep MPM
I learned about Apache2 mod_status today. This can be used to monitor the status of your Apache server!
Read an article ab – Apache HTTP server benchmarking tool for apache stress test about the ‘ab’ command which can be used to stress test a website.
I used it and figured out that my webserver could handle about 100 requests per second.
The command I used was:
# ab -c 100 -t 10 -r http://www.example.org/test.php
Looking for a small 1×1 pixel transparent GIF image to use in your website? Here is a 1×1 pixel transparent GIF image. You could use a transparent PNG instead, but then the file size would be bigger, so why would you do that? :)
I’m working on an application that is going to need to scale, and I haven’t done this before. One of the things I wanted to know what how many requests per second I could expect a single load balancer to support. I found this article Benchmarking Load Balancers in the Cloud which says that on average you can get about 5000 requests/sec through a load balancer.
Read this article SEO Best Practices for URL Structure this evening and learned to use no more than 3-5 words in your URL as according to Google’s Matt Cutts if there are more than 5 words Google algorithms typically will just weight those words less and just not give you as much credit.
To format a float value as a percentage in PHP:
$formatted = sprintf( '%.2f', $value * 100 );
I was interested to know if using prepared statements was a waste of time if the statement was only going to be used once. I found Are Prepared Statements a waste for normal queries? (PHP) on StackOverflow and basically came away with the understanding that it’s a pretty low overhead and it’s good for security so you might as well use prepared statements all the time.
Found a great article today! PHP Best Practices.
I’m trying to make my mind up about whether I should be using mysqli or PDO for a project I’m just starting and I’ve found a few relevant articles:
And based on all of that I think I’ve decided to use PDO.