1

Using DXA 1.8 (.NET) and Web 8.5 for prod environment and a load balancer to distribute traffic to web servers. The LB hits a simple HTML page to verify that the server is up and that traffic should be sent to that server. This page is on the main DXA website root, and via trace logs administrator sees that the call to the HTML page is being routed to DXA as well. Some snippets from the site.log as below, the requests are also seen in the IIS logging.

TRACE - StaticContentModule.BeginRequest(ASP.global_asax, System.EventArgs) : "/ecv.html" entry.
TRACE -   CdApiLocalizationResolver.ResolveLocalization(http://HOSTNAME:PORT/ecv.html) entry.
DEBUG - Request URL 'http://HOSTNAME:PORT/ecv.html' maps to Localization [5 ('English')]

There is a very high degree of traffic going to this page (ie 30K calls in one day), so admin is asking if it is possible to isolate the ecv page so it isn't processed by DXA. This is the same site check mechanism which had been used on the older non-DXA website.

1

You can easily register your own Controller which handles requests for /ecv.html and serves static HTML, but it seems you want to bypass the StaticContentModule (which is an IIS HTTP Module which triggers on all requests, regardless of Controller).

Would it be an option to let the LB request another URL path like /healthcheck/ecv.html? In that case you can create a healthcheck vdir/webapp within the DXA website which doesn’t have this StaticContentModule configured.

On the other hand, one could argue that the current implementation involving the StaticContentModule is a much better health check than simply serving a static HTML response.

  • Creating the HTML page in a vdir looks to be working, admin may explore a custom Controller at later point... marking as answered. – Terry Kim Oct 2 '18 at 13:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.