https://github.com/dpc/mioecho
Rust mio echo server.
https://github.com/dpc/mioecho
Last synced: 3 months ago
JSON representation
Rust mio echo server.
- Host: GitHub
- URL: https://github.com/dpc/mioecho
- Owner: dpc
- Created: 2015-05-18T02:33:22.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2016-01-05T06:24:17.000Z (over 10 years ago)
- Last Synced: 2026-03-05T18:56:55.866Z (3 months ago)
- Language: Rust
- Size: 12.7 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://travis-ci.org/dpc/mioecho)
# mioecho
## Introduction
`mioecho` is a simple TCP echo server based on [mio][mio] [rust language][rust] library.
The idea is to write a basic, but polished and well performing example for evaluation and reference.
[rust]: http://rust-lang.org
[mio]: https://github.com/carllerche/mio
## Building & running
cargo run --release
# Semi-benchmarks
Beware: This is amateurish and probably misleading comparison!
Using: https://gist.github.com/dpc/8cacd3b6fa5273ffdcce
```
# mioecho
% GOMAXPROCS=64 ./tcp_bench -c=128 -t=10 -a="127.0.0.1:5555"
Benchmarking: 127.0.0.1:5555
128 clients, running 26 bytes, 10 sec.
Speed: 178946 request/sec, 178946 response/sec
Requests: 1789460
Responses: 1789460
# server_libev (simple libev based server):
% GOMAXPROCS=64 ./tcp_bench -c=128 -t=10 -a="127.0.0.1:5000"
Benchmarking: 127.0.0.1:3100
128 clients, running 26 bytes, 10 sec.
Speed: 210485 request/sec, 210485 response/sec
Requests: 2104856
Responses: 2104854
```
Using: https://github.com/dpc/benchmark-echo
```
rust ./mioecho:5555
Throughput: 148697.85 [reqests/sec], errors: 0
Throughput: 145282.09 [reqests/sec], errors: 0
Throughput: 157900.81 [reqests/sec], errors: 0
Throughput: 155722.21 [reqests/sec], errors: 0
Throughput: 160203.92 [reqests/sec], errors: 0
c ./server_libev 3100
Throughput: 192770.52 [reqests/sec], errors: 0
Throughput: 156105.10 [reqests/sec], errors: 0
Throughput: 162632.05 [reqests/sec], errors: 0
Throughput: 179868.05 [reqests/sec], errors: 0
Throughput: 187706.06 [reqests/sec], errors: 0
```