Permit creating client with multiple broker addresses#13
Conversation
Fixes #7 This does basically the simplest thing that works. It has some flaws, but most importantly it gets the API in place and is basically functional. We can improve it later without breaking API compatibility. Remaining sub-optimal behaviour: * If the user provides three addresses, only the last of which is valid, we wait for the first two connections to completely fail (which may take several minutes depending on the TCP timeout) before we try the third. Trying them all in parallel and using the first valid one would be better. * Once we've had an address fail, we discard it forever. Over the lifetime of a long-running cluster, all of the nodes may be down at one point or another, meaning that eventually we may 'run out' of nodes and abort. We should probably just mark the address as recently-failed, and retry them after some time has passed. Only if all nodes have *recently* failed should we abort.
|
Why use the flawed approach? Have a look how db.SQL does it. -- Tobi (mobile)
|
Permit creating client with multiple broker addresses
Update Sarama baseline version to 1.27.2
Fixes #7
@burke @fw42
CC @tobi
This does the simplest thing that works. It has some flaws, but most
importantly it gets the API in place and is basically functional. We can
improve it later without breaking API compatibility.
Remaining sub-optimal behaviour:
wait for the first two connections to completely fail (which may take several
minutes depending on the TCP timeout) before we try the third. Trying them
all in parallel and using the first valid one would be better.
long-running cluster, all of the nodes may be down at one point or another,
meaning that eventually we may 'run out' of nodes and abort. We should
probably just mark the address as recently-failed, and retry them after some
time has passed. Only if all nodes have recently failed should we abort.