TCM i Kultura Prosta Spółka Akcyjna

kudzu

A simple web server

Features

kudzu is the combination of a web server amd a content management app. This means that you don't need to run Apache or nginx. You just need a Linux environment for running kudzu.

kudzu is easy to install and run. It has a command line interface for maintenance.

kudzu is written using C++, and adopts a simple design philosophy. It only supports HTTP/1.1 and HTTPS, and it implements server-side rendering. Its main functions do not depend on JavaScript.

kudzu uses a JSONL embedded database for storing data. The database is processed by libJSONHandle, an independently developed JSON/JSONL processing library.

kudzu uses RAM for caching data. Specific data is loaded to RAM when it is read from the database for the first time during a request, and subsequent read operations only read the data that is cached in RAM. Once the original data is changed in the database, the cached data will be accordingly updated.

kudzu uses less memory, and may support thousands of concurrent connections.


Why called kudzu

I have thought about a lot of names for the web app, but the names have been used by others. I studied traditional Chinese medicine in college, so why not give it a name from a herb? kudzu is from Pueraria lobata (Willd.) Ohwi. It is not only a herb, but also is an important plant in traditional Chinese culture. However, people may know its Japanese Latin name "kudzu", but don't know its Chinese pinyin name "ge". This is why I name it kudzu.

The program is released under GNU Affero General Public License version 3.


How to get kudzu

Version 1.2.1 - Release Notes

Download source: kudzu-1.2.1.tar.xz

Download binary for Linux (amd64): kudzu-1.2.1-linux-amd64.tar.xz (Built using GCC 16.0 experimental, cmake and make; tested on Debian 14 Testing for amd64)


Included libraries

The library libJSONHandle.so is distributed under GNU Lesser General Public License version 3.0.

The libstdc++ library libstdc++.so.6 (libstdc++.so.6.0.35) is distributed under GCC Runtime Library Exception.


Local benchmark for kudzu

Machine: AMD Ryzen 7700 (8 cores, 16 threads), 32 GB RAM

wrk -t16 -c100 -d60s --latency

Running 1m test
16 threads and 100 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 495.92us 562.96us 47.06ms 97.57%
Req/Sec 679.62 425.63 2.33k 64.40%
Latency Distribution
50% 419.00us
75% 474.00us
90% 648.00us
99% 1.72ms
474026 requests in 1.00m, 2.67GB read
Requests/sec: 7892.97
Transfer/sec: 45.50MB

wrk -t16 -c500 -d60s --latency

Running 1m test
16 threads and 500 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 788.65us 0.99ms 41.42ms 93.17%
Req/Sec 436.49 295.03 1.68k 65.91%
Latency Distribution
50% 474.00us
75% 785.00us
90% 1.41ms
99% 4.72ms
388261 requests in 1.00m, 2.19GB read
Requests/sec: 6460.56
Transfer/sec: 37.24MB

wrk -t16 -c1000 -d60s --latency

Running 1m test
16 threads and 1000 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 14.08ms 17.34ms 233.06ms 88.61%
Req/Sec 627.23 212.59 1.81k 76.19%
Latency Distribution
50% 8.55ms
75% 17.18ms
90% 34.68ms
99% 81.00ms
583262 requests in 1.00m, 3.28GB read
Requests/sec: 9705.23
Transfer/sec: 55.95MB

wrk -t16 -c10000 -d60s --latency

Running 1m test
16 threads and 10000 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 24.89ms 22.20ms 728.11ms 86.47%
Req/Sec 557.98 217.77 2.21k 70.94%
Latency Distribution
50% 18.37ms
75% 31.41ms
90% 51.94ms
99% 99.60ms
530834 requests in 1.00m, 2.99GB read
Requests/sec: 8835.45
Transfer/sec: 50.94MB

wrk -t16 -c20480 -d60s --latency

Running 1m test
16 threads and 20480 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 30.19ms 22.25ms 674.57ms 88.15%
Req/Sec 422.73 151.22 1.47k 71.18%
Latency Distribution
50% 25.19ms
75% 35.75ms
90% 51.41ms
99% 112.18ms
401027 requests in 1.00m, 2.26GB read
Requests/sec: 6672.85
Transfer/sec: 38.47MB

Instructions

I. How to create a website?

1. Run "kudzu -m" with root access.

2. Choose "Create a website" from the menu.

3. Choose "Create an admin account" from the menu.

II. How to run the program?

There are two ways:

1. Directly run the program as "./kudzu".

The program will exit when you close command line.

2. Run the program as a service.

(1) Run "kudzu -m" with root access.

(2) Choose "Add kudzu service" from the menu.

(3) Run "systemctl start kudzu" with root access.

III. How to change app configuration?

1. The app only supports HTTPS connections. Generally the option "port" is 443. When you run it locally for testing, you may change it to 8443.

2. The option "request_max_size" is for setting the maximum size of a request. Assuming that you submit a form, a request means the submission of all data of the form. If the form contains multiple files, the total size of the files cannot exceed request_max_size.For restricting the size of a single file, it is set on the page of editing a website.

IV. How to manage admin accounts?

1. The only way to create or add an admin account is to run "kudzu -m" with root access and choose "Create an admin account" from the menu.

2. For removing an admin account, please visit the management page of users. The page's url is like https://yourdomain[:port]/manage/users.

V. How to customize the CSS of a single website?

1. Copy style.css from the folder /opt/kudzu/resources/ to the folder "resources" of the website's folder.

2. Modify the file style.css in the folder "resources" of the website's folder.

VI. How to update the app?

1. Uncompress the .tar.xz package of kudzu binary, you may see two files: kudzu.tar.xz and update_app.sh. Please don't uncompress kudzu.tar.xz.

2. Run update_app.sh. The program will remove the folder /opt/kudzu/ firstly, and then put files in kudzu.tar.xz to /opt/kudzu/, and remove kudzu.tar.xz. If you have put something else in /opt/kudzu/, you should backup the folder before running update_app.sh.