Open amv opened 11 years ago
Naming services is not currently documented at all.
It might be a neat feature to be able to give a service node a name though so I think it would be cool to keep this possibility for example like this (if it is not there already):
10.0.0.1 80 web-server-1
10.0.0.2 80 web-server-2
But of course if the name is empty, it can be created from the two first parameters
Actually how about we just ditch the name idea for now and actually treat the lines as complete lines so that one can write a comment after a # -mark and have that same comment appear in all the .pool files where this node also appears:
10.0.0.1 80 # web-server-1
10.0.0.2 80 # web-server-2
this way someone can use the comments fields also for some business specific functions and we have the option of easily adding some other flags to the service configuration if we want (for example in the future to signal that a node is capable of receiving /pool_warning -messages):
10.0.0.1 80 smart # web-server-1 which can handle /pool_warning -messages.
10.0.0.2 80 smart,wonky # wonky might mean it has a higher retry count or something ;)
Currently services need to have a name in addition to host and port. I don't understand why this should be needed. Only the host and port should be enough.
It can be easier to debug the services if they have a name so it is a good idea to have it there. So if the name is missing in the config, create the name by joining host and port with ":". Otherwise use the name supplied by the config.
Be sure not to use the name for anything except logging purposes.