IIS7: limit traffic for the server
Asked Answered
T

1

7

How to limit traffic for the whole server with IIS7?

There is a limit feature for a site, but it works only for a separate site:

enter image description here

Also there is Bitrate Throtting plugin for IIS, but as I know it can be configured only for a separate user:

enter image description here

Is there a way to configure traffic limits for the whole server, not for a single web-site?

UPDATE: The solution is (thanks to @Arpit) setting <webLimits maxGlobalBandwidth="1000000" /> to machine config. But be careful! There is an error in IIS docs: you should type maxGlobalBand[w]idth (with lower case w), not maxGlobalBand[W]idth (with upper case W).

Thermotaxis answered 19/12, 2012 at 8:38 Comment(5)
I don't think it's possible, IIS allows you to limit traffic for a site, but making it generic is not a good idea since the server might be hosting multiple sites and this feature might come handy to divide equal bandwidth for websites.Hauteur
The thing is that it's my hoster's requirement: I have to limit traffic generated by my server. It would be ok if I have a single site on it, but I have more than one.Thermotaxis
@Lenin I think that you must go with a program that stay on the network driver and make that limits. Check this page: diggfreeware.com/five-best-bandwidth-limitershaper-software I use the cfosspeed.Eckhart
@Eckhart I wouldn't like to add additional tier between web-site and user's browser. Also I'm sure there's an overhead, although it might be not very bigThermotaxis
@Lenin This programs act like firewalls, everything pass from them, and there is the place for this limitation, on the port 80.Eckhart
H
7

Well, I have not tried it yet but you can give it a go -

In IIS7, Select the server and open the Configuration Editor. On the right hand pane, there is an option to search the configuration. We are looking for webLimits here.

This might be the key. More information about webLimits can be found here

EDIT - I found this attribute for webLimits which should help :

maxGlobalBandwidth - Specifies the maximum total bandwidth for the server. Setting the value to 0 enables unlimited bandwidth for the server. The default value is 4294967295.

Hauteur answered 21/12, 2012 at 11:29 Comment(4)
I have <webLimits /> tag in my applicationHost.config, but when I changing it to <webLimits maxGlobalBandWidth="1000000" /> I start getting an error: Configuration file is not well-formed XML pointing to my app pool's config: \\?\C:\inetpub\temp\apppools\MySite\MySite.config. I tried to look at it but the xml seems fine, I didn't change. Can you make any suggestions?Thermotaxis
@arpit- Can you check the quotation marks around maxGlobalBandwidth your xml file? I once got this error because quotes were different and I typed them in instead of copying them once.Martijn
I found the error. There is a misprint in IIS docs: maxGlobalBandWidth must be written with lower case wThermotaxis
@Arpit, thank you for your help. I don't think I would find the solution without it.Thermotaxis

© 2022 - 2024 — McMap. All rights reserved.