适用的IIS版本:IIS 7.0, IIS 7.5, IIS 8.0

适用的Windows版本:Windows Server 2008, Windows Server 2008 R2, Windows Server 2012

1、应用程序池(Application Pool)的设置:

General->Queue Length设置为65535(队列长度所支持的最大值)
Process Model->Idle Time-out设置为0(不让应用程序池因为没有请求而回收)
Recycling->Regular Time Interval设置为0(禁用应用程序池定期自动回收)

2、.Net Framework相关设置

a) 在machine.config中将

<processModel autoConfig="true" />

改为

<processModel enable="true" requestQueueLimit="100000"/>

(保存后该设置立即生效)

b)
打开C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\Browsers
\Default.browser,找到<defaultBrowser id="Wml" parentID="Default"
>,注释<capabilities>部分,然后运行在命令行中运行aspnet_regbrowsers -i。

<defaultBrowser id="Wml" parentID="Default" >
    <identification>
        <header name="Accept" match="text/vnd\.wap\.wml|text/hdml" />
        <header name="Accept" nonMatch="application/xhtml\+xml; profile|application/vnd\.wap\.xhtml\+xml" />
    </identification>
<!--
    <capabilities>
        <capability name="preferredRenderingMime"              value="text/vnd.wap.wml" />
        <capability name="preferredRenderingType"              value="wml11" />
    </capabilities>
-->
</defaultBrowser>

以解决text/vnd.wap.wml问题。

3、IIS的applicationHost.config设置

设置命令:

c:\windows\system32\inetsrv\appcmd.exe set config /section:serverRuntime /appConcurrentRequestLimit:100000

设置结果:

<serverRuntime appConcurrentRequestLimit="100000" />

(保存后该设置立即生效)

4、http.sys的设置

注册表设置命令1(将最大连接数设置为10万):

reg add HKLM\System\CurrentControlSet\Services\HTTP\Parameters /v MaxConnections /t REG_DWORD /d 100000

注册表设置命令2(解决Bad Request - Request Too Long问题):

reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\HTTP\Parameters /v MaxFieldLength /t REG_DWORD /d 32768
reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\HTTP\Parameters /v MaxRequestBytes /t REG_DWORD /d 32768

(需要在命令行运行 net stop http  & net start http & iisreset 使设置生效)

5、针对负载均衡场景的设置

在Url Rewrite Module中增加如下的规则: 代码如下:

<rewrite>
    <allowedServerVariables>
        <add name="REMOTE_ADDR" />
    </allowedServerVariables>
    <globalRules>
        <rule name="HTTP_X_Forwarded_For-to-REMOTE_ADDR" enabled="true">
            <match url=".*" />
            <serverVariables>
                <set name="REMOTE_ADDR" value="{HTTP_X_Forwarded_For}" />
            </serverVariables>
            <action type="None" />
            <conditions>
                <add input="{HTTP_X_Forwarded_For}" pattern="^$" negate="true" />
            </conditions>
        </rule>
    </globalRules>
</rewrite>

6、 设置Cache-Control为public

在web.config中添加如下配置:
<configuration>
    <system.webServer>
        <staticContent>
            <clientCache cacheControlCustom="public" />
        </staticContent>
    </system.webServer>
</configuration>

http://www.jb51.net/list/list_204_1.htm

