http://coldfusion.com logo
#cfml-general
Title
# cfml-general
m

Marco

04/25/2022, 8:19 PM
Is there a way to discover which coldfusion server is being used in a cluster?
d

deactivateduser

04/25/2022, 8:33 PM
What are you trying to solve? This thinking normally leads to some pretty hacky code if you need to know the specific server on the client when it is behind a load balancer of some kind.
m

Marco

04/25/2022, 8:46 PM
Ex. app1.domain.com communicates with app2.domain.com, both are set in 2 servers, ws01 and ws02. We want to keep all http calls targeted to the same originating server. Losing one server usually creates a backup of hanging requests trying to hit it from the good server and eventually brings that server down as well.
b

bdw429s

04/25/2022, 8:48 PM
I see two (really three) separate things here • how to identify a remote server behind a LB • How to "stick" a given client to a specific backend server • how to prevent a "stampeding herd" failure when one server going down brings down the whole cluster
r

rodyon

04/25/2022, 8:50 PM
I think all this 👆🏻 should be handled by load balancer but not cf server
☝️ 1
b

bdw429s

04/25/2022, 8:50 PM
The answers are as follows • Add an HTTP header to your response set on the app server which tells the client which server processed the request (this really should only be for debugging IMO) • Enable sticky sessions in your load balancer. I don't recommend this however as it doesn't allow your traffic to scale naturally • This sounds like you have poor capacity management. Your cluster should be beefy enough that it can keep running after losing at least one server. If the current number of servers minus one is not enough power for the load, then your cluster is too small. A "just barely big enough" cluster may give you some horizontal scaling, but it won't give you fail-over and high availability.
It also sounds like you may have an additional complication of your load balanacer not removing an unresponsive server, A healthy cluster needs • a health check/probe URL hosted on each node • The LB checks these regularly • The LB auto-removes unhealthy servers from the cluster and doesn't just keep shipping them traffic!
@Marco
m

Marco

04/25/2022, 8:57 PM
Thanks Brad for your feedback, I'll share it with my dev team.