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
2.98k stars 182 forks source link

[QUESTION] Performance #143

Closed IceflowRE closed 5 months ago

IceflowRE commented 6 months ago

I would be interested in the performance of this project. How many connection can it handle? What is the RAM/CPU consumption. How is it comparing to other solutions like nginx?

tobychui commented 6 months ago

@IceflowRE Good question. I didn't have time to benchmark it as I am too busy working with my master thesis. However, my self-host website are constantly having around 60k request per day without much issues. 圖片

And I am using a CPU from 10 years ago (G3258) and ram usage of around 780 - 800MB (with fast geo-ip mode enabled). From what I experience, if you are using it to host a personal site with a few services for your friends, it should be working like a charm.

For the last question

How is it comparing to other solutions like nginx?

If you are feeling comfortable with cli and nginx config, you shd keep using nginx. Zoraxy is for entry level user, if you ask this question, you properly need much more advance tools like nginx or Caddy.

Morethanevil commented 6 months ago

CPU and RAM are average over the whole runtime. I updated to v3.0.3, runtime at point of writing around 4 days.

Using the command ps -p <pid> -o %cpu,%mem,lstart where <pid> is the pid of Zoraxy on 4 different servers:

Fedora Homeserver CPU=Ryzen 5 5600G RAM=64GB (Jellyfin, Komga, Immich, Paperless):

%CPU %MEM             STARTED
 0.9  1.6   Mi Mai  1 09:50:45 2024

Hetzner dedicated server CPU=Intel Xeon E3-1271V3 RAM=64GB (main server, Nextcloud, Mastodon, Cryptpad, WordPress, WikiJS, Adguard)

%CPU %MEM              STARTED
 1.5  1.4  Tue Apr 30 09:02:10 2024

Contabo Storage VPS 3 (MinIO, Synapse, Lemmy):

%CPU %MEM              STARTED
 2.6  6.3  Tue Apr 30 11:04:13 2024

NetCup VPS 1000 ARM G11 (Pixelfed):

%CPU %MEM               STARTED
 1.4  9.6  Tue Apr 30 10:46:32 2024

Maybe others could post their results or improve the command I used and we can stick it to the wiki.

tobychui commented 5 months ago

Maybe I will move this to discussion, as this is not technically an issue nor questions on how to solve a particular problem in using Zoraxy.