tobychui / zoraxy

A general purpose HTTP reverse proxy and forwarding tool. Now written in Go!
https://zoraxy.aroz.org
GNU Affero General Public License v3.0
3.1k stars 188 forks source link

[HELP] Zoraxy hanging after few min. Hardware Requirements? #398

Closed rustynail1984 closed 1 week ago

rustynail1984 commented 1 week ago

Running latest version of Zoraxy in a docker container on a VPS with

after starting and few minutes of traffic, about 20k requests zoraxy proxy hanging and the admin panel and the website loading very slow or loading forever.. after restarting docker container it works fine again for few min.

What Hardware requiremetns have zoraxy? i used HaProxy before and this VPS was enough.

tobychui commented 1 week ago

@rustynail1984 I am not sure about docker but if you run it bare metal (and btw, that is why I wrote it in Golang so it run without all the docker or JIT runtime dependencies) , it should be really resources saving.

I have tested running Zoraxy on RAMNODE Standard KVM VPS with 1 vCPU core, 512MB of RAM and 15GB of SSD storage, for long term deployment in my homelab, it can handle up to 40 - 50k requests per day with a G3258 Intel CPU, 1.2GB of RAM (fast geodb mode) and < 1GB of storage from my SATA SSD.

P.S. by bare metal I mean ./zoraxy with a dedicated linux user. Not really means run it without the OS layer.

rustynail1984 commented 1 week ago

i upgraded my VPS to 2 Core and 8GB RAM and it running better now but sometimes it is still slow.

CPU Cores 100% usage while big download traffic is active.

image

image

image

tobychui commented 1 week ago

Hey @rustynail1984 , did you enable the fast-geoIP mode? If yes, I guess you can try running Zoraxy natively instead.

rustynail1984 commented 1 week ago

image

nope is disabled.

tobychui commented 1 week ago

@rustynail1984 Oh, you should enable that instead. The fast-gepIP mode is use for high traffic site to trade off CPU cycles to memory usage. Enabling that should solve your high CPU usage issue.

rustynail1984 commented 1 week ago

ok looks much better now. thanks.

image