Vsevolod Stakhov
79b0b67f2d
[Minor] Remove sequential algorithm as it is not actually a rotation alg
Sequential rotation was used just to rotate all upstreams in the loop (e.g.
when you need to do some action for all upstreams). Allowing to specify it as
a user defined algorithm was a mistake as it breaks upstreams API expectations.
See #4043
2 년 전
Vsevolod Stakhov
49768177cf
[Minor] Allow to get a port for a specific upstream
2 년 전
Vsevolod Stakhov
d53f283c4e
[Minor] Add one more check for use-after-free prevention
2 년 전
Vsevolod Stakhov
e89fc35017
[Minor] Allow to capture upstream object
2 년 전
Vsevolod Stakhov
41bfa9283e
[Rework] Try to resolve failed upstreams more agressively
3 년 전
Vsevolod Stakhov
dbc9ff655d
[Fix] Fix round-robin rotation
3 년 전
Vsevolod Stakhov
c2351037b5
[Feature] Support multiple base32 alphabets
4 년 전
Vsevolod Stakhov
80bb5413db
[Fix] Fix listen socket parsing
Issue: #3254
4 년 전
Vsevolod Stakhov
92abcea04f
[Project] Support mempool flags
4 년 전
Vsevolod Stakhov
684996ee80
[Minor] Add failure reason in the upstreams code
4 년 전
Vsevolod Stakhov
24f973e828
[Minor] Sequential upstreams iteration is special
4 년 전
Vsevolod Stakhov
234923a5ff
[Feature] Allow exception when choosing upstream
4 년 전
Vsevolod Stakhov
b802ca308b
[Minor] Improve logging
Submitted by: @citrin
4 년 전
Vsevolod Stakhov
58e8c7ee5f
[Minor] Fix C stupidity
4 년 전
Vsevolod Stakhov
ff7f417bff
[Fix] Allow real upstreams configuration
4 년 전
Vsevolod Stakhov
9bde024ddf
[Minor] Improve logging for upstream failure
4 년 전
Vsevolod Stakhov
ab2d0a0b1c
[Fix] Fix upstreams exclusion logic
4 년 전
Vsevolod Stakhov
19e29ff61d
[Fix] Fix consistent hashing when upstreams are marked inactive
The idea is to rehash the value when we found that the current upstream is dead
and apply consistent hashing algorithm multiple times. This is limited by
number of attempts (we try 10 times before giving up). Also cleanup locking
stuff.
4 년 전
Vsevolod Stakhov
61506d5279
[Project] Some fixes in SRV records handling
4 년 전
Vsevolod Stakhov
b3eb4d1800
[Project] Start SRV upstreams implementation
4 년 전
Vsevolod Stakhov
04127efeba
[Fix] Distinguish remote and local addrs parsing
4 년 전
Vsevolod Stakhov
fdb077d507
[Minor] Add special assertions to avoid upstreams corruption
4 년 전
Vsevolod Stakhov
b3713de7ce
[Fix] Fix pending checks for events
4 년 전
Vsevolod Stakhov
a30f3afa46
[Minor] Fix dns servers upstreams
4 년 전
Vsevolod Stakhov
f3d197ff3d
[Feature] Upstreams: Set noresolve flag on numeric upstreams
4 년 전
Vsevolod Stakhov
44f911a006
[Feature] Upstreams: Add lazy resolving logic to all upstreams
4 년 전
Vsevolod Stakhov
dc96f9b37f
[Project] Make it compileable again...
5 년 전
Vsevolod Stakhov
005105a1b0
[Project] Rework upstreams
5 년 전
Vsevolod Stakhov
98897c1797
[Project] First refactoring step libevent->libev
5 년 전
Vsevolod Stakhov
2ad0276a31
[Minor] Pass variables from the environment to rspamd_env
5 년 전
Vsevolod Stakhov
34cc551018
[Project] Preliminary support of HTTP proxies
Issue: #572
5 년 전
Vsevolod Stakhov
5836e02b95
[Project] Allow to hash and compare inet addresses considering port
5 년 전
Vsevolod Stakhov
81a0f3ca11
[Minor] Oops, fix type
5 년 전
Vsevolod Stakhov
0f32df6f44
[Fix] Core: Fix address rotation bug
Previously, upstream.get_addr function returned the new address of the
upstream. Unfortunately, it was used for printing addresses. It caused
the following situation: let's imagine we have A1 and A2 where A1 was
initially selected. So the connection was performed to A1:
Current addr Selected addr
Connect+---------+ A2+------>A1 A1
|
+-+Print failure<---+ A1+------>A2 A2
| +----+
+->Mark failure+-------->+ A2 |
+----+
But the failure OP as well as log message told about `A2` where the real
problem happened with `A1`.
This commit adds distinguishing between getting the next and the current
address of the upstream resolving this issue.
5 년 전
Vsevolod Stakhov
70d859cede
[Feature] Allow to add upstream watchers to Lua API
5 년 전
Vsevolod Stakhov
a6a1a8d5ae
[Feature] Implement event watchers for upstreams
5 년 전
Vsevolod Stakhov
6f84b92277
[Minor] Allow to create upstreams without a context
5 년 전
Vsevolod Stakhov
ec763ca3ee
[Feature] Allow to set custom limits for upstream lists
5 년 전
Vsevolod Stakhov
915a460b6a
[Minor] Fix event pending checks
5 년 전
Vsevolod Stakhov
1812d38cb8
[Feature] Distinguish IP failures from connection failures
5 년 전
Vsevolod Stakhov
4b7e987b91
[Minor] Allow to create upstream lists without rspamd_config
6 년 전
Vsevolod Stakhov
deabe33977
[Fix] Fix upstream addrs updating
6 년 전
Vsevolod Stakhov
34150e9a86
[Minor] Save nameserver name when parsing upstreams from resolv.conf
6 년 전
Vsevolod Stakhov
f95d624720
[Minor] Add probabilistic reset of errors in upstream addrs
6 년 전
Vsevolod Stakhov
cc52edf62c
[Fix] Delay upstream re-resolving when one upstream is defined
6 년 전
Vsevolod Stakhov
758c39a8b7
[Fix] Do not constantly re-resolve failed upstreams with a single
element
6 년 전
Vsevolod Stakhov
a479224582
[Minor] Further g_slice cleanup
6 년 전
Vsevolod Stakhov
639c67dbd8
[Fix] Fix parsing IPv6 nameservers in resolv.conf
7 년 전
Vsevolod Stakhov
f9e618dee3
[Minor] Add some auxiliary functions for upstreams
7 년 전
Vsevolod Stakhov
81d002bdfe
[Fix] Reresolve upstreams even if there is a single server there
7 년 전