IIS 6.0 and asp.net

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    7 Favorites

    IIS 6.0 and asp.net - Presentation Transcript

    1. Building Scalable And High Performance Web Applications on IIS 6.0 And ASP.NET Rishi Kothari
    2. Agenda
      • What is new in IIS 6.0
      • ASP.NET Performance Tips & Tricks
    3. Me.About()
      • What do I do:
        • U2U
          • Training
            • Standard Microsoft MOC curriculum
            • Specialized Microsoft curriculum written by U2U
        • U2U.BIZ
          • Coaching & Consultancy Services on the full range of Microsoft Development Tools
            • .Net Development
            • SQL Server, SharePoint Portal Server, …
        • Microsoft Regional Director
          • independent developers and architects chosen for their leadership in their local technology circles
    4. After Windows Server 2003 installation Where is my Web Server ?
      • This Windows Server 2003 thing doesn't work, let’s switch back to Windows 2000
      • But wait:
        • IIS 6.0 not installed by default
        • Once installed
          • IIS 6.0 only serves static content by default
          • Security is much more locked down by default.
    5. IIS 6.0 Architecture
    6. Rearchitecting IIS Why do it - Current Challenges
      • Availability – need 99.999% uptime
        • Apps can still run in INETINFO on IIS5, which can affect web server reliability
      • App isolation comes at a cost
        • Perf vs. Reliability
        • Can’t isolate everything!
      • IISRESET = Heavy Hammer
        • Resets connections
    7. Rearchitecting IIS A review of IIS5 TCP/IP kernel user WinSock 2.0 DLLHost.EXE ISAPI Extensions DLLHost.EXE ISAPI Extensions INETINFO.EXE Metabase ISAPI Filters and Extensions DLLHost.EXE ISAPI Extensions INETINFO.EXE Metabase ISAPI Filters and Extensions
    8. Rearchitecting IIS A New Architecture for IIS6
      • GOAL: enable complete app isolation from other web apps and core web server
      • Web service in INETINFO split out to do this:
        • HTTP.SYS: kernel mode listener and request router
        • WAS: config and process manager
        • Worker Processes: where web apps are processed
      • Multiple Worker Processes
      WAS Worker Processes web app HTTP.SYS kernel
    9. Rearchitecting IIS HTTP.SYS
      • What is it?
        • Kernel-mode HTTP stack/listener
        • Always running
        • Supports listening on IPv4 and IPv6 protocols
      • Reliability Features
        • Doesn’t load or run any web apps including ISAPI filters and extensions
        • Process routing based on URL
        • Request queues: kernel-mode queuing
      • Performance Features
        • Kernel-mode response cache
        • Text-based and binary logging
    10. Rearchitecting IIS W3 Worker Processes– W3WP.exe
      • What is it?
        • Main web processing core responsible for handling web requests
      • Self–contained web server
        • Contains all web request processing functionality
        • Loads ISAPI’s – filters and extensions
          • ASP, ASP .NET, FrontPage ® Server Extensions
      • Delivers complete isolation from system components and other web apps
    11. Rearchitecting IIS Web Admin Service (WAS)
      • Application Manager
        • Manages lifetime of Worker Processes
      • Configuration Manager
        • Configures HTTP.SYS
      • No application code
        • Ensures web server reliability
        • External monitor of web application processes
        • Ensures web application and service reliability
      • Hosted in SVCHOST.exe
        • Actually part of W3SVC
    12. Process Model Contrast IIS5 to IIS6 – Making it more robust HTTP.SYS TCP/IP Connections Requests User Mode Kernel Mode WAS ASP.NET Filters Worker Process ASP.NET Filters Worker Process ASP.NET Filters Worker Process INETINFO metabase AppPool 1 AppPool 2
    13. IIS 6.0 Availability Enhancements
    14. Application Pools Application Isolation in Processes
      • Can create 1 or more application pools
        • Each served by 1 or more processes.
        • Each worker process serves only 1 pool.
        • Reqs routed directly to pool by HTTP.sys
      • Isolate apps based on:
        • Site/Customer
        • Functionality
        • Reliability
    15. Recycling What is it and Why use it?
      • What is it?
        • Periodically restart applications based on:
          • Uptime
          • # of requests
          • Scheduled time
          • Memory consumption
          • On-demand
      • Why use it?
        • Refresh apps to ensure availability
        • Prevent bad apps from taking over the system
      • No interruption in Service!!
    16. Recycling Overlapping Recycle kernel user Ready for Recycle Shut down WAS HTTP.SYS Old Worker Process ISAPI Exts & Filters Web Proc. Core DLL New Worker Process ISAPI Exts & Filters Web Proc. Core DLL Request startup ready Request
    17. Health Detection Crash Detection & Rapid Fail Protection
      • WAS detects process crash/AV’s
      • On failure
        • Publish event to event log
        • Check “crash count”
        • If (Crash count > Max Crashes in time limit)
          • Disable app pool
        • Else start new process if demand
      • Rapid Fail Protection
        • Only allow x crashes in y minutes
        • Return 503’s when invoked
    18. ASP.NET Best Practices
    19. ASP.Net & Windows Server 2003
      • .Net Framework delivered in the box
      • ASP.NET will use the IIS6 process model when running in W3WP.exe
        • Runs completely within W3WP.exe
        • Takes advantage of complete process isolation and added health/reliability features
      • Store ASP.NET’s session state externally
        • Persist state through a recycle
    20. Logical/Physical Design Best Practices
    21. Logical Design
      • Design your applications using logical 3-Tier Design Practices:
        • Pages (.aspx) and User Controls (.ascx)
        • Reusable Biz & Data Classes in in dir (.vb + .cs)
        • Data within a SQL Database
      • Design your Web application so that it can be distributed across a Web farm
        • Your code shouldn’t assume that a client will always return to the same machine
        • Be careful of assumptions regarding statics and application state
    22. Physical Deployment
      • Deploy your applications such that the pages and components run in same process
        • Deploying onto remote servers connected via DCOM(COM+ Enterprise Services), Remoting or Web Services will almost always hurt your performance
        • Leverage Web services only for application to application communication -- not intra app calls
    23. 3 Tier Deployment Numbers
    24. Server Control Performance Recommendations
    25. Server Controls
      • Server controls provide a very clean programming model abstraction
        • Recommended way to build ASP.NET pages
      • Server controls do more rendering/postback work that old-style <%= %> code
        • Should understand what this work is and optimize for it accordingly
      • Net take: the more individual server controls on page, the more this overhead can be noticed
        • Need to be especially aware of this w/ composite list controls that generate multiple controls per data row
    26. Control Rendering Test
    27. Caching Performance Best Practices
    28. Design For Caching
      • Cache, Cache, Cache – never do work you don’t need to do
      • Leverage the built-in ASP.NET built-in caching features
        • Output Caching
        • Fragment Caching
        • Cache API
      • Recommendation:
        • Specifically design your pages around these features – can lead to massive perf wins
    29. Output Caching
      • Caches the static result of an ASP.NET page
        • Declarative <%@ OutputCache %> directive
        • Optional Output Cache APIs can also be called
      • Caching Options:
        • Duration
          • Time item exists in the cache
        • VaryByParam
          • Varies cache entries by Get/Post params
          • Name param, separate by semi-colons, supports *
        • VaryByHeader
          • Varies cache entries by Http header
        • VaryByCustom
          • Override method within Global.asax to custom vary by whatever you want (you control the cache key)
    30. Dynamic Kernel Caching GET http://www.acme.com/store/sproketcatalog.aspx Without Cache <%@ OutputCache Duration=&quot;10&quot; VaryByParam=&quot;none&quot; %> Request Response With Cache Request Response

    + Rishi KothariRishi Kothari, 3 years ago

    custom

    8121 views, 7 favs, 1 embeds more stats

    Building Scalable And High Performance Web Applicat more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 8121
      • 7997 on SlideShare
      • 124 from embeds
    • Comments 0
    • Favorites 7
    • Downloads 1
    Most viewed embeds
    • 124 views on http://www.techbaba.com

    more

    All embeds
    • 124 views on http://www.techbaba.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories