searxng/AUTHORS.rst
czaky 122a9568de [network]: Add redundant parallel proxy requests.
Anecdotally, using SearX over unreliable proxies,
like tor, seems to be quite error prone.
SearX puts quite an effort to measure the
performance and reliability of engines, most
likely owning to those aspects being of
significant concern.

The patch here proposes to mitigate related
problems, by issuing concurrent redundant requests
through the specified proxies at once, returning
the first response that is not an error.
The functionality is enabled using the:
`proxy_request_redundancy` parameter within the
outgoing network settings or the engine settings.

Example:

```yaml

outgoing:
    request_timeout: 8.0
    proxies:
        "all://":
            - socks5h://tor:9050
            - socks5h://tor1:9050
            - socks5h://tor2:9050
            - socks5h://tor3:9050
    proxy_request_redundancy: 4
```

In this example, each network request will be
send 4 times, once through every proxy. The
first (non-error) response wins.

In my testing environment using several tor proxy
end-points, this approach almost entirely
removes engine errors related to timeouts
and denied requests. The latency of the
network system is also improved.

The implementation, uses a
`AsyncParallelTransport(httpx.AsyncBaseTransport)`
wrapper to wrap multiple sub-trasports,
and `asyncio.wait` to wait on the first completed
request.

The existing implementation of the network
proxy cycling has also been moved into the
`AsyncParallelTransport` class, which should
improve network client memoization and
performance.

TESTED:
- unit tests for the new functions and classes.
- tested on desktop PC with 10+ upstream proxies
    and comparable request redundancy.
2024-05-17 02:09:29 +00:00

4 KiB

searxng is a fork from searx and is maintained by Markus Heiser (@return42)

People who have submitted patches/translations, reported bugs, consulted features or generally made searx better:

  • Adam Tauber @asciimoo
  • Matej Cotman @matejc
  • Émilien Devos @unixfox
  • Thomas Pointhuber pointhi
  • Noémi Ványi @kvch
  • @Cqoicebordel
  • Marc Abonce Seguin @MarcAbonce
  • @pofilo
  • Laszlo Hammerl
  • Stefan Marsiske
  • Gabor Nagy
  • @pw3t
  • @rhapsodhy
  • András Veres-Szentkirályi
  • Benjamin Sonntag
  • @HLFH
  • @TheRadialActive
  • @Okhin
  • André Koot
  • Alejandro León Aznar
  • rike
  • dp
  • Martin Zimmermann
  • @courgette
  • @kernc
  • @Reventl0v
  • Caner Başaran
  • Benjamin Sonntag
  • @opi
  • @dimqua
  • Giorgos Logiotatidis
  • Luc Didry
  • Niklas Haas
  • @underr
  • Emmanuel Benazera
  • @GreenLunar
  • Kang-min Liu
  • Kirill Isakov
  • Guilhem Bonnefille
  • @jibe-b
  • Christian Pietsch @pietsch
  • @Maxqia
  • Ashutosh Das @pyprism
  • YuLun Shih @imZack
  • Dmitry Mikhirev @mikhirev
  • David A Roberts @davidar
  • Jan Verbeek @blyxxyz
  • Ammar Najjar @ammarnajjar
  • @stepshal
  • François Revol @mmuman
  • Harry Wood @harry-wood
  • Thomas Renard @threnard
  • Pydo https://github.com/pydo
  • Athemis https://github.com/Athemis
  • Stefan Antoni <http://stefan.antoni.io>
  • @firebovine
  • Lorenzo J. Lucchini @luccoj
  • @eig8phei
  • @maxigas
  • Jannik Winkel @kiney
  • @juanitobananas
  • Vache Asatryan @vachi
  • Luca CPZ @lcpz
  • @nikaiw
  • Thirnearez
  • Hypolite Petovan @MrPetovan
  • @woorst
  • @Apply55gx
  • @pyrrh0n1c
  • @cclauss
  • QGW @moon2l
  • Pierre-Alain Toret @daftaupe
  • Matthew Olmsted @icegiant
  • Michael Tran @trankmichael
  • Joseph Nuthalapati @josephkiranbabu
  • @maiki
  • Richard Didier @zeph33
  • Michael Vieria @Themimitoof
  • Richard Nespithal @rndevfx
  • Stanislas @angristan
  • @rinpatch
      1. @usernameisntallowed
  • Léo Bourrel @bourrel
  • @cy8aer
  • @Popolon
  • Alice Ferrazzi @aliceinwire
  • @LiquidLemon
  • @dadosch
  • Václav Zouzalík @Venca24
  • @ZEROF
  • Ivan Skytte Jørgensen @isj-privacore
  • @miicha
  • Étienne Deparis @milouse
  • @pelag0s
  • Denis Wernert @d-tux
  • Robin Hallabro-Kokko @hallabro
  • Jonas Zohren @jfowl
  • Elias Ojala @theel0ja
  • @brunob
  • Nick Espig @nachtalb
  • Rachmadani Haryono @rachmadaniHaryono
  • Frank de Lange @yetangitu
  • Nicolas Gelot @nfk
  • @volth
  • Mathieu Brunot @madmath03
  • @lorddavidiii
  • @x250
  • Robby O'Connor @robbyoconnor
  • Finn @0xhtml
  • @tmikaeld
  • @hobbestigrou
  • Vipul @finn0
  • @CaffeinatedTech
  • Robin Schneider @ypid
  • @splintah
  • Lukas van den Berk @lukasvdberk
  • @piplongrun
  • Jason Kaltsikis @jjasonkal
  • Sion Kazama @KazamaSion
  • @resynth1943
  • Mostafa Ahangarha @ahangarha
  • @gordon-quad
  • Sophie Tauchert @999eagle
  • @bauruine
  • Michael Ilsaas https://mikeri.net
  • @renyhp
  • rachmadani haryono @rachmadaniHaryono
  • Mohamad Safadieh @msafadieh
  • @gardouille
  • @resynth1943
  • @Eliesemoule
  • @gardouille
  • @GazoilKerozen
  • Lukáš Kucharczyk @KucharczykL
  • Lynda Lopez @lyndalopez544
    1. Efe Çetin @efectn
  • Nícholas Kegler @nicholasks
  • @pierrechtux
  • Scott Wallace @scottwallacesh
  • @Singustromo
  • @TheEvilSkeleton
  • @Wonderfall
  • @mrwormo
  • Xiaoyu WEI @xywei
  • @joshu9h
  • Daniel Hones
  • @cyclaero
  • @thezeroalpha
  • @Tobi823
  • @archiecodes
  • @BBaoVanC
  • @datagram1
  • @lucky13820
  • @jhigginbotham
  • @xenrox
  • @OliveiraHermogenes
  • Paul Alcock @Guilvareux
  • Sam A. https://samsapti.dev
  • @XavierHorwood
  • Ahmad Alkadri https://github.com/ahmad-alkadri
  • Milad Laly @Milad-Laly
  • @llmII
  • @blob42 https://blob42.xyz
  • Paolo Basso <https://github.com/paolobasso99>
  • Bernie Huang <https://github.com/BernieHuang2008>
  • Austin Olacsi <https://github.com/Austin-Olacsi>
  • @micsthepick
  • Daniel Kukula <https://github.com/dkuku>
  • @czaky <https://github.com/czaky>