SlideShare a Scribd company logo
Improving the Availability
of Your Website in
ASP.NET MVC4
GABRIEL ENEA
MICROSOFT MVP – ASP.NET/IIS
TECHNICAL LEAD – MAXCODE
@DOTNET18 / GABRIELENEA.BLOGSPOT.COM

CODECAMP IASI, 10 NOV 2012
How ASP.NET Requests Are
Processed by the Thread Pool?
How Requests Are Processed by
the Thread Pool



 free
                            IIS, ASP.NET Requests,
                            Thread Pool, .NET Fx
How Requests Are Processed by
the Thread Pool
  R
  e
  q
  u
  e
  s
  t




 free
                            IIS, ASP.NET Requests,
                            Thread Pool, .NET Fx
How Requests Are Processed by
the Thread Pool
  R
  e
  q
  u
  e
  s
  t




 busy     free
                            IIS, ASP.NET Requests,
                            Thread Pool, .NET Fx
How Requests Are Processed by
the Thread Pool
  R
  e
  q
  u
  e
  s
  t




 busy
                                               IIS, ASP.NET Requests,
                                               Thread Pool, .NET Fx




      Web Services (long running operations)
How Requests Are Processed by
the Thread Pool
  R
  e
  q
  u
  e                    Request Queue
  s
  t




 busy
                                       IIS, ASP.NET Requests,
                                       Thread Pool, .NET Fx




        Web Services
How Requests Are Processed by
the Thread Pool
  R
  e
  q
  u
  e                    Request Queue
  s
  t




 busy
                                       IIS, ASP.NET Requests,
                                       Thread Pool, .NET Fx




        Web Services
How Requests Are Processed by
the Thread Pool                              3
                                             0
                                             5
  R
  e
  q
  u
  e                    Request Queue   HTTP 503 Error
  s                                    Server Too Busy
  t




 busy
                                          IIS, ASP.NET Requests,
                                          Thread Pool, .NET Fx




        Web Services
How Requests Are Processed by
the Thread Pool       R
                      e
                      q
                      u
                      e
                      st
                                            3
                                            0
                                            5
  R
  e
  q
  u
  e                   Request Queue   HTTP 503 Error
  s                                   Server Too Busy
  t




               free
                                         IIS, ASP.NET Requests,
                                         Thread Pool, .NET Fx




       Web Services
How Requests Are Processed by
the Thread Pool
What Can We Do to Improve the
Availability?
What Can We Do to Improve the
Availability?
Using Asynchronous methods

  R
  e
  q
  u
  e
  s
  t




        free
                              IIS, ASP.NET Requests,
                              Thread Pool, .NET Fx
 busy




               Web Services
.NET Asynchronous Operations patterns
.NET Asynchronous Operations
patterns
    Synchronous code




    .NET 1.0: Asynchronous Programming Model (APM) pattern
.NET Asynchronous Operations
patterns
    Synchronous code




    .NET 2.0: Event-based Asynchronous Pattern (EAP)
.NET Asynchronous Operations
patterns
    Synchronous code




    .NET 4.0: Task-based Asynchronous Pattern (TAP)
.NET Asynchronous Operations
patterns      Synchronous code
                 




    .NET 1.0:                               compare

                        .NET 4.0:




    .NET 2.0           .NET 4.5
                             async, await
ASP.NET MVC
Asynchronous Operations Support
ASP.NET MVC - Asynchronous
Operations Support


    MVC3
        AsyncController
        AsyncManager
    MVC4
        Task-based asynchronous action methods
DEMO
DEMO



    Bingoogle – Dual Search Engine
    ASP.NET MVC3 -> MVC4
Guidelines:
When to use synchronous or
asynchronous action methods?
When to use synchronous action
methods?


    The operations are simple or short-running
    Simplicity is more important than efficiency
    The operations are CPU-bound
When to use asynchronous action
methods? (1)

    Asynchronous methods available and using .NET 4.5
    The operations are network-bound or I/O-bound
    Parallelism is more important than simplicity of code
