The first request takes time to hit the server API method because it pre-building the services in a start-up task can anyone suggest me to reduce the initial latency of my first request after published in IIS
// This method gets called by the runtime.
// Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddTransient<IContactService, ContactService>();
services.AddTransient<IPersonService, PersonService>();
services.AddTransient<IDashboardService, DashboardService>();
services.AddTransient<IEmployeeService, EmployeeService>();
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
// In production, the React files will be served from this directory
services.AddSpaStaticFiles(configuration =>
{
configuration.RootPath = "ClientApp/build";
});
}
Need to inject more than 100 services its taking time to prebuilding.
An IIS or ASP.NET hang can cause your website to have slow page loads, timeouts, or 503 Service Unavailable errors. Hangs can be caused by blocked ASP.NET threads, bad configuration, or request queueing.
NET Core has an easier time working with CPU-intensive tasks and rendering static pages since the in-built IIS server kernel caching makes this process very straightforward. Therefore, . NET core vs node. js performance offers different advantages for various projects.
7+ Million HTTP requests per second from a single server.
This might be an issue with your IIS configuration as the Application Pool is recycled from inactivity.
If you set the ApplicationPool's Start Mode under Advanced Settings it should be ready to be used whenever you call it, unless you happen to call it just as the recycling is happening.
This can be found by:
For the latter issue of it recycling whenever it wants to (every 29 hours), you can schedule the recycle to happen at a set time to be unobtrusive. On the same Advanced Settings screen:
Change Regular Time Interval (minutes)
to 0Specific Times
and click the ...
where it says TimeSpan[] Array.for me setting Idle Timeout to a higher value solved the problem
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With