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:
7 Comments
Comments have been disabled for this content.
Eric said
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.
Raj Kaimal said
I would not turn off logging on those requests for security reasons although I would change it to minimal logging on those requests.
Andres said
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
Michael Schwarz said
@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.
Martina S. said
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!!!
.
Francesco said
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
Phil Green said
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.