When to use asynchronous action
methods? (2)

    You want to provide a mechanism that lets users cancel
     a long-running request
    Switching threads out weights the cost of the context
     switch
    Testing shows that the blocking operations are a
     bottleneck in site performance
Server Configuration for High
Concurrency/Latency Web Service Calls
Server Configuration for High
Concurrency/Latency Web Service Calls
    aspnet.config

 <configuration>
   <system.web>
     <applicationPool
         maxConcurrentRequestsPerCPU="5000"
         maxConcurrentThreadsPerCPU="0"          HTTP.sys queue limit
         requestQueueLimit="5000" />
   </system.web>
 </configuration>
Improving the Availability of Your
Website in ASP.NET MVC4

                 Questions?
Resources



 Ask Google or start with..
    MSDN - Asynchronous Programming with Async and Await
    www.asp.net - Using Asynchronous Methods in ASP.NET MVC 4
    Channel9 - Mads Torgersen: Inside C# Async
Improving the Availability of Your
Website in ASP.NET MVC4
       Please fill the evaluation
       form


GABRIEL ENEA
MICROSOFT MVP – ASP.NET/IIS
TECHNICAL LEAD – MAXCODE
@DOTNET18 / GABRIELENEA.BLOGSPOT.COM
Diamond Sponsors




Platinum Sponsors                    Gold Sponsors


Training Partners   Media Partners          Other Partners

More Related Content

What's hot

Alfresco search services: Now and Then
Alfresco search services: Now and ThenAlfresco search services: Now and Then
Alfresco search services: Now and Then
Angel Borroy López
 
How Shopify Scales Rails
How Shopify Scales RailsHow Shopify Scales Rails
How Shopify Scales Railsjduff
 
New Oracle Infrastructure2
New Oracle Infrastructure2New Oracle Infrastructure2
New Oracle Infrastructure2
markleeuw
 
0-60 with Goliath: Building High Performance Ruby Web-Services
0-60 with Goliath: Building High Performance Ruby Web-Services0-60 with Goliath: Building High Performance Ruby Web-Services
0-60 with Goliath: Building High Performance Ruby Web-ServicesIlya Grigorik
 
Choosing a Web Architecture for Perl
Choosing a Web Architecture for PerlChoosing a Web Architecture for Perl
Choosing a Web Architecture for Perl
Perrin Harkins
 
Alfresco Search Internals
Alfresco Search InternalsAlfresco Search Internals
Alfresco Search Internals
Alfresco Software
 
Learn to love networking on iOS
Learn to love networking on iOSLearn to love networking on iOS
Learn to love networking on iOS
Paolo Tagliani
 
Async event based web server
Async event based web serverAsync event based web server
Async event based web server
Gi Woong Lee
 

What's hot (8)

Alfresco search services: Now and Then
Alfresco search services: Now and ThenAlfresco search services: Now and Then
Alfresco search services: Now and Then
 
How Shopify Scales Rails
How Shopify Scales RailsHow Shopify Scales Rails
How Shopify Scales Rails
 
New Oracle Infrastructure2
New Oracle Infrastructure2New Oracle Infrastructure2
New Oracle Infrastructure2
 
0-60 with Goliath: Building High Performance Ruby Web-Services
0-60 with Goliath: Building High Performance Ruby Web-Services0-60 with Goliath: Building High Performance Ruby Web-Services
0-60 with Goliath: Building High Performance Ruby Web-Services
 
Choosing a Web Architecture for Perl
Choosing a Web Architecture for PerlChoosing a Web Architecture for Perl
Choosing a Web Architecture for Perl
 
Alfresco Search Internals
Alfresco Search InternalsAlfresco Search Internals
Alfresco Search Internals
 
Learn to love networking on iOS
Learn to love networking on iOSLearn to love networking on iOS
Learn to love networking on iOS
 
