You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/AdministratorGuide/Configuration/ConfReference/Systems/index.rst
+38Lines changed: 38 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,44 @@ In each system you normally find the following sections:
34
34
* FailoverURLs: Like URLs, but they are only tried if no server in URLs was successfully contacted.
35
35
36
36
37
+
Preferred URLs
38
+
--------------
39
+
40
+
For most services, the standard ``URLs`` and ``FailoverURLs`` mechanism provides a way to specify primary and backup service endpoints.
41
+
42
+
However, this approach has limitations in certain scenarios:
43
+
44
+
- Some services (like the Configuration service) have replicas that automatically register themselves in the Configuration System
45
+
- External servers ("voboxes") running at sites may not be accessible from all clients
46
+
- Connection attempts to inaccessible servers cause errors that, while harmless due to fallback mechanisms, slow down DIRAC and generate misleading error messages
47
+
48
+
To address these issues, you can define a ``PreferredURLPatterns`` that identifies a subset of URLs to try first:
49
+
50
+
.. code-block:: guess
51
+
52
+
System
53
+
{
54
+
URLs
55
+
{
56
+
Service = dips://host1.main.invalid:1234/System/Service,dips://host2.main.invalid:1234/System/Service,dips://external.invalid:1234/System/Service
57
+
}
58
+
}
59
+
DIRAC
60
+
{
61
+
PreferredURLPatterns = .*\.main\.invalid/.*
62
+
}
63
+
64
+
In this example:
65
+
66
+
1. The ``PreferredURLPatterns`` specifies a regular expression that matches servers in the ``main.invalid`` domain
67
+
2. When connecting to the service, DIRAC will first try URLs matching this pattern (``host1.main.invalid`` and ``host2.main.invalid``)
68
+
3. Only if these preferred servers fail will DIRAC attempt to connect to other servers (``external.invalid``)
69
+
70
+
This approach reduces connection errors and improves performance by prioritizing servers that are more likely to be accessible from the client.
71
+
72
+
.. note:: The ``PreferredURLPatterns`` is a list of regular expressions, not a single regular expression. This allows you to specify multiple patterns to match different subsets of servers if desired.
0 commit comments