zoukankan      html  css  js  c++  java
  • 使用IIS 7.0 Smooth Streaming 优化视频服务

    http://www.cnblogs.com/dudu/archive/2013/06/08/iis_webserver_settings.html (支持高并发的IIS Web服务器常用设置)

    http://zzstudy.offcn.com/archives/13148 (windows 2008 WEB服务器IIS7.5优化配置 支持10万个同时请求)

    http://blog.snsgou.com/post-510.html

    -----------------------------------------------------------------------

    今天下午17点左右,博客园博客站点出现这样的错误信息:

    Error Summary:

    HTTP Error 503.2 - Service Unavailable
    The serverRuntime@appConcurrentRequestLimit setting is being exceeded. 

    Detailed Error Information:

    Module IIS Web Core 
    Notification BeginRequest 
    Handler StaticFile 

    Error Code 0 x00000000

    由于之前使用的是默认配置,服务器最多只能处理5000个同时请求,今天下午由于某种情况造成同时请求超过5000,从而出现了上面的错误。

    为了避免这样的错误,我们根据相关文档调整了设置,让服务器从设置上支持10万个并发请求。

    具体设置如下:

    1. 调整IIS 7应用程序池队列长度

    由原来的默认1000改为65535。

    IIS Manager > ApplicationPools > Advanced Settings

    Queue Length : 65535

    2.  调整IIS 7的appConcurrentRequestLimit设置

    由原来的默认5000改为100000。

    c:windowssystem32inetsrvappcmd.exe set config /section:serverRuntime /appConcurrentRequestLimit:100000

    在%systemroot%System32inetsrvconfigapplicationHost.config中可以查看到该设置:

    <span "courier="" new"";="" font-size:="" 12px;"=""><<span "courier="" new"";="" font-size:="" 12px;"="">serverRuntime <span "courier="" new"";="" font-size:="" 12px;"="">appConcurrentRequestLimit<span "courier="" new"";="" font-size:="" 12px;"="">="100000"<span "courier="" new"";="" font-size:="" 12px;"=""> <span "courier="" new"";="" font-size:="" 12px;"="">/><span "courier="" new"";="" font-size:="" 12px;"=""> 

    3. 调整machine.config中的processModel>requestQueueLimit的设置

    由原来的默认5000改为100000。

    <span "courier="" new"";="" font-size:="" 12px;"=""><<span "courier="" new"";="" font-size:="" 12px;"="">configuration<span "courier="" new"";="" font-size:="" 12px;"="">>
        <span "courier="" new"";="" font-size:="" 12px;"=""><<span "courier="" new"";="" font-size:="" 12px;"="">system.web<span "courier="" new"";="" font-size:="" 12px;"="">>
            <span "courier="" new"";="" font-size:="" 12px;"=""><<span "courier="" new"";="" font-size:="" 12px;"="">processModel <span "courier="" new"";="" font-size:="" 12px;"="">enable<span "courier="" new"";="" font-size:="" 12px;"="">="true"<span "courier="" new"";="" font-size:="" 12px;"=""> requestQueueLimit<span "courier="" new"";="" font-size:="" 12px;"="">="100000"<span "courier="" new"";="" font-size:="" 12px;"="">/>

    参考文章:http://technet.microsoft.com/en-us/library/dd425294(office.13).aspx

    4. 修改注册表,调整IIS 7支持的同时TCPIP连接数

    由原来的默认5000改为100000。

    reg add HKLMSystemCurrentControlSetServicesHTTPParameters /v MaxConnections /t REG_DWORD /d 100000 

    5. 运行命令使用设置生效 

    net stop http  & net start  http & iisreset 

    完成上述4个设置,就可以支持10万个并发请求,博客园博客服务器已经启用上述设置。 

    参考文章:

    IIS 7.0 503 errors with generic handler (.ashx) implementing IHttpAsyncHandler

    Tuning Windows Server 2008 for PHP 

    -----------------------------------------------------------------------

    一、Smooth Streaming简介

           为了丰富网站内容,在现有的网站中,加入少许视频,是很多网站遇到的事情,流媒体服务器高昂的价格以及,让很多网站望而却步,如何在现有的基础上优化视频播放呢,针对IIS微软推出了一块视频加速软件, Smooth Streaming

     下载地址:http://www.iis.net/download/SmoothStreaming,对于不熟悉视频的朋友,可能比较陌生,接下来让我们了解一下这款产品。

    IIS Smooth Streaming - 是Internet 信使服务 (IIS) 7.0的一个扩展,它能提供流畅的视频流媒体,并且可以根据客户端的网络带宽和CPU的执行能力的改变,随时的调整视频质量。
           IIS Smooth Streaming允许Microsoft Silverlight客户端的自适应视频流媒体Live活动。使用HTTP分发Live活动,为现有的HTTP网络带来的更贴近用户和Web广播的 HD(720p+)真实选择的优势.使用基于HTTP分发Live活动的更多好处就是,现有的HTTP架构也同样为Live活动提供更多有用的东西。
           最 流行的Web广播,内容提供商和内容分发网络(CDNs)所关心的,是他们需要在网络流媒体资源上投入多大的精力。使用主要的HTTP网络,一般是他们流 网络的10到20倍大,他们可以充分发挥他们的主要网络的优势,并且不必担心最大网络能力和Live活动的用户人数限制。
           Smooth Streaming - IIS 7.0的测试版,允许搭建一个Web服务器作为Live Smooth Streaming服务器,其内容可以从完成分发示例的基于Silverlight的客户端,虚拟的Live Smooth Streaming编码获得。本文档涵盖了以下的场景:

    ·         安装IIS Live Smooth Streaming

    ·         部署IIS Live Smooth Streaming

    二、安装IIS Smooth Streaming

    安装IIS Smooth Streaming ,下面的先决条件必须全部满足:

    ·         必须在Windows Server 2008或者Windows Vista SP1上运行IIS 7.0

    ·         使用IIS Manager的界面管理IIS Smooth Streaming,IIS管理控制台必须安装。你可以在Server Manage中安装Web Server(IIS)的IIS管理控制台角色服务。

    ·         下面的选项对安装IIS Live Smooth Streaming - 测试版有帮助:

    ·         Web Platform Installer 2.0 Beta

    ·         Web Platform Installer 1.0

    ·         Windows Installer files (Windows Server 2008 or Windows Vista SP1操作系统的32-bit 和 64-bit 版本)

    条件满足后,直接安装就可以。

    三、部署IIS Smooth Streaming

    安装完成后,在IIS中多一栏媒体服务

    针对以上各项进行设置

    2.1 比特率限制

    设置媒体格式,默认支持微软大部分媒体格式

    也可通过以下方式 添加其他媒体格式

    2.2 平滑流式处理

    2.3 实时平滑流处理

    使用此IIS 扩展插件后,客户应该会明显感觉视频更加流畅了。

  • 相关阅读:
    Sublime 设置移动光标快捷键
    Reverse Linked List II
    Reverse Nodes in K-Group
    Sort Colors
    Swap Nodes in Pairs
    Intersection of Two Linked Lists
    Word Break
    Unique Binary Search Tree
    Maximal Square
    Happy Number
  • 原文地址:https://www.cnblogs.com/fx2008/p/4192248.html
Copyright © 2011-2022 走看看