Async event based web server
Async event based web serverAsync event based web server
Async event based web server
 

Viewers also liked

CodeCamp Iasi 10 march 2012 - websockets-with-atmosphere
CodeCamp Iasi 10 march 2012 - websockets-with-atmosphereCodeCamp Iasi 10 march 2012 - websockets-with-atmosphere
CodeCamp Iasi 10 march 2012 - websockets-with-atmosphereCodecamp Romania
 
What is new in ASP.NET Core
What is new in ASP.NET CoreWhat is new in ASP.NET Core
What is new in ASP.NET Core
Maurice De Beijer [MVP]
 
Asynchronous Programming in ASP.NET
Asynchronous Programming in ASP.NETAsynchronous Programming in ASP.NET
Asynchronous Programming in ASP.NET
Chris Dufour
 
JavaScript: The Good Parts Or: How A C# Developer Learned To Stop Worrying An...
JavaScript: The Good Parts Or: How A C# Developer Learned To Stop Worrying An...JavaScript: The Good Parts Or: How A C# Developer Learned To Stop Worrying An...
JavaScript: The Good Parts Or: How A C# Developer Learned To Stop Worrying An...
Doug Jones
 
DDD Sydney 2011 - Getting out of Sync with IIS and Riding a Comet
DDD Sydney 2011 - Getting out of Sync with IIS and Riding a CometDDD Sydney 2011 - Getting out of Sync with IIS and Riding a Comet
DDD Sydney 2011 - Getting out of Sync with IIS and Riding a CometRichard Banks
 
Tiberiu Covaci - Fast, Faster: Async Asp.net
Tiberiu Covaci - Fast, Faster: Async Asp.netTiberiu Covaci - Fast, Faster: Async Asp.net
Tiberiu Covaci - Fast, Faster: Async Asp.netCodecamp Romania
 

Viewers also liked (6)

CodeCamp Iasi 10 march 2012 - websockets-with-atmosphere
CodeCamp Iasi 10 march 2012 - websockets-with-atmosphereCodeCamp Iasi 10 march 2012 - websockets-with-atmosphere
CodeCamp Iasi 10 march 2012 - websockets-with-atmosphere
 
What is new in ASP.NET Core
What is new in ASP.NET CoreWhat is new in ASP.NET Core
What is new in ASP.NET Core
 
Asynchronous Programming in ASP.NET
Asynchronous Programming in ASP.NETAsynchronous Programming in ASP.NET
Asynchronous Programming in ASP.NET
 
JavaScript: The Good Parts Or: How A C# Developer Learned To Stop Worrying An...
JavaScript: The Good Parts Or: How A C# Developer Learned To Stop Worrying An...JavaScript: The Good Parts Or: How A C# Developer Learned To Stop Worrying An...
JavaScript: The Good Parts Or: How A C# Developer Learned To Stop Worrying An...
 
DDD Sydney 2011 - Getting out of Sync with IIS and Riding a Comet
DDD Sydney 2011 - Getting out of Sync with IIS and Riding a CometDDD Sydney 2011 - Getting out of Sync with IIS and Riding a Comet
DDD Sydney 2011 - Getting out of Sync with IIS and Riding a Comet
 
Tiberiu Covaci - Fast, Faster: Async Asp.net
Tiberiu Covaci - Fast, Faster: Async Asp.netTiberiu Covaci - Fast, Faster: Async Asp.net
Tiberiu Covaci - Fast, Faster: Async Asp.net
 

Similar to Improving the availability of your website

10 tips to make your ASP.NET Apps Faster
10 tips to make your ASP.NET Apps Faster10 tips to make your ASP.NET Apps Faster
10 tips to make your ASP.NET Apps Faster
Brij Mishra
 
Difference between asp.net web api and asp.net mvc
Difference between asp.net web api and asp.net mvcDifference between asp.net web api and asp.net mvc
Difference between asp.net web api and asp.net mvc
Umar Ali
 
