mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 02:35:31 +00:00
Improve README
This commit is contained in:
parent
93d4e43cfa
commit
eb2c294300
1 changed files with 22 additions and 22 deletions
44
README.md
44
README.md
|
|
@ -58,13 +58,12 @@ Begin by generating configuration files. They differ between protocols.
|
||||||
./target/release/aquatic_ws -p > "aquatic-ws-config.toml"
|
./target/release/aquatic_ws -p > "aquatic-ws-config.toml"
|
||||||
```
|
```
|
||||||
|
|
||||||
Make adjustments to the files. The values you will most likely want to adjust
|
Make adjustments to the files. You will likely want to adjust `address`
|
||||||
are `socket_workers` (number of threads reading from and writing to sockets)
|
(listening address) under the `network` section.
|
||||||
and `address` under the `network` section (listening address). This goes for
|
|
||||||
all three protocols.
|
|
||||||
|
|
||||||
`aquatic_http` requires configuring a TLS certificate file and a private key file
|
Both `aquatic_http` and `aquatic_ws` requires configuring a TLS certificate
|
||||||
to run. More information is available futher down in this document.
|
file as well as a private key file to run. More information is available
|
||||||
|
in the `aquatic_http` subsection of this document.
|
||||||
|
|
||||||
Once done, run the tracker:
|
Once done, run the tracker:
|
||||||
|
|
||||||
|
|
@ -74,10 +73,16 @@ Once done, run the tracker:
|
||||||
./target/release/aquatic_ws -c "aquatic-ws-config.toml"
|
./target/release/aquatic_ws -c "aquatic-ws-config.toml"
|
||||||
```
|
```
|
||||||
|
|
||||||
More documentation of configuration file values might be available under
|
### Configuration values
|
||||||
`src/lib/config.rs` in crates `aquatic_udp`, `aquatic_http`, `aquatic_ws`.
|
|
||||||
|
|
||||||
#### General settings
|
Starting a lot more socket workers than request workers is recommended. All
|
||||||
|
implementations are heavily IO-bound and spend most of their time reading from
|
||||||
|
and writing to sockets. This part is handled by the `socket_workers`, which
|
||||||
|
also do parsing, serialisation and access control. They pass announce and
|
||||||
|
scrape requests to the `request_workers`, which update internal tracker state
|
||||||
|
and pass back responses.
|
||||||
|
|
||||||
|
#### Access control
|
||||||
|
|
||||||
Access control by info hash is supported for all protocols. The relevant part
|
Access control by info hash is supported for all protocols. The relevant part
|
||||||
of configuration is:
|
of configuration is:
|
||||||
|
|
@ -88,6 +93,12 @@ mode = 'off' # Change to 'black' (blacklist) or 'white' (whitelist)
|
||||||
path = '' # Path to text file with newline-delimited hex-encoded info hashes
|
path = '' # Path to text file with newline-delimited hex-encoded info hashes
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### More information
|
||||||
|
|
||||||
|
More documentation of the various configuration options might be available
|
||||||
|
under `src/lib/config.rs` in directories `aquatic_udp`, `aquatic_http` and
|
||||||
|
`aquatic_ws`.
|
||||||
|
|
||||||
## Details on implementations
|
## Details on implementations
|
||||||
|
|
||||||
### aquatic_udp: UDP BitTorrent tracker
|
### aquatic_udp: UDP BitTorrent tracker
|
||||||
|
|
@ -205,7 +216,8 @@ implementation.
|
||||||
## Load testing
|
## Load testing
|
||||||
|
|
||||||
There are load test binaries for all protocols. They use a CLI structure
|
There are load test binaries for all protocols. They use a CLI structure
|
||||||
similar to `aquatic` and support generation and loading of configuration files.
|
similar to the trackers and support generation and loading of configuration
|
||||||
|
files.
|
||||||
|
|
||||||
To run, first start the tracker that you want to test. Then run the
|
To run, first start the tracker that you want to test. Then run the
|
||||||
corresponding load test binary:
|
corresponding load test binary:
|
||||||
|
|
@ -219,18 +231,6 @@ corresponding load test binary:
|
||||||
To fairly compare HTTP performance to opentracker, set keepalive to false in
|
To fairly compare HTTP performance to opentracker, set keepalive to false in
|
||||||
`aquatic_http` settings.
|
`aquatic_http` settings.
|
||||||
|
|
||||||
## Architectural overview
|
|
||||||
|
|
||||||
One or more socket workers open sockets, read and parse requests from peers and
|
|
||||||
send them through channels to request workers. The request workers go through
|
|
||||||
the requests, update shared internal tracker state as appropriate and generate
|
|
||||||
responses that are sent back to the socket workers. The responses are then
|
|
||||||
serialized and sent back to the peers.
|
|
||||||
|
|
||||||
This design means little waiting for locks on internal state occurs,
|
|
||||||
while network work can be efficiently distributed over multiple threads,
|
|
||||||
making use of SO_REUSEPORT setting.
|
|
||||||
|
|
||||||
## Copyright and license
|
## Copyright and license
|
||||||
|
|
||||||
Copyright (c) 2020-2021 Joakim Frostegård
|
Copyright (c) 2020-2021 Joakim Frostegård
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue