Path based and healthchecks

Hi,

My setup works but I want to add another server to the pool that needs pathbased.
I notice this works and all good.

http-request set-path /application-path%[path]
server otherserver server.com:443 ssl check verify none

But…the present servers health check works fine, but this new server health check isn’t working.
Think I need the additional /application-path in the health check for this extra server. ?
Is there a way to have a second healthcheck for this specific server in the pool ?

Hello,

option httpchk GET /application-path

best regards,
Markus

Hi Markus,
Thanks for you reply, appreciate it!

I have 4 servers and added this one. Unfortunately this one needs the /application-path but those others don’t. (this 5th is not mine so cannot edit this endpoint)

So 4 are green on the health check but the 5th need the extra /application-path. Can this be done in haproxy without creating a new backend, cause that would go beyond the goal.

Hi :slight_smile:

Your configuration:

http-request set-path /application-path%[path]

…works also for all backends. So in your case, the request for Backend 5 would be expanded to

https://domainxyz.com/application-path/application-path”. All backends should react in the same way, otherwise this isn’t possible in my opinion.

best regards,
Markus

Okay, thought maybe it was possible to have a backend with 5 servers but have one server with a different healthcheck.
Example
server1 /health
server5 /check/health