Connected Web Systems
Connected Web SystemsConnected Web Systems
Connected Web Systems
Damir Dobric
 
Ajp notes-chapter-06
Ajp notes-chapter-06Ajp notes-chapter-06
Ajp notes-chapter-06
Ankit Dubey
 
ASP.NET MVC Performance
ASP.NET MVC PerformanceASP.NET MVC Performance
ASP.NET MVC Performance
rudib
 
Mike Taulty MIX10 Silverlight 4 Patterns Frameworks
Mike Taulty MIX10 Silverlight 4 Patterns FrameworksMike Taulty MIX10 Silverlight 4 Patterns Frameworks
Mike Taulty MIX10 Silverlight 4 Patterns Frameworks
ukdpe
 
www.ppt
www.pptwww.ppt
www.ppt
swatiringe1
 
Introduction to ASPNET Core
Introduction to ASPNET CoreIntroduction to ASPNET Core
Introduction to ASPNET Core
Puja Pramudya
 
SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon
SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechConSharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon
SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon
SPTechCon
 
ASP, ASP.NET, JSP, COM/DCOM
ASP, ASP.NET, JSP, COM/DCOMASP, ASP.NET, JSP, COM/DCOM
ASP, ASP.NET, JSP, COM/DCOM
Aashish Jain
 
Asp.net Core Introduction.
Asp.net Core Introduction.Asp.net Core Introduction.
Asp.net Core Introduction.
Talha Shahzad
 
WebCamp 2016: PHP.Алексей Петров.PHP at Scale: System Architect Toolbox
WebCamp 2016: PHP.Алексей Петров.PHP at Scale: System Architect ToolboxWebCamp 2016: PHP.Алексей Петров.PHP at Scale: System Architect Toolbox
WebCamp 2016: PHP.Алексей Петров.PHP at Scale: System Architect Toolbox
WebCamp
 
IIS 6.0 and asp.net
IIS 6.0 and asp.netIIS 6.0 and asp.net
IIS 6.0 and asp.net
Rishi Kothari
 
Understanding the Single Thread Event Loop
Understanding the Single Thread Event LoopUnderstanding the Single Thread Event Loop
Understanding the Single Thread Event Loop
TorontoNodeJS
 
PHP on Windows 2008
PHP on Windows 2008PHP on Windows 2008
PHP on Windows 2008
jorke
 
ASP.NET Core
ASP.NET CoreASP.NET Core
ASP.NET Core
Abhimanyu Singhal
 
ASP.NET Core Overview
ASP.NET Core OverviewASP.NET Core Overview
ASP.NET Core Overview
Pranav Ainavolu
 
Rest presentation
Rest  presentationRest  presentation
Rest presentationsrividhyau
 
Web api
Web apiWeb api
Building Asynchronous Microservices with Armeria
Building Asynchronous Microservices with ArmeriaBuilding Asynchronous Microservices with Armeria
Building Asynchronous Microservices with Armeria
LINE Corporation
 

Similar to Improving the availability of your website (20)

10 tips to make your ASP.NET Apps Faster
10 tips to make your ASP.NET Apps Faster10 tips to make your ASP.NET Apps Faster
10 tips to make your ASP.NET Apps Faster
 
Difference between asp.net web api and asp.net mvc
Difference between asp.net web api and asp.net mvcDifference between asp.net web api and asp.net mvc
Difference between asp.net web api and asp.net mvc
 
Connected Web Systems
Connected Web SystemsConnected Web Systems
Connected Web Systems
 
Ajp notes-chapter-06
Ajp notes-chapter-06Ajp notes-chapter-06
Ajp notes-chapter-06
 
ASP.NET MVC Performance
ASP.NET MVC PerformanceASP.NET MVC Performance
ASP.NET MVC Performance
 
Mike Taulty MIX10 Silverlight 4 Patterns Frameworks
Mike Taulty MIX10 Silverlight 4 Patterns FrameworksMike Taulty MIX10 Silverlight 4 Patterns Frameworks
Mike Taulty MIX10 Silverlight 4 Patterns Frameworks
 
