Hi Jayson,
> I used haproxy as a http loadbalancer, I want to return a 404
> response from the backend server.But haproxy is always hanging.
Haproxy transparently passes those responses to the client.
> My backend server only returns a ASP.NET 5 Httpnotfound when
> requests a wrong url.
Probably your backend doesn't do what you think it does.
> But I request a wrong url from haproxy when the backend server is
> nginx, I can get the right response.
Confirming that your ASP backend does something its not
expected to do.
> I can see that haproxy is requests the wrong url again and again.
How do you see that?
I suggest you run this request through debug mode and post
the output, or better yet, tcpdump (-s0) the backend traffic
to see if the ASP backend actually returns a valid response (I doubt it).
Regards,
Lukas