Large IIS LogFiles using Ajax.NET

For those of you did not had a look at the LogFiles: using Ajax.NET or any other AJAX library will increase the HTTP requests made to the server. If you have enabled the log files you will get very large files.

To disable the log file for Ajax.NET requests you have to create a folder with the same name you configured the httpHandler (see web.config). By default the folder is named ajax. To disable logging for that folder you have to go to the properties of the folder by right-click in IIS manager on this folder. Disable there logging of this folder:

Published Tuesday, July 26, 2005 11:41 PM by Michael Schwarz

Comments

# re: Large IIS LogFiles using Ajax.NET

Tuesday, July 26, 2005 5:57 PM by Eric
Under IIS, you can exclude logging on individual files or directories. If you can isolate your AJAX requests, you should be able to prevent those entries. This technique also works well for image directories.

# re: Large IIS LogFiles using Ajax.NET

Tuesday, July 26, 2005 6:31 PM by Raj Kaimal

I would not turn off logging on those requests for security reasons although I would change it to minimal logging on those requests.

# re: Large IIS LogFiles using Ajax.NET

Tuesday, July 26, 2005 6:42 PM by Michael Schwarz
@Raj: Yes, of course, but I have reduced the IIS log file to a minimum (date/time, ip, method and url), but I get about 7 GB per month for http://ajax.schwarz-interactive.de/ (a "small" web application).

CIAO
Michael

# re: Large IIS LogFiles using Ajax.NET (scalabilty)

Wednesday, July 27, 2005 10:01 AM by Andres
What are the implications of this statement on scalability?

"using Ajax.NET or any other AJAX library will increase the HTTP requests made to the server"

Does that mean that if I have 8 servers doing 500 requests per second do I have to add 4+ more server just to do the same requests if I add Ajax.NET to my applications?

Andres

# re: Large IIS LogFiles using Ajax.NET

Wednesday, July 27, 2005 10:21 AM by Michael Schwarz
@Andres: No, you don't have to do this. If you are doing similar actions you have done using post backs it will decrease your traffic and the cpu usage (because not the complete page will be rendered and send back to the client) but will add more lines in the log files if activated because every Ajax.NET call will be a request to the server. This will let you allow more requests that will need less time.

# re: Large IIS LogFiles using Ajax.NET

Wednesday, July 27, 2005 11:33 AM by Martina S.
Michael,

yes, this is absolutly true. I made a small test with the performance monitor and got more requests but with less data and cpu time.

Great work and go on with that library!!!
.

# re: Large IIS LogFiles using Ajax.NET

Thursday, July 28, 2005 11:48 PM by Francesco
So now we need to know, which is better for performance:

1. Thousands of requests and hits to the DB with tiny bits of information being requested

2. Hundreds of requests and hits to the DB with large chunks of information being requested

And also, if Javascript is disabled in the browser, is AJAX a moot point?

Francesco

# re: Large IIS LogFiles using Ajax.NET

Tuesday, August 09, 2005 10:18 AM by Phil Green
Francesco:
1 or 2? Neither. You should be using:
3. Cache data to avoid hitting the database (the slowest part of the process). You could even cache the output (probably preferable) so you don't even have data processing overhead on each request. Your server will thank you for it.

AJAX - JS = System.String.Empty
disabling JavaScript renders AJAX invisible. There should be a fallback position anyway to cater for this, but the point of AJAX type RPC frameworks is that you don't have complete page refreshes.