www.ppt
www.pptwww.ppt
www.ppt
 
Introduction to ASPNET Core
Introduction to ASPNET CoreIntroduction to ASPNET Core
Introduction to ASPNET Core
 
SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon
SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechConSharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon
SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon
 
ASP, ASP.NET, JSP, COM/DCOM
ASP, ASP.NET, JSP, COM/DCOMASP, ASP.NET, JSP, COM/DCOM
ASP, ASP.NET, JSP, COM/DCOM
 
Asp.net Core Introduction.
Asp.net Core Introduction.Asp.net Core Introduction.
Asp.net Core Introduction.
 
WebCamp 2016: PHP.Алексей Петров.PHP at Scale: System Architect Toolbox
WebCamp 2016: PHP.Алексей Петров.PHP at Scale: System Architect ToolboxWebCamp 2016: PHP.Алексей Петров.PHP at Scale: System Architect Toolbox
WebCamp 2016: PHP.Алексей Петров.PHP at Scale: System Architect Toolbox
 
IIS 6.0 and asp.net
IIS 6.0 and asp.netIIS 6.0 and asp.net
IIS 6.0 and asp.net
 
Understanding the Single Thread Event Loop
Understanding the Single Thread Event LoopUnderstanding the Single Thread Event Loop
Understanding the Single Thread Event Loop
 
PHP on Windows 2008
PHP on Windows 2008PHP on Windows 2008
PHP on Windows 2008
 
ASP.NET Core
ASP.NET CoreASP.NET Core
ASP.NET Core
 
ASP.NET Core Overview
ASP.NET Core OverviewASP.NET Core Overview
ASP.NET Core Overview
 
Rest presentation
Rest  presentationRest  presentation
Rest presentation
 
Web api
Web apiWeb api
Web api
 
Building Asynchronous Microservices with Armeria
Building Asynchronous Microservices with ArmeriaBuilding Asynchronous Microservices with Armeria
Building Asynchronous Microservices with Armeria
 

More from Enea Gabriel

Moving forward with ASP.NET Core
Moving forward with ASP.NET CoreMoving forward with ASP.NET Core
Moving forward with ASP.NET Core
Enea Gabriel
 
The future of ASP.NET / CodeCamp/Iasi 25 Oct 2014
The future of ASP.NET / CodeCamp/Iasi 25 Oct 2014The future of ASP.NET / CodeCamp/Iasi 25 Oct 2014
The future of ASP.NET / CodeCamp/Iasi 25 Oct 2014
Enea Gabriel
 
Applying EF Code First at Your Job
Applying EF Code First at Your JobApplying EF Code First at Your Job
Applying EF Code First at Your Job
Enea Gabriel
 
Elements of DDD with ASP.NET MVC & Entity Framework Code First v2
Elements of DDD with ASP.NET MVC & Entity Framework Code First v2Elements of DDD with ASP.NET MVC & Entity Framework Code First v2
Elements of DDD with ASP.NET MVC & Entity Framework Code First v2
Enea Gabriel
 
Elements of DDD with ASP.NET MVC & Entity Framework Code First
Elements of DDD with ASP.NET MVC & Entity Framework Code FirstElements of DDD with ASP.NET MVC & Entity Framework Code First
Elements of DDD with ASP.NET MVC & Entity Framework Code First
Enea Gabriel
 
Noutăţi în ASP.NET MVC 2
Noutăţi în ASP.NET MVC 2Noutăţi în ASP.NET MVC 2
Noutăţi în ASP.NET MVC 2
Enea Gabriel
 
FII absolvent!
FII absolvent!FII absolvent!
FII absolvent!
Enea Gabriel
 
Introducere în ASP.NET MVC prin exemple
Introducere în ASP.NET MVC prin exempleIntroducere în ASP.NET MVC prin exemple
Introducere în ASP.NET MVC prin exempleEnea Gabriel
 
