Hello,
On 4/4/12 7:15 PM, Juha Heinanen wrote:
in order to avoid repeatedly trying dead cluster
connection, how about
the following:
- define by cluster module param the default order in which connections
with same priority are tried
- if first connection in the list fails, move that connection to the end
of the list
advantage would be that there is no need to periodically (by counting or
timer) re-try dead connection.
default order could be taken from the order in which connections having
the same priority are listed in cluster param value.
comments?
reordering does not help with round robin operations and parallel write.
The list of connections is cloned by each process in private memory (as
it needs to be one db connection per process). A connecton can be part
of many clusters.
For each connection there is a pointer to shared memory where to store
the state (active/inactive), with the goal that when an operation fails
in one process, all the others will consider the connection inactive
until is reactivated. While the shared pointer is there, the logic
itself is not implemented yet.
Cheers,
Daniel
--
Daniel-Constantin Mierla
Kamailio Advanced Training, April 23-26, 2012, Berlin, Germany
http://www.asipto.com/index.php/kamailio-advanced-training/