Anton Sidorov homepage

Bookmark this to keep an eye on my project updates!

Follow me on GitHub

IIS

Архитектура

Request-processing architecture which includes:

  • Protocol listener
    • IIS provides Hypertext Transfer Protocol Stack HTTP.sys as the protocol listener
      • listens for HTTP and HTTPS requests on website binding endpoints
      • If no worker process is available to handle a request, HTTP.sys places the request in a kernel-mode queue
      • Затем это позволяет рабочим процессам IIS (IIS worker processes) выводить эти запросы из очереди на обработку.
      • Logs written into: C:\Windows\System32\LogFiles\HTTPERR
    • Windows Communication Foundation (WCF) - protocols other than HTTP and HTTPS
  • World Wide Web (WWW) Publishing Service (W3SVC)
    • runs as part of an instance of the process svchost.exe
    • The IIS web service that configures Http.sys to listen for requests based on your IIS WebSite configuration.
    • collects performance counters for each IIS site
    • User-mode listener adapter for HTTP.sys
    • Logs written into: System Event Viewer
  • Windows Process Activation Service (WAS/WPAS)
    • enables sites to use protocols other than HTTP and HTTPS. manages for both HTTP and non-HTTP requests
    • The IIS service that coordinates
      • the creation of IIS worker processes (w3wp.exe)
      • based on your application pool configuration
    • конфигурация храниться в ApplicationHost.config
    • Logs
      • written into: System Event Viewer
      • IIS Logs in C:\intepub\logs\LogFiles\W3SVC*
  • Application pool - This is a logical container, not a physical process
    • The application pool routes request processing for a set of applications in your website to a specific IIS worker process
  • IIS worker processes (w3wp.exe) - this is the actual runtime host for the application, where request processing takes place
    • Worker processes in one pool do not share resources with other pools
    • You can pass configuration settings to a single pool to, for instance, throttle the CPU utilization of its workers
    • Each application pool defaults to a single worker process, and you can configure your pools to include more
    • When we talk about restarting or recycling the application pool, we are actually talking about starting a new fresh worker process
  • Application
    • An IIS application maps a url in your website to a physical ASP.NET application domain that’s hosting your application code
    • When you are having performance issues, it’s the application code and its memory state that is usually causing the trouble. It could be a hang, high CPU, or a memory leak … the application is the piece we really need to restart.
  • Web server engine that can be customized by adding or removing modules

Modules

Modules:

  • Native Modules
    • HTTP Modules
    • Security Modules
    • Content Modules
    • Compression Modules
    • Caching Modules
    • Logging and Diagnostics Modules
  • Managed Modules

Процесс обработки запроса (Pipeline) и основные компоненты

  • IIS 7 - на разных версиях IIS может отличаться.
  • IIS listens for HTTP requests (as well as requests for other protocols) before creating worker processes to handle the request
    • listener HTTP Stack HTTP.SYS (метрики)
      • Waits for an HTTP request and then sends the request to an IIS service for processing
        • HTTP.sys contacts WAS to obtain information from the configuration store
          • WAS requests configuration information from the configuration store, applicationHost.config
          • HTTP.sys receives from WWW Service (W3SVC) configuration information, such as IIS Application pool and IIS WebSite configuration.
        • WAS starts\creater a worker process for the application pool to which the request was made.
        • IIS Application pool 1 (метрики), isolate site
        • IIS Application pool X
          • IIS Worker Process 1
          • IIS Worker Process X
      • When processing is complete, HTTP.sys sends the response back to the browser.
      • HTTP.sys also has a cache and if it has the requested file in cache it can return it directly to the client browser without having to contact any IIS services for processing.
    • listener WCF Service

MIRO flow

Мониторинг

Логирование

log-parser

  • log-parser
  • log parser studio
  • example
  • Hourly Bandwidth (chart) Requests by URI
  • Search the Event Log for W3SVC (IIS)
  • Bytes Sent and Bytes Received are not selected, but they are very useful when troubleshooting a performance problem.
    • в IIS логах есть?? sc-bytes, cs-bytes НЕТУ
  • sample
  • !!!
  • weblog

Диагностика Troubleshooting

Version

  • 8.5
  • 10
    • Failed request tracing – traceAllAfterTimeout
    • HTTP/2