Magia testelor automate cu ASP.NET MVC
Magia testelor automate cu ASP.NET MVCMagia testelor automate cu ASP.NET MVC
Magia testelor automate cu ASP.NET MVCEnea Gabriel
 
Rute cu ASP.NET MVC
Rute cu ASP.NET MVCRute cu ASP.NET MVC
Rute cu ASP.NET MVCEnea Gabriel
 
Model View Controller și ASP.NET MVC + AJAX
Model View Controller și ASP.NET MVC + AJAXModel View Controller și ASP.NET MVC + AJAX
Model View Controller și ASP.NET MVC + AJAXEnea Gabriel
 

More from Enea Gabriel (11)

Moving forward with ASP.NET Core
Moving forward with ASP.NET CoreMoving forward with ASP.NET Core
Moving forward with ASP.NET Core
 
The future of ASP.NET / CodeCamp/Iasi 25 Oct 2014
The future of ASP.NET / CodeCamp/Iasi 25 Oct 2014The future of ASP.NET / CodeCamp/Iasi 25 Oct 2014
The future of ASP.NET / CodeCamp/Iasi 25 Oct 2014
 
Applying EF Code First at Your Job
Applying EF Code First at Your JobApplying EF Code First at Your Job
Applying EF Code First at Your Job
 
Elements of DDD with ASP.NET MVC & Entity Framework Code First v2
Elements of DDD with ASP.NET MVC & Entity Framework Code First v2Elements of DDD with ASP.NET MVC & Entity Framework Code First v2
Elements of DDD with ASP.NET MVC & Entity Framework Code First v2
 
Elements of DDD with ASP.NET MVC & Entity Framework Code First
Elements of DDD with ASP.NET MVC & Entity Framework Code FirstElements of DDD with ASP.NET MVC & Entity Framework Code First
Elements of DDD with ASP.NET MVC & Entity Framework Code First
 
Noutăţi în ASP.NET MVC 2
Noutăţi în ASP.NET MVC 2Noutăţi în ASP.NET MVC 2
Noutăţi în ASP.NET MVC 2
 
FII absolvent!
FII absolvent!FII absolvent!
FII absolvent!
 
Introducere în ASP.NET MVC prin exemple
Introducere în ASP.NET MVC prin exempleIntroducere în ASP.NET MVC prin exemple
Introducere în ASP.NET MVC prin exemple
 
Magia testelor automate cu ASP.NET MVC
Magia testelor automate cu ASP.NET MVCMagia testelor automate cu ASP.NET MVC
Magia testelor automate cu ASP.NET MVC
 
Rute cu ASP.NET MVC
Rute cu ASP.NET MVCRute cu ASP.NET MVC
Rute cu ASP.NET MVC
 
Model View Controller și ASP.NET MVC + AJAX
Model View Controller și ASP.NET MVC + AJAXModel View Controller și ASP.NET MVC + AJAX
Model View Controller și ASP.NET MVC + AJAX
 

Recently uploaded

Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 

Recently uploaded (20)

Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 

