Now I made a workaround. but it isn't an elegant solution. I made a web service to update the static variable.
I put the load balancing site's root paths in the web configuration and I called each application's web service on updating the static variable in any server.
But this works only when I know the load balancing server site paths, Is there any other way to update sites by finding the path dynamically?