Download presentation
Presentation is loading. Please wait.
Published byOsborn Nicholson Modified over 6 years ago
1
6/24/ :43 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
2
ASP.NET Core + Azure Service Fabric
6/24/ :43 AM P4020 ASP.NET Core + Azure Service Fabric Vaclav Turecek Program Manager Azure Service Fabric © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
3
ASP.NET Core + Service Fabric
Microsoft Build 2017 6/24/ :43 AM ASP.NET Core + Service Fabric Service Fabric Web API back-end service MVC web application Web API back-end service Web API front-end service Web API back-end service © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
4
Hosting ASP.NET Core in Service Fabric
Microsoft Build 2017 6/24/ :43 AM Hosting ASP.NET Core in Service Fabric In a Container As a Guest EXE Hosted in a Reliable Service © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
5
Kestrel or WebListener
Microsoft Build 2017 6/24/ :43 AM ASP.NET Core WebHost WebHost in a single process, like a guest EXE Host process Server Kestrel or WebListener Program Main() ASP.NET Core WebHost Create Application MVC, etc © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
6
ASP.NET Core WebHost in Service Fabric
Microsoft Build 2017 6/24/ :43 AM ASP.NET Core WebHost in Service Fabric WebHost in a Reliable Service Service host process Program Main() Service instance/replica (multiple) Register service type ASP.NET Core Service Fabric runtime Server Kestrel or WebListener Create ICommunication-Listener ASP.NET Core WebHost Create Application MVC, etc © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
7
ASP.NET Core Reliable Services
Microsoft Build 2017 6/24/ :43 AM ASP.NET Core Reliable Services Stateless service lifecycle Service host process Stateless replica Create Service Fabric runtime ASP.NET Core WebHost Open Close © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
8
ASP.NET Core Reliable Services
Microsoft Build 2017 6/24/ :43 AM ASP.NET Core Reliable Services Stateful service lifecycle Service host process Stateful replica Create Open ASP.NET Core WebHost Service Fabric runtime Primary Change role Secondary None Close © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
9
Service communication
Microsoft Build 2017 6/24/ :43 AM Service communication Service A Get Service B address Network protocol: HTTP, AMQP, etc. Client authentication/authorization Service identification Transport encryption Naming Service Register address Service B © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
10
Mistaken identity Service A listens on 10.0.0.1:30000 over HTTP.
Microsoft Build 2017 6/24/ :43 AM Mistaken identity Service A listens on :30000 over HTTP. Client resolves Service A and gets address :30000 Service A moves to a different node. Service B is placed on and coincidentally uses the same port: Client attempts to connect to service A with cached address :30000. Client is now successfully connected to service B not realizing it is connected to the wrong service. How does the client know to re-resolve the address for service A? © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
11
Service Fabric middleware
Microsoft Build 2017 6/24/ :43 AM Service Fabric middleware Service A Get service address GET Naming Service ASP.NET Core service UseUniqueServiceUrl pID/rID Valid Path? Register address no HTTP 410 Gone yes Process request HTTP Response © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
12
Kestrel in Service Fabric
Microsoft Build 2017 6/24/ :43 AM Kestrel in Service Fabric Node (Windows/Linux) Libuv: Linux or Windows Just a socket in a process No URL registration No port sharing No URL path mapping No hostname mapping No DoS protection (yet) ServiceHost.exe Kestrel Kestrel ServiceHost.exe Kestrel Client Kestrel Connection failure © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
13
WebListener in Service Fabric
Microsoft Build 2017 6/24/ :43 AM WebListener in Service Fabric Node (Windows only) http.sys: Windows kernel Machine-wide URL map URLs must be registered Port sharing URL path mapping Hostname mapping DoS protection ht tp. sys ServiceHost.exe WebListener WebListener ServiceHost.exe WebListener Client WebListener HTTP 503 or 404 © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
14
Static application ports
Microsoft Build 2017 6/24/ :43 AM Static application ports ServiceHost.exe Port 80 Replica Replica <Resources> <Endpoints> <Endpoint Protocol="http" Name="MyWebEndpoint" Port="80" /> </Endpoints> </Resources> ServiceHost.exe Replica Port 80 Replica © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
15
Dynamic application ports
Microsoft Build 2017 6/24/ :43 AM Dynamic application ports ServiceHost.exe Port 30000 Replica Replica <Resources> <Endpoints> <Endpoint Protocol="http" Name="MyWebEndpoint" /> </Endpoints> </Resources> ServiceHost.exe Replica Port 30001 Replica © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
16
Microsoft Build 2017 6/24/ :43 AM Recommendations WebListener: Use for Internet-facing fixed-port stateless services. URL path and hostname routing features can be useful for hosting multiple web applications in the same cluster. Provides DoS protection. Windows authentication and other IIS features. Kestrel: Use for internal service communication. Much simpler service resolution. No URL registration required. Very fast. © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
17
ASP.NET Core Service Fabric application
Microsoft Build 2017 6/24/ :43 AM ASP.NET Core Service Fabric application Service Fabric Web API Kestrel MVC WebListener Web API Kestrel MVC WebListener Web API Kestrel © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
18
Learn more! https://github.com/Azure/service-fabric-aspnetcore
Microsoft Build 2017 6/24/ :43 AM Learn more! © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
19
6/24/ :43 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.