I'm trying to gauge baseline RPS for a Web API developed in .NET Core 2. Here are the steps I've followed so far
- Generated a new/empty Web API project from Microsoft's baked in VS templates
- Added a new Controller that performs a basic "hello, you're api end-point is working" response with no logic and no additional I/O processing
- Deployed to Azure as a App Service. For service plan selected P3 (P3=400 total ACU, 7GB, $800/month) and set instance count to max of 20.
- Loaded JMeter and set a HTTP Request load test to simulate load spikes. I found that anything above 530 concurrent request and I start to get HTTP errors reported by JMeter and delayed responses if I try to make the request in a browser during this spike.
- I'm confused as to why the compute power/scale I have configured can't handle over 530 simultaneous request on a baseline .net core 2 controller. I'm trying to get an answer to if this is normal. Was wondering if perhaps there are some optimization points I might be missing? I went with a baseline .NET Core web service implementation because I want to start with a code base that I knew for certain could not be further optimized so I can focus on compute needs first.
If these are the expected results for a baseline .NET Core 2 web service hosted in Azure, then it looks like we're going to have to spend a lot more money as we're hoping to be able to handle over 3000 concurrent request without response time/latency going above 30 seconds during spikes. As far as auto-load balancing goes, the spikes come at random times in our instance. I can't get into details but there is absolutely no way to determine when these spikes will hit, it's a pretty unique business case, but unavoidable.
I'm also wondering if JMeter is the best tool to validate these results. It seems a respected tool, If anyone has had luck with other load testing tools please recommend.
Here is all I have going on in the configuration/service startup from Startup.cs
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseHsts();
}
// TO DO: build whitelist
// app.UseCors(
// options => options.WithOrigins("http://example.com").AllowAnyMethod() );
app.UseCors(options => options.WithOrigins("*").AllowAnyMethod());
app.UseHttpsRedirection();
app.UseMvc();
}
and also
public void ConfigureServices(IServiceCollection services)
{
// ADDCors during test stages
services.AddCors();
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
}