{"id":17767939,"url":"https://github.com/marceloboeira/dull","last_synced_at":"2025-04-01T14:20:38.782Z","repository":{"id":71790304,"uuid":"183751609","full_name":"marceloboeira/dull","owner":"marceloboeira","description":"🤪 a dummy multi-thread HTTP server","archived":false,"fork":false,"pushed_at":"2019-04-27T18:21:26.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-07T08:49:11.095Z","etag":null,"topics":["example","http","learn-by-doing","learning","multithreading","rust","study","tcp","the-rust-book"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marceloboeira.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-27T09:08:40.000Z","updated_at":"2019-07-01T14:33:07.000Z","dependencies_parsed_at":"2023-02-27T17:45:52.454Z","dependency_job_id":null,"html_url":"https://github.com/marceloboeira/dull","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marceloboeira%2Fdull","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marceloboeira%2Fdull/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marceloboeira%2Fdull/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marceloboeira%2Fdull/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marceloboeira","download_url":"https://codeload.github.com/marceloboeira/dull/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246651563,"owners_count":20811994,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["example","http","learn-by-doing","learning","multithreading","rust","study","tcp","the-rust-book"],"created_at":"2024-10-26T20:52:08.331Z","updated_at":"2025-04-01T14:20:38.759Z","avatar_url":"https://github.com/marceloboeira.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🤪  dull\n\u003e a dummy multi-thread HTTP server\n\u003e Chapter 20 of \"The Rust Book\".\n\nMore info:\n  * 🔩 [marceloboeira](https://github.com/marceloboeira)/[grab](https://github.com/marceloboeira/trpl) - The Rust Programming Language Annotations.\n\n## Performance\n\n### Single threaded\n\nThe performance on a single-thread is quite interesting, considering it has to handle each connection sequentially.\n\n`λ echo \"GET http://127.0.0.1:7878/\" | vegeta attack -duration=1m -rate=500 | vegeta report`\n\n```\nRequests      [total, rate]            30000, 500.00\nDuration      [total, attack, wait]    1m7.909608939s, 59.999667s, 7.909941939s\nLatencies     [mean, 50, 95, 99, max]  1.831540351s, 738.542µs, 8.667226773s, 8.771782413s, 16.200500026s\nBytes In      [total, mean]            5212240, 173.74\nBytes Out     [total, mean]            0, 0.00\nSuccess       [ratio]                  98.72%\nStatus Codes  [code:count]             0:385  200:29615\nError Set:\n```\n\n### Multi threaded\n\n#### 3 threads\n\nLess failures, same response time metrics, almost same await.\n\n```\nRequests      [total, rate]            30000, 498.50\nDuration      [total, attack, wait]    1m8.154959971s, 1m0.180527s, 7.974432971s\nLatencies     [mean, 50, 95, 99, max]  1.919961664s, 796.13µs, 8.635306402s, 8.767720613s, 16.796227919s\nBytes In      [total, mean]            5263984, 175.47\nBytes Out     [total, mean]            0, 0.00\nSuccess       [ratio]                  99.70%\nStatus Codes  [code:count]             0:91  200:29909\n```\n\n\n#### 5 threads\n\nLess failures, more await time and better max (longest request).\n```\nRequests      [total, rate]            30000, 500.00\nDuration      [total, attack, wait]    1m13.239694331s, 59.999695s, 13.239999331s\nLatencies     [mean, 50, 95, 99, max]  1.939717543s, 776.642µs, 8.651514717s, 8.714148167s, 14.717806331s\nBytes In      [total, mean]            5267856, 175.60\nBytes Out     [total, mean]            0, 0.00\nSuccess       [ratio]                  99.77%\nStatus Codes  [code:count]             0:69  200:29931\n```\n\n#### 10 threads\n\nSmaller await, same response times, ...\n```\nRequests      [total, rate]            30000, 500.00\nDuration      [total, attack, wait]    1m7.85424267s, 59.999841s, 7.85440167s\nLatencies     [mean, 50, 95, 99, max]  1.921707306s, 875.357µs, 8.664867293s, 8.767385647s, 9.007165635s\nBytes In      [total, mean]            5260288, 175.34\nBytes Out     [total, mean]            0, 0.00\nSuccess       [ratio]                  99.63%\nStatus Codes  [code:count]             0:112  200:29888\n```\n\n#### 50 threads\n\nMore failures, less await, smaller response times....\n\n```\nRequests      [total, rate]            30000, 500.00\nDuration      [total, attack, wait]    1m7.92261209s, 59.999957s, 7.92265509s\nLatencies     [mean, 50, 95, 99, max]  1.762299338s, 687.111µs, 8.600099602s, 8.726004411s, 17.047197064s\nBytes In      [total, mean]            5126704, 170.89\nBytes Out     [total, mean]            0, 0.00\nSuccess       [ratio]                  97.10%\nStatus Codes  [code:count]             0:871  200:29129\n```\n\n#### 10000 threads\n\nMany more failures, same await, almost the same response times...\n```\nRequests      [total, rate]            30000, 500.00\nDuration      [total, attack, wait]    1m7.858527123s, 59.999893s, 7.858634123s\nLatencies     [mean, 50, 95, 99, max]  1.719965125s, 690.37µs, 8.657487979s, 8.817952196s, 16.966979238s\nBytes In      [total, mean]            5077248, 169.24\nBytes Out     [total, mean]            0, 0.00\nSuccess       [ratio]                  96.16%\nStatus Codes  [code:count]             0:1152  200:28848\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarceloboeira%2Fdull","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarceloboeira%2Fdull","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarceloboeira%2Fdull/lists"}