From 1c19e6b4f5e4dfa32e3ed99c3702310774158faf Mon Sep 17 00:00:00 2001 From: Christoph Pirkl <4711730+kaklakariada@users.noreply.github.com> Date: Mon, 9 Sep 2024 12:49:24 +0200 Subject: [PATCH] Update docs/DESIGN.md --- docs/DESIGN.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/DESIGN.md b/docs/DESIGN.md index 31a1ac9..74ee496 100644 --- a/docs/DESIGN.md +++ b/docs/DESIGN.md @@ -4,6 +4,8 @@ This document contains background information on various design decisions, which ## Automatic Resolution and Randomization of Connection Addresses +By default pyexasol resolves host names to IP addresses, randomly shuffles the IP addresses and tries to connect until connection succeeds. This has the following reasons: + * This will ensure that if at least one hostname is unavailable, an exception will be raised. Otherwise, an exception will occur only when "random" selects a broken hostname, leading to unpredictable errors in production. * When you have a very large cluster with a growing number of nodes, it makes sense to put all nodes under one hostname, like `myexasol.mlan`, instead of having separate hostnames like `myexasol1..64.mlan`, especially when the number constantly changes. In this case, redundancy will not work properly if the hostname is not resolved beforehand, as we do not know if it points to a single address or multiple addresses.