Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
Windows as a Web Windows as a Web Windows as a Web Windows as a Web Platform:Platform:Introducing IIS7Introducing IIS7
Eric NelsonEric NelsonApplication Architecthttp://blogs.msdn.com/ericnel
Windows as a Web Windows as a Web Windows as a Web Windows as a Web
http://blogs.msdn.com/ericnel “ISV Stuff”
Two great things happened to Microsoft in Feb 1996Feb 1996
1. Eric joined Microsoft2. IIS 1.0 was released and Microsoft “woke up”
Two great things happened to Microsoft in
Eric joined MicrosoftMicrosoft “woke up” to the power of the Internet
Client/Server“Smart Terminals”
GUIs for Green Screens
Fat-Client + Database
LAN CommunicationMicrosoft
IIS 1.0, 2.0, 3.0IIS 1.0, 2.0, 3.0IIS 4.0 – March 2007, then “downed tools”…
Web Client and Smart ClientInternet, WAN and LAN CommunicationMicrosoft
IIS5.0 (pretty much IIS4.0)Security �Security �
Here goes...SOAWeb 2.0SaaSS+SESBISB
MicrosoftMicrosoftIIS 6.0 in Windows Server 2003IIS 7.0 in Vista and Windows Server 2008
Proven ScaleMySpace - 23 Billion Page Views/MonthMicrosoft.com - 10k ConnectionsConnectionsMatch.com 30 million pages view daily
Proven Trust54% of Fortune 1000 use IIS (port80software.com)
Proven SecurityNo critical IIS 6 hotfixes
Note to Qcon – could we have run this conference one month earlier?
A solid foundation to build on
23 Billion Page Views/Month10k Req/sec & 300K
Match.com 30 million pages view daily
54% of Fortune 1000 use IIS (port80software.com)
hotfixes since RTM*could we have run this conference one month earlier?
A solid foundation to build on
IIS 7 was released in 2006 with Windows VistaIIS 7 was released in Feb 2008 with Windows Server 20082008Microsoft.com
Switched to Beta 3 of Windows Server 2008 on June 12 2007Great Compatibility
99%+ ASP and ASP.NET worked99%+ ASP and ASP.NET workedOne application encountered breaking change out of 260
And lovedAppCmd, new UI, death of metabaserequest tracing etc.
http://blogs.technet.com/mscom/archive/2007/09/07/the10-changes-in-iis7-0.aspx
IIS 7 was released in 2006 with Windows VistaIIS 7 was released in Feb 2008 with Windows Server
Switched to Beta 3 of Windows Server 2008 on June 12
99%+ ASP and ASP.NET worked99%+ ASP and ASP.NET workedOne application encountered breaking change out of 260
metabase, shared config, failed
http://blogs.technet.com/mscom/archive/2007/09/07/the-tasty-morsels-found-in-dogfood-mscom-ops-top-
More than a Web server, Internet Information Services 7.0 provides an accessible, extensible platform for developing and reliably hosting Web applications and services
IIS 7.0 EnhancementsIIS 7.0 Enhancements
Modular ArchitectureModular Architecture
Extensible DesignExtensible Design
Integrated with .NETIntegrated with .NET
IIS 7.0 EnhancementsIIS 7.0 Enhancements
ManageableManageable
Built in Built in Request TracingRequest Tracing
Integrated with .NETIntegrated with .NET
Information Services 7.0 provides an accessible, extensible platform for developing and reliably hosting Web
CreateCreateCreateCreateStreamlinedStreamlined
ServersServersReduced Reduced
Attack SurfaceAttack Surface
Rapid Rapid Application Application DeploymentDeployment
Extend/Modify Extend/Modify IIS FeaturesIIS Features
DeploymentDeployment
FastFastDiagnosticsDiagnostics
Modular ArchitectureModular Architecture
Extensible DesignExtensible Design
IIS 7.0 EnhancementsIIS 7.0 Enhancements
ManageableManageable
Built in Built in Request TracingRequest Tracing
Integrated with .NETIntegrated with .NET
Modular ArchitectureModular Architecture
Extensible DesignExtensible Design
IIS 7.0 EnhancementsIIS 7.0 Enhancements
ManageableManageable
Built in Built in Request TracingRequest Tracing
Integrated with .NETIntegrated with .NET
IIS 6 IIS 7
Architecture Monolithic Modular
Setup Most Featuresinstalled (many disabled)
Minimalinstallation for designated role
ExtendFeatures
ISAPI filters and ISAPI extensions
Addand handlers in native or managed codemanaged code
Customize UI Possible, but not common.
Extensible,modular, based on .NET
IIS 7 Benefits
Modular Customize, Extend,StreamlineStreamline
Minimalinstallation for designated role
Increased Security
Add modules and handlers in native or managed code
Easier to develop application and administration managed code administration features
Extensible,modular, based on .NET
Much easier fordevelopers to provide new admin features
Authentication Monolithic implementationMonolithic implementationInstall Install NTLM Basic
Determine Handler
CGI
Static File
Anon Install Install Extend server functionality Extend server functionality only through only through
ASP.NET
PHPISAPI
…
…
Send ResponseLog Compress
PHP…
Monolithic implementationMonolithic implementationInstall Install all or nothingall or nothing ……Install Install all or nothingall or nothing ……Extend server functionality Extend server functionality only through only through ISAPIISAPI……
ASP.NET
PHPPHP
AuthenticationAuthenticationNTLM Basic
Determine Handler
CGI
Static File
ISAPI
AnonAuthorization
ResolveCache
ExecuteHandler
…
…
…
…
Send ResponseLog CompressSendResponse
UpdateCache…
Server functionality is split Server functionality is split into ~ 40 into ~ 40 modulesmodules ......
Modules plug into a Modules plug into a generic request pipeline…generic request pipeline…
Modules Modules extend serverextend serverfunctionalityfunctionality through a through a public module API.public module API.public module API.public module API.
Completely redesigned IIS ManagerTask-oriented Allows IIS & and ASP.NET configurationAllows IIS & and ASP.NET configuration
ExtensibleAdd management featuresAdd application configuration
View health and diagnostics within the UIView health and diagnostics within the UIRemote administration over httpsManage 1 or 1000’s of sites
Completely redesigned IIS Manager
Allows IIS & and ASP.NET configurationAllows IIS & and ASP.NET configuration
Add management featuresAdd application configuration
View health and diagnostics within the UIView health and diagnostics within the UIRemote administration over httpsManage 1 or 1000’s of sites
Modular ArchitectureModular Architecture
Extensible DesignExtensible Design
IIS 7.0 EnhancementsIIS 7.0 Enhancements
ManageableManageable
Built in Built in Request TracingRequest Tracing
Integrated with .NETIntegrated with .NET
Modular ArchitectureModular Architecture
Extensible DesignExtensible Design
IIS 7.0 EnhancementsIIS 7.0 Enhancements
ManageableManageable
Built in Built in Request TracingRequest Tracing
Integrated with .NETIntegrated with .NET
AuthenticationNTLM Basic
Determine Handler
CGI
Static File
ISAPI
Anon…
…
AuthenticationForms
Map
aspnet_isapi.dllaspnet_isapi.dll
Send ResponseLog Compress
… Map Handler
AuthenticationForms Windows
Map ASPX
…
aspnet_isapi.dllaspnet_isapi.dll
Map Handler Trace
……
Basic
AnonAuthentication
Static File
ISAPI
Authorization
ResolveCache
ExecuteHandler
…
…
Log
CompressSendResponse
UpdateCache
Two App Pool Modes
Classic (IIS 6)
Basic
Anon
Classic (IIS 6)
Integrated Mode.NET modules / handlers plug directly into pipeline
Process all requests
Full runtime fidelity
Static
ISAPI
AuthenticationForms Windows
ASPX
…
aspnet_isapi.dllaspnet_isapi.dll
Compress
Map Handler
ASPX
Trace
……
IIS Manager, Modules, .NET IIS Manager, Modules, .NET IntegrationIIS Manager, Modules, .NET IIS Manager, Modules, .NET
Modular ArchitectureModular Architecture
Extensible DesignExtensible Design
IIS 7.0 EnhancementsIIS 7.0 Enhancements
ManageableManageable
Built in Built in Request TracingRequest Tracing
Integrated with .NETIntegrated with .NET
Modular ArchitectureModular Architecture
Extensible DesignExtensible Design
IIS 7.0 EnhancementsIIS 7.0 Enhancements
ManageableManageable
Built in Built in Request TracingRequest Tracing
Integrated with .NETIntegrated with .NET
Metabase to Applicationhost.configEasier to use
Human readable XMLHuman readable XMLConfig can be copied to other servers
You now have choices about how to manage IIS configuration
Centralized ConfigurationCentralized ConfigurationDelegated Administration Shared Configuration
Applicationhost.config file
Human readable XMLHuman readable XMLcan be copied to other servers
You now have choices about how to manage IIS configuration
Centralized ConfigurationCentralized ConfigurationDelegated Administration Shared Configuration
.NET Framework Global web.configMachine.config
NET global settingsASP.net global settings
Global web.configMachine.config
IIS 7
Global settings and location tags
IIS 7Applicationhost.config
Contoso.com \ Orders
web.configSite RootWeb.config
Contso.com root
global settings
web.config Web.config
.NET settings
..
..
....
IIS7 Delegated settings
..
Remote AdministrationUse IIS Manager from XP, Vista, Windows Server 2003/20082003/2008Auto-deployment and hide
Delegated AdministrationDelegate control to site owners without elevated priviledgesExtremely granular: Require Windows Authentication Extremely granular: Require Windows Authentication site owner control turn on/off Basic
Shared ConfigurationAll administration tools are redirected to a common UNC path
AppCmd
Use IIS Manager from XP, Vista, Windows Server
deployment and hide
Delegate control to site owners without elevated
Extremely granular: Require Windows Authentication - let Extremely granular: Require Windows Authentication - let site owner control turn on/off Basic
All administration tools are redirected to a common UNC
simplecmd-linesyntax
powerfulmgmt
objects
inline help& multiple& multiple
outputs
C:C:\\> > appcmdappcmdappcmdappcmdappcmdappcmdappcmdappcmd list list list list list list list list sitessitessitessitessitessitessitessites
SITE "Default Web Site" (id:1,bindings:HTTP/*:80:,state:Started)SITE "Default Web Site" (id:1,bindings:HTTP/*:80:,state:Started)SITE "Site1" (id:2,bindings:http/*:81:,state:Started)SITE "Site1" (id:2,bindings:http/*:81:,state:Started)SITE "Site2" (id:3,bindings:http/*:82:,state:StoppedSITE "Site2" (id:3,bindings:http/*:82:,state:StoppedSITE "Site2" (id:3,bindings:http/*:82:,state:StoppedSITE "Site2" (id:3,bindings:http/*:82:,state:Stopped
CC::\\> > appcmdappcmdappcmdappcmdappcmdappcmdappcmdappcmd list list list list list list list list requestsrequestsrequestsrequestsrequestsrequestsrequestsrequests
REQUEST REQUEST "fb0000008000000e" (url:GET "fb0000008000000e" (url:GET //wait.aspx?timewait.aspx?time=10000,time:4276 =10000,time:4276 msec,client:localhostmsec,client:localhost
C:C:\\> > appcmdappcmdappcmdappcmdappcmdappcmdappcmdappcmd list list list list list list list list requests requests requests requests requests requests requests requests ////////apppool.name:DefaultAppPoolapppool.name:DefaultAppPoolapppool.name:DefaultAppPoolapppool.name:DefaultAppPoolapppool.name:DefaultAppPoolapppool.name:DefaultAppPoolapppool.name:DefaultAppPoolapppool.name:DefaultAppPool
C:C:\\> > appcmdappcmdappcmdappcmdappcmdappcmdappcmdappcmd list requests list requests list requests list requests list requests list requests list requests list requests C:C:\\> > appcmdappcmdappcmdappcmdappcmdappcmdappcmdappcmd list requests list requests list requests list requests list requests list requests list requests list requests
C:C:\\> > appcmdappcmdappcmdappcmdappcmdappcmdappcmdappcmd list requests list requests list requests list requests list requests list requests list requests list requests
SITE "Default Web Site" (id:1,bindings:HTTP/*:80:,state:Started)SITE "Default Web Site" (id:1,bindings:HTTP/*:80:,state:Started)SITE "Site1" (id:2,bindings:http/*:81:,state:Started)SITE "Site1" (id:2,bindings:http/*:81:,state:Started)SITE "Site2" (id:3,bindings:http/*:82:,state:StoppedSITE "Site2" (id:3,bindings:http/*:82:,state:Stopped) ) SITE "Site2" (id:3,bindings:http/*:82:,state:StoppedSITE "Site2" (id:3,bindings:http/*:82:,state:Stopped) )
"fb0000008000000e" (url:GET "fb0000008000000e" (url:GET msec,client:localhostmsec,client:localhost) )
apppool.name:DefaultAppPoolapppool.name:DefaultAppPoolapppool.name:DefaultAppPoolapppool.name:DefaultAppPoolapppool.name:DefaultAppPoolapppool.name:DefaultAppPoolapppool.name:DefaultAppPoolapppool.name:DefaultAppPool
list requests list requests list requests list requests list requests list requests list requests list requests /wp.name:3567/wp.name:3567/wp.name:3567/wp.name:3567/wp.name:3567/wp.name:3567/wp.name:3567/wp.name:3567list requests list requests list requests list requests list requests list requests list requests list requests /wp.name:3567/wp.name:3567/wp.name:3567/wp.name:3567/wp.name:3567/wp.name:3567/wp.name:3567/wp.name:3567
list requests list requests list requests list requests list requests list requests list requests list requests /site.id:1 /site.id:1 /site.id:1 /site.id:1 /site.id:1 /site.id:1 /site.id:1 /site.id:1
Filter results by Filter results by application pool, application pool, worker process, or worker process, or sitesite
Modular ArchitectureModular Architecture
Extensible DesignExtensible Design
IIS 7.0 EnhancementsIIS 7.0 Enhancements
ManageableManageable
Built in Built in Request TracingRequest Tracing
Integrated with .NETIntegrated with .NET
Modular ArchitectureModular Architecture
Extensible DesignExtensible Design
IIS 7.0 EnhancementsIIS 7.0 Enhancements
ManageableManageable
Built in Built in Request TracingRequest Tracing
Integrated with .NETIntegrated with .NET
View Detailed Errors in the BrowserAccess Runtime State Info in RealAccess Runtime State Info in Real
Ex. See all currently executing requests
Rapidly Troubleshoot Faulty ApplicationsRules define ‘failures’ that triggers report of pipeline events
Define by http result code and/or time takenDefine by http result code and/or time taken
View Detailed Errors in the BrowserAccess Runtime State Info in Real-TimeAccess Runtime State Info in Real-Time
Ex. See all currently executing requests
Rapidly Troubleshoot Faulty ApplicationsRules define ‘failures’ that triggers report of
Define by http result code and/or time takenDefine by http result code and/or time taken
Config files, Delegation, Config files, Delegation, Request Tracing
files, Delegation, AppCmd, files, Delegation, AppCmd,
Most extensible yetModular, IIS Manager, .NET
Most .NET friendly yetMost .NET friendly yetIntegrated pipeline, shared web.config
Most manageable yetSimplified deployment, server farms, administration
Xcopy of config files, shared config
Easier to troubleshoot
Most secure yetReduced attack surface, .NET Integration for Auth, Isolation
URLAuthorization and Request Filtering
Most PHP Friendly yet…
web.config
Simplified deployment, server farms, administration
config, appcmd
Reduced attack surface, .NET Integration for Auth, Application Pool
and Request Filtering
PHP
MySQL
Apache
OR?
Linux
44
OR?
On October 30th, 2006, Microsoft and Zend announced a multicollaboration to improve the performance and stability of PHP on Windows
11
Windows
Benefits
-Huge ecosystem of apps potentially being available on Windows-Making it easier for PHP developers to take advantage of the Microsoft Web platform
CGICGICGICGIInvokes a process for each request.
AdvantagesEasy to ConfigureStable Execution
DisadvantagesSlow due to I/OOverhead of
ISAPIISAPIISAPIISAPILoaded as extension in process.
AdvantagesBetter Performance
DisadvantagesMany PHP
Applications are
, 2006, Microsoft and Zend announced a multi-year collaboration to improve the performance and stability of PHP on
Huge ecosystem of apps potentially being available on WindowsMaking it easier for PHP developers to take advantage of the Microsoft
FastCGIFastCGIFastCGIFastCGIExtension to CGI allowing reuse of a process.
AdvantagesEasy to ConfigureFaster than CGIMore stable than
PHP on ISAPI
ISAPIISAPIISAPIISAPILoaded as extension in
AdvantagesBetter Performance
DisadvantagesMany PHP
Applications are
FastCGI in IIS6
Available from the Download CenterCenter
Delivered as a separate download from Windows Server 2003.
ISAPI extension
Resources, forums, and reference material available on IIS.NETmaterial available on IIS.NET
Configured via fcgiext.ini
Fully supported by Microsoft
Supports PHP and other FastCGI frameworks
FastCGI in IIS7
Available in Windows Server 2008 and Vista SP1and Vista SP1
Delivered as part of IIS7. Users must install the CGI feature in IIS to enable FastCGI.
Native IIS7 module
Product help documentation, as well as resources on IIS.NET.well as resources on IIS.NET.
Configured via the new XML-based configuration system in IIS7.
upported by Microsoft
PHP and other FastCGI frameworks
New Server Core installation option of Windows Server 2008 allows for installation of server roles with only the necessary components and subsystems
22
and subsystems
Benefits
-A minimal footprint, low-maintenance web server that can host PHP applications-Providing an option that will resonate with PHP hosters and developers
http://www.microsoft.com/windowsserver2008/servercore.mspx
New Server Core installation option of Windows Server 2008 allows for installation of server roles with only the necessary components
maintenance web server that can host PHP
Providing an option that will resonate with PHP hosters and developers
http://www.microsoft.com/windowsserver2008/servercore.mspx
On October 9th, 2007, the first CTP of the SQL Server Driver for PHP was released. Enables reliable, scalable integration with SQL Server for PHP applications deployed on the Windows platform.
33
applications deployed on the Windows platform.
Benefits
-One answer to the question “What do we do with become really successful?” -SQL Server 2005 and 2008 rocks-SQL Server 2005 Express is free option
http://www.microsoft.com/sql/technologies/php/default.mspx
, 2007, the first CTP of the SQL Server Driver for PHP was released. Enables reliable, scalable integration with SQL Server for PHP applications deployed on the Windows platform. applications deployed on the Windows platform.
One answer to the question “What do we do with MySQL when we
SQL Server 2005 Express is free option
http://www.microsoft.com/sql/technologies/php/default.mspx
The next version of Expression Web will be the first Microsoft tool to offer PHP support.
44
Microsoft tool to offer PHP support.
Benefits
- An alternative great tool for Designers
The next version of Expression Web will be the first Microsoft tool to offer PHP support. Microsoft tool to offer PHP support.
Designers using PHP
http://IIS.NETWalkthroughs, examples, and code samples, online labsWebcasts
http://www.microsoft.com/emea/spotlight/result_search.aspx?produhttp://www.microsoft.com/emea/spotlight/result_search.aspx?product=12 (August 24th)
http://iis.net/PHPSpecific applications
http://learn.iis.net/page.aspx/271/php
Walkthroughs, examples, and code samples, online labs
http://www.microsoft.com/emea/spotlight/result_search.aspx?produhttp://www.microsoft.com/emea/spotlight/result_search.aspx?produ
http://learn.iis.net/page.aspx/271/php-applications-on-iis/
© 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarThe information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the
should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any infMICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it
should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Want to ensure that a new process is created if no processes are available to handle a request?
Run one instance per CPU with a minimum of 4 instancesRun one instance per CPU with a minimum of 4 instances
Set maxInstances to the lowest possible number under full load without consuming 100% CP
Want to make sure that the existing process is recycled periodically?
Set instanceMaxRequests (number of requests to process before recycling) as high as possible without destabilizing the app
PHP process’ maximum request setting (PHP_fcgi_max_requests) has PHP process’ maximum request setting (PHP_fcgi_max_requests) has to be equal or higher than the instanceMaxRequests setting.
Want to set PHP specific environment variables in the web.config file?variables in the web.config file?
Use environmentVariablessetting to set PHP specific environment variables.
Want to set PHP specific environment variables in the web.config file?variables in the web.config file?
environmentVariables configuration setting to set PHP specific environment
Is your server under so much load that your clients are getting timeout your clients are getting timeout responses?
The FastCGI process will be terminated if it does not respond to FastCGI handler within specified time period. Set the requestTimeout (number of seconds Set the requestTimeout (number of seconds to wait for process to handle the request) value to be higher than the activityTimeout (number of seconds to wait for any process activity) value.
�PHP is a general-purpose scripting language�PHP is primarily used as a server-side scripting language to create Web applications, but can also be used for command
�PHP is a general-purpose scripting language�PHP is primarily used as a server-side scripting language to create Web applications, but can also be used for command
What is it?What is it?�PHP succeeds an older product PHP/FI, which was created by Rasmus1995�PHP 4.0 was first released in May 2000 (currently the most
�PHP succeeds an older product PHP/FI, which was created by Rasmus1995�PHP 4.0 was first released in May 2000 (currently the most
When did it start?When did it start?
PHP Hello World Example
An example of a simple PHP script which sends the text "Hello World" to the browser:
can also be used for command line scripting and for desktop applications�PHP is Open Source and cross-platform
can also be used for command line scripting and for desktop applications�PHP is Open Source and cross-platform
May 2000 (currently the most popular major release)�PHP 5.0 was released in July 2004 and the release of PHP 6.0 alpha is anticipated early in 2008
May 2000 (currently the most popular major release)�PHP 5.0 was released in July 2004 and the release of PHP 6.0 alpha is anticipated early in 2008
PHP Hello World Example
PHP succeeds an older product PHP/FI, which was
Rasmus Lerdorf in
PHP 4.0 was first released in May 2000 (currently the most
PHP succeeds an older product PHP/FI, which was
Rasmus Lerdorf in
PHP 4.0 was first released in May 2000 (currently the most
When did it start?When did it start?�Easy to pick-up and understand, especially without a programming background�Low cost of entry, including shared hosting that usually includes database storage
�Easy to pick-up and understand, especially without a programming background�Low cost of entry, including shared hosting that usually includes database storage
Why is it used?Why is it used?
PHP Hello World Example
An example of a simple PHP script which sends the text "Hello World" to the browser:
May 2000 (currently the most popular major release)PHP 5.0 was released in July
2004 and the release of PHP 6.0 alpha is anticipated early in
May 2000 (currently the most popular major release)PHP 5.0 was released in July
2004 and the release of PHP 6.0 alpha is anticipated early in
includes database storage�Huge ecosystem, including applications, tools & documentation
includes database storage�Huge ecosystem, including applications, tools & documentation
PHP Hello World Example
echo “Hello World!”;