Improving the availability of your website

  • 1. Improving the Availability of Your Website in ASP.NET MVC4 GABRIEL ENEA MICROSOFT MVP – ASP.NET/IIS TECHNICAL LEAD – MAXCODE @DOTNET18 / GABRIELENEA.BLOGSPOT.COM CODECAMP IASI, 10 NOV 2012
  • 2. How ASP.NET Requests Are Processed by the Thread Pool?
  • 3. How Requests Are Processed by the Thread Pool free IIS, ASP.NET Requests, Thread Pool, .NET Fx
  • 4. How Requests Are Processed by the Thread Pool R e q u e s t free IIS, ASP.NET Requests, Thread Pool, .NET Fx
  • 5. How Requests Are Processed by the Thread Pool R e q u e s t busy free IIS, ASP.NET Requests, Thread Pool, .NET Fx
  • 6. How Requests Are Processed by the Thread Pool R e q u e s t busy IIS, ASP.NET Requests, Thread Pool, .NET Fx Web Services (long running operations)
  • 7. How Requests Are Processed by the Thread Pool R e q u e Request Queue s t busy IIS, ASP.NET Requests, Thread Pool, .NET Fx Web Services
  • 8. How Requests Are Processed by the Thread Pool R e q u e Request Queue s t busy IIS, ASP.NET Requests, Thread Pool, .NET Fx Web Services
  • 9. How Requests Are Processed by the Thread Pool 3 0 5 R e q u e Request Queue HTTP 503 Error s Server Too Busy t busy IIS, ASP.NET Requests, Thread Pool, .NET Fx Web Services
  • 10. How Requests Are Processed by the Thread Pool R e q u e st 3 0 5 R e q u e Request Queue HTTP 503 Error s Server Too Busy t free IIS, ASP.NET Requests, Thread Pool, .NET Fx Web Services
  • 11. How Requests Are Processed by the Thread Pool
  • 12. What Can We Do to Improve the Availability?
  • 13. What Can We Do to Improve the Availability?
  • 14. Using Asynchronous methods R e q u e s t free IIS, ASP.NET Requests, Thread Pool, .NET Fx busy Web Services
  • 16. .NET Asynchronous Operations patterns  Synchronous code  .NET 1.0: Asynchronous Programming Model (APM) pattern
  • 17. .NET Asynchronous Operations patterns  Synchronous code  .NET 2.0: Event-based Asynchronous Pattern (EAP)
  • 18. .NET Asynchronous Operations patterns  Synchronous code  .NET 4.0: Task-based Asynchronous Pattern (TAP)
  • 19. .NET Asynchronous Operations patterns Synchronous code   .NET 1.0: compare  .NET 4.0:  .NET 2.0  .NET 4.5  async, await
  • 21. ASP.NET MVC - Asynchronous Operations Support  MVC3  AsyncController  AsyncManager  MVC4  Task-based asynchronous action methods
  • 22. DEMO
  • 23. DEMO  Bingoogle – Dual Search Engine  ASP.NET MVC3 -> MVC4
  • 24. Guidelines: When to use synchronous or asynchronous action methods?
  • 25. When to use synchronous action methods?  The operations are simple or short-running  Simplicity is more important than efficiency  The operations are CPU-bound
  • 26. When to use asynchronous action methods? (1)  Asynchronous methods available and using .NET 4.5  The operations are network-bound or I/O-bound  Parallelism is more important than simplicity of code
  • 27. When to use asynchronous action methods? (2)  You want to provide a mechanism that lets users cancel a long-running request  Switching threads out weights the cost of the context switch  Testing shows that the blocking operations are a bottleneck in site performance
  • 28. Server Configuration for High Concurrency/Latency Web Service Calls
  • 29. Server Configuration for High Concurrency/Latency Web Service Calls  aspnet.config <configuration> <system.web> <applicationPool maxConcurrentRequestsPerCPU="5000" maxConcurrentThreadsPerCPU="0"  HTTP.sys queue limit requestQueueLimit="5000" /> </system.web> </configuration>
  • 30. Improving the Availability of Your Website in ASP.NET MVC4 Questions?
  • 31. Resources Ask Google or start with..  MSDN - Asynchronous Programming with Async and Await  www.asp.net - Using Asynchronous Methods in ASP.NET MVC 4  Channel9 - Mads Torgersen: Inside C# Async
  • 32. Improving the Availability of Your Website in ASP.NET MVC4 Please fill the evaluation form GABRIEL ENEA MICROSOFT MVP – ASP.NET/IIS TECHNICAL LEAD – MAXCODE @DOTNET18 / GABRIELENEA.BLOGSPOT.COM
  • 33. Diamond Sponsors Platinum Sponsors Gold Sponsors Training Partners Media Partners Other Partners