You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by ccw <cc...@pair.com> on 2003/05/23 16:46:38 UTC

[users@httpd] Will the server performance be affected very much?

Hi, in order to prevent users from some specific IP addresses to access my web site, I use "Deny From" followed with 538 IP addresses in .htaccess(all are IP numbers with the format 'xx.xx.xx.xx/xx', for example, '66.08.0.0/20'). My problem is, whether such a large group of denied IP addresses in .htaccess will affect the server speed or performance very much, since each time a user tries to access my website, Apache server will compare his IP address with the denied IP addresses? Thanks.

Re: [users@httpd] Will the server performance be affected very much?

Posted by Joshua Slive <jo...@slive.ca>.
On Fri, 23 May 2003, ccw wrote:

> My problem is, whether such a large group of
> denied IP addresses in .htaccess will affect the server speed or
> performance very much, since each time a user tries to access my
> website, Apache server will compare his IP address with the denied IP
> addresses?

The best way to answer this question is to compare.  Use a tool like ab to
assess performance with and without the .htaccess.  A couple guesses at
what you will find:

1. The biggest performance hit is probably from needing to read the
.htaccess file on every request.  If you instead placed those directives
in httpd.conf (where they are read only at startup) you would probably
increase performance.

2. Unless your site is very busy, I'd guess you won't notice any
substantial difference anyway.  Allow/Deny directives are not very
resource hungry.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Will the server performance be affected very much?

Posted by WC -Sx- Jones <li...@insecurity.org>.
On Friday, May 23, 2003, at 10:46  AM, ccw wrote:

> Hi, in order to prevent users from some specific IP addresses to 
> access my web site, I use "Deny From" followed with 538 IP addresses 
> in .htaccess(all are IP numbers with the format 'xx.xx.xx.xx/xx', for 
> example, '66.08.0.0/20'). My problem is, whether such a large group of 
> denied IP addresses in .htaccess will affect the server speed or 
> performance very much, since each time a user tries to access my 
> website, Apache server will compare his IP address with the denied IP 
> addresses? Thanks.


Some projects are better handled by a package designed for such a task.

google for PORTSENTRY  You will need to search for a source tarball, 
Cisco purchased the original makers and have been trying not to 
distribute it...

HTH  :)

http://insecurity.org/
_Sx____________________
  ('>    iudicium ferat
  //\   Have Computer -
  v_/_    Will Hack...

               \|/ ____ \|/
               "@'/ .. \`@"
               /_| \__/ |_\
                  \__U_/


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Will the server performance be affected very much?

Posted by Joshua Slive <jo...@slive.ca>.
On Fri, 23 May 2003 na11@daimlerchrysler.com wrote:
> You'll probably also want to run it on the same box as the web server so
> you don't tax your network.

Oops.  Not a good idea, in general.  The loopback interface has VERY
different characteristics than the regular network interface in many
situations.  Testing over the loopback is therefore rarely a good way of
getting real performance data.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Will the server performance be affected very much?

Posted by na...@daimlerchrysler.com.





It's likely that this will affect performance since it will have to check
each request against each of the 538. Check out the program ab that comes
with apache and is installed in the apache bin directory. This program will
generate HTTP requests against the web server and allow you to see what
kind of impact config changes will have on your web server. So run it once
without the ACLs and once with the ACLs.

ab runs something like this:

./ab -n 1000 -c 100 http://localhost/index.html

just run ./ab without any options to see the help page

You'll want to run this on a test box because it will slam your web server.
You'll probably also want to run it on the same box as the web server so
you don't tax your network.


-Norm
|-----------------------------+-------------------------------------------|
|   "ccw" <cc...@pair.com>      |                                           |
|                             |                                           |
|   05/23/2003 10:46 AM       |                                         To|
|                             |                <us...@httpd.apache.org>   |
|         Please respond to   |                                         cc|
|      users@httpd.apache.org |                                           |
|                             |                                    Subject|
|                             |                [users@httpd] Will the     |
|                             |                server performance be      |
|                             |                affected very much?        |
|                             |                                           |
|                             |                                           |
|                             |                                           |
|                             |                                           |
|                             |                                           |
|                             |                                           |
|-----------------------------+-------------------------------------------|









Hi, in order to prevent users from some specific IP addresses to access my
web site, I use "Deny From" followed with 538 IP addresses in .htaccess(all
are IP numbers with the format 'xx.xx.xx.xx/xx', for example, '66.08.0.0
/20'). My problem is, whether such a large group of denied IP addresses in
.htaccess will affect the server speed or performance very much, since each
time a user tries to access my website, Apache server will compare his IP
address with the denied IP addresses? Thanks.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org