IIS Web服务器支持高并发设置的更多相关文章

  1. 支持10W高并发请求的IIS Web服务器常用设置

    支持高并发的IIS Web服务器常用设置   适用的IIS版本:IIS 7.0, IIS 7.5, IIS 8.0 适用的Windows版本:Windows Server 2008, Windows ...

  2. 了不起的Node.js: 将JavaScript进行到底(Web开发首选,实时,跨多服务器,高并发)

    了不起的Node.js: 将JavaScript进行到底(Web开发首选,实时,跨多服务器,高并发) Guillermo Rauch 编   赵静 译 ISBN 978-7-121-21769-2 2 ...

  3. 配置开发支持高并发TCP连接的Linux应用程序全攻略

    http://blog.chinaunix.net/uid-20733992-id-3447120.html http://blog.chinaunix.net/space.php?uid=16480 ...

  4. Linux配置支持高并发TCP连接(socket最大连接数)

    Linux配置支持高并发TCP连接(socket最大连接数) Linux配置支持高并发TCP连接(socket最大连接数)及优化内核参数 2011-08-09 15:20:58|  分类:LNMP&a ...

  5. IIS Web 服务器/ASP.NET 运行原理基本知识概念整理 转

    转http://www.cnblogs.com/loongsoft/p/7272830.html IIS Web 服务器/ASP.NET 运行原理基本知识概念整理  前言:      记录 IIS 相 ...

  6. 在 Azure 中的 Windows 虚拟机上使用 SSL 证书保护 IIS Web 服务器

    若要保护 Web 服务器,可以使用安全套接字层 (SSL) 证书来加密 Web 流量. 这些 SSL 证书可存储在 Azure Key Vault 中,并可安全部署到 Azure 中的 Windows ...

  7. IIS Web 服务器/ASP.NET 运行原理基本知识概念整理

     前言:      记录 IIS 相关的笔记还是从公司笔试考核题开始的,问 Application Pool 与 AppDomain 的区别?      促使我对进程池进了知识的学习,所以记录一下学习 ...

  8. IIS Web服务器日志、日志服务器分析

    IIS Web服务器日志.日志服务器分析 EventLog Analyzer是一款全面的工具,用于审计.管理和跟踪您的Microsoft Internet Information Services(I ...

  9. Linux的虚拟内存管理-如何分配和释放内存,以提高服务器在高并发情况下的性能,从而降低了系统的负载

    Linux的虚拟内存管理有几个关键概念: Linux 虚拟地址空间如何分布?malloc和free是如何分配和释放内存?如何查看堆内内存的碎片情况?既然堆内内存brk和sbrk不能直接释放,为什么不全 ...

随机推荐

  1. Linq to XML 之XElement的Descendants方法的新发现

    C#操作XML的方法有很多,但个人认为最方便的莫过于Linq to XML了,特别是XElement的Descendants方法是我最常用的一个方法. 这个方法可以根据节点名(Name)找到当前调用的 ...

  2. 微软职位内部推荐-Software Development Engineer II

    微软近期Open的职位: Job Title:Software Development EngineerII Division: Server & Tools Business - Comme ...

  3. DOM生成XML文档与解析XML文档(JUNIT测试)

    package cn.liuning.test; import java.io.File; import java.io.IOException; import javax.xml.parsers.D ...

  4. cocos2dx中的背景图层CCLayerColor和渐变图层CCLayerGradient

    1.CCLayerColor是专门用来处理背景颜色的图层,它继承自CCLayer,可以用来设置图层的背景颜色,因为CCLayer默认是透明色的,即无颜色的 2.CCLayerGradient是用来显示 ...

  5. LintCode-Unique Path II

    Follow up for "Unique Paths": Now consider if some obstacles are added to the grids. How m ...

  6. Careercup - Facebook面试题 - 5890898499993600

    2014-05-01 02:30 题目链接 原题: Given a matrix of letters and a word, check if the word is present in the ...

  7. mysql存储过程 OUT or INOUT argument 3 for routine

    mysql存储过程出现: OUT or INOUT argument 3 for routine gotask.UserLogin is not a variable or NEW pseudo-va ...

  8. c++ 格式化printf

    类型为uint64_t的变量,使用printf进行打印时,需要区分操作系统: 64位系统:使用%ld 32位系统:使用%llu #include<stdio.h>#include < ...

  9. CodeForces 173B Chamber of Secrets 二分图+最短路

    题目链接: http://codeforces.com/problemset/problem/173/B 题意: 给你一个n*m的地图,现在有一束激光从左上角往左边射出,每遇到‘#’,你可以选择光线往 ...

  10. apache nginx php不显示版本号

    apache 不显示版本号 http.conf 中的 修改为 ServerTokens ProdServerSignature Off 有的版本没有,在最后添加即可 php php.ini 中的 修改 ...