Commit graph

1155 commits

Author SHA1 Message Date
Joakim Frostegård
8889ab586c Use CanonicalSocketAddr in ws and http; remove old option from common 2022-02-03 19:29:21 +01:00
Joakim Frostegård
380ca222de http: socket workers: simplify request buffering 2022-02-03 18:59:51 +01:00
Joakim Frostegård
91dcd3de4d
Add CanonicalSocketAddr struct (#49)
* Add CanonicalSocketAddr struct to aquatic_common, use in aquatic_udp

* udp_bench: fix build error by using CanonicalSocketAddr
2022-02-02 22:34:54 +01:00
Joakim Frostegård
f7e0f61119
Add architectural overview svg to README (#48) 2022-02-02 16:46:09 +01:00
Joakim Frostegård
993ceaa9f5
Merge pull request #47 from greatest-ape/work-2022-02-02
README: mention specific BEPs, other minor improvements
2022-02-02 16:03:29 +01:00
Joakim Frostegård
4efe6dbb31 README: mention specific BEPs, other minor improvements 2022-02-02 15:49:55 +01:00
Joakim Frostegård
e629d49448
Merge pull request #46 from greatest-ape/work-2022-01-31
http: don't panic if response body is too long for buffer; update README
2022-01-31 20:37:44 +01:00
Joakim Frostegård
9209a3ee01
README: improve title 2022-01-31 20:08:17 +01:00
Joakim Frostegård
88deed89a7 README: use more descriptive title 2022-01-31 20:05:35 +01:00
Joakim Frostegård
abf3e7015e http: don't send response if body is too long for buffer 2022-01-31 19:59:42 +01:00
Joakim Frostegård
0ee2e2d2ae
Merge pull request #45 from greatest-ape/work-2022-01-30
Improve http response sending efficiency; update dependencies
2022-01-30 22:15:55 +01:00
Joakim Frostegård
84d57c1c86 http: make response sending more efficient by avoiding some copies 2022-01-30 17:13:00 +01:00
Joakim Frostegård
9ba72ce3fd Upgrade itoa to version 1 2022-01-30 15:55:35 +01:00
Joakim Frostegård
391c55a19e
Merge pull request #44 from greatest-ape/udp-2022-01-13
udp: use slab for pending scrape responses, split response statistics by type
2022-01-13 19:40:15 +01:00
Joakim Frostegård
0d3c6111ca udp: run cargo fmt 2022-01-13 19:21:53 +01:00
Joakim Frostegård
f0dc7c19f3 udp: show separate statistics for all response types 2022-01-13 19:16:25 +01:00
Joakim Frostegård
00c4e74374 udp: use slab for pending scrape responses to fix potential issue
Peers sometimes send multiple scrape requests with the same transaction
id, which would previously cause warnings due to replacing the
PendingScrapeMapEntry and later not finding it.
2022-01-13 18:35:41 +01:00
Joakim Frostegård
700dd68d2c
udp scrape improvements (#43)
* udp_protocol: forbid full scrapes

* udp: improve PendingScrapeResponseMap logging

* udp: PendingScrapeResponseMap: store less data, improve logging

* udp: PendingScrapeResponseMap: log if replacing entry on insert

* udp: PendingScrapeResponseMap: use remote addr in key

* Run cargo fmt

* README: update copyright end year

* udp: move scrape request splitting logic into PendingScrapeResponseMap

* udp: add quickcheck test test_pending_scrape_response_map

* udp protocol: fix failing test_scrape_request_convert_identity
2022-01-06 11:48:16 +01:00
Joakim Frostegård
e5a1461613
udp: include ConnectionId in PendingScrapeResponseMap key (#42) 2021-12-28 03:16:15 +01:00
Joakim Frostegård
a208775104
Include documentation in printed config files (#41)
* Start work on printing toml config with comments

* WIP: toml_config: extract default values for fields

* WIP: toml_config: handle single-level nested structs

* WIP: toml_config: improve comment handling, std type trait impls

* WIP: toml_config: add Private trait, improve comment handling, clean up

* toml_config: fix default value bug; improve tests

* Use toml_config in all applicable crates; add toml_config enum support

* toml_config: improve comments

* toml_config_derive: support enum comments

* Improve config comments for udp, cli_helpers, common

* Improve config comments

* Add tests for Config struct TomlConfig implementations

* Improve Config comments

* Improve Config comments

* ws, http: add config comments for tls cert and private key lines

* small fixes to toml_config and toml_config_derive

* Run cargo fmt

* Fix typo in several config comments

* Update README

* Update README
2021-12-26 11:33:27 +01:00
Joakim Frostegård
d694785244
Merge pull request #40 from greatest-ape/deps-2021-12-22
Update deps; work on udp statistics html file
2021-12-22 00:47:11 +01:00
Joakim Frostegård
aaa00a53ce udp: statistics html: don't display link to repo 2021-12-22 00:31:37 +01:00
Joakim Frostegård
9dd036a813 Run cargo update 2021-12-22 00:29:56 +01:00
Joakim Frostegård
e3399b6a45
Merge pull request #39 from greatest-ape/better-udp-statistics
udp: support writing statistics html report to file
2021-12-22 00:22:45 +01:00
Joakim Frostegård
4c9e394d6a GitHub CI: cargo-build-and-test: raise timeout to 20 minutes 2021-12-21 23:35:30 +01:00
Joakim Frostegård
f531a246b0 udp: support writing statistics html report to file 2021-12-21 23:16:48 +01:00
Joakim Frostegård
b2f0347876
README.md: move TLS setup section, general improvements 2021-12-17 01:32:57 +01:00
Joakim Frostegård
22f6d869d3
README: remove ws benchmarks, since implementation changed 2021-12-16 17:03:30 +01:00
Joakim Frostegård
67c4c02bbd
aquatic_ws: mio: replace native_tls with rustls, rewrite connection state logic completely (#38)
* ws: mio: use rustls, rewrite Connection logic

* ws: mio: improve poll register/deregister handling

* ws: mio: work on type-level poll registry safety

* ws: mio: use stronger poll registry type-level guarantees

* ws: mio: fix stream reading

* ws: clean up, run fmt

* ws: mio: don't require registered connection for writing, improve docs

* ws: mio: add Connection::get_meta(), make Connection::meta private

* ws: mio: add ConnectionMap struct; remove utils.rs

* ws: mio: move token counter into ConnectionMap, improve docs

* ws: mio: connection: move Connection struct above state structs

* Update TODO

* ws: fix build errors

* ws: upgrade to tungstenite 0.16

* ws load test: don't panic on Close message; print shorter errors

* ws: fix socket worker bugs, add log statements

* ws: mio: wait for write availability if would block for ws messages

* Update README

* ws: mio: limit channels & queues; read 1 message only; other fixes

* ws: mio: send local responses each event; decrease channel size

* Update TODO

* ws: mio: limit ws send queue, fixing memory leak; limit pending messages

Also change some log output levels and run rustfmt

* Update TODO

* Update TODO
2021-12-16 16:09:36 +01:00
Joakim Frostegård
222fac0e09
Improve aquatic_ws glommio implementation, fixing memory leak (#37)
* ws: upgrade tungstenite and async-tungstenite to 0.16

* ws: use latest glommio

* ws: glommio: add config key connection_cleaning_interval

* ws: glommio: limit socket worker local channel size

Quick fix for memory leak

* ws: glommio: use prioritized task queue for sending responses

This is a start on trying to fix the large amount of responses
being dropped due to local response channel being full

* scripts/watch-threads.sh: don't highlight changes

* ws: glommio: await when sending responses from shared to local

* ws: glommio: limit ws message queue; add lots of ::log::warn for debug

* ws: glommio: add timeout to send_out_message, maybe pinpointing issue

* ws: glommio: clean up, tweak channel sizes; update TODO

* ws: glommio: set send timeout to 10s, add backpressure, accept drops

* ws: glommio: yield if needed in ConnectionReader backoff loop

* ws load test: add config key connection_creation_interval_ms

* ws load test: don't print "run connection" when opening connection

* ws load test: rename config num_connection to num_connections_per_worker

* ws load test config: improve order of code in file

* ws: glommio: info-level log for socket send timeout

* ws glommio: clean idle connections, improve cleaning code

* ws: glommio: make ConnectionWriter::send_error_response fallible; fmt

* ws: glommio: store JoinHandle in conn reference, cancel task on clean

* add scripts/heaptrack.sh

* Update TODO
2021-12-11 18:50:05 +01:00
Joakim Frostegård
e1bffae42c
Merge pull request #36 from greatest-ape/fixes-2021-11-29
small udp refactor, update README and TODO
2021-11-30 09:37:22 +01:00
Joakim Frostegård
7892e6f508 udp: move TorrentMap and related types to workers/request.rs 2021-11-29 21:03:47 +01:00
Joakim Frostegård
f14ab8e351 Update TODO 2021-11-29 11:04:52 +01:00
Joakim Frostegård
8bd32fdb05 README: fix reference to config.rs files 2021-11-29 11:04:34 +01:00
Joakim Frostegård
cf595f53e8
Merge pull request #35 from greatest-ape/fixes-2021-11-28
udp and udp load test improvements, run cargo fmt
2021-11-29 09:37:15 +01:00
Joakim Frostegård
9d8f9d8f7c udp load test: remove ThreadId newtype, use poll token 0 in all workers 2021-11-28 22:33:55 +01:00
Joakim Frostegård
f068d86e0d udp load test: set MAX_PACKET_SIZE to 8192 2021-11-28 22:30:22 +01:00
Joakim Frostegård
e972903451 udp load test: move network.rs and handler.rs into new worker module 2021-11-28 22:28:50 +01:00
Joakim Frostegård
411716e333 udo load test: config: rename "handler" to "requests", refactor 2021-11-28 22:18:33 +01:00
Joakim Frostegård
dd573cdb30 Run cargo fmt 2021-11-28 22:11:21 +01:00
Joakim Frostegård
125d3c49d6 udp: config: rename channel_recv_timeout_ms and move to root, add docs 2021-11-28 22:10:29 +01:00
Joakim Frostegård
2fe57b9f67 udp: add config key worker_channel_size to enable bounded channels 2021-11-28 21:59:11 +01:00
Joakim Frostegård
abea88dbf8
Merge pull request #34 from greatest-ape/update-udp-benchmark
Add new udp benchmarks, update README
2021-11-28 13:25:13 +01:00
Joakim Frostegård
adda2bd282 Update TODO 2021-11-28 13:13:15 +01:00
Joakim Frostegård
8dc0ba34ad Add new udp benchmarks, update README 2021-11-28 12:50:15 +01:00
Joakim Frostegård
f81244287b
Merge pull request #33 from greatest-ape/udp-load-test-fixes
aquatic_udp_load_test improvements
2021-11-28 11:43:34 +01:00
Joakim Frostegård
53b46d24f2 udp load test: set default additional_request_probability to 0.5 2021-11-28 03:51:59 +01:00
Joakim Frostegård
14474fb5e3 udp load test: improve statistics printing code 2021-11-28 01:10:42 +01:00
Joakim Frostegård
6605055b3d udp load test: improve statistics code 2021-11-28 01:05:52 +01:00
Joakim Frostegård
b70cbe6349 udp load test: use relaxed ordering, more accurate stats, improve code 2021-11-28 01:02:23 +01:00