Skip to content

Commit c9de780

Browse files
committed
0.1.2
1 parent 317ce98 commit c9de780

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "astra"
3-
version = "0.1.1"
3+
version = "0.1.2"
44
edition = "2021"
55
license = "MIT"
66
authors = ["ibraheem <[email protected]>"]

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Crate](https://img.shields.io/crates/v/astra?style=for-the-badge)](https://crates.io/crates/astra)
44
[![Github](https://img.shields.io/badge/github-astra-success?style=for-the-badge)](https://github.com/ibraheemdev/astra)
5-
[![Docs](https://img.shields.io/badge/docs.rs-0.1.1-4d76ae?style=for-the-badge)](https://docs.rs/astra)
5+
[![Docs](https://img.shields.io/badge/docs.rs-0.1.2-4d76ae?style=for-the-badge)](https://docs.rs/astra)
66

77
Astra is a synchronous HTTP server built on top of [`hyper`](https://github.com/hyperium/hyper).
88

@@ -51,6 +51,6 @@ Astra is currently an HTTP *server* library only, the client API is unimplemente
5151

5252
## But Is It Fast?
5353

54-
Many of the resources you'll find about thread-per-request performance are very outdated, from the time of [the C10k problem](http://www.kegel.com/c10k.html). Since then, threads have gotten cheaper to create and context switching affects have been improved drastically. Modern OS schedulers are much better than they are often given credit for...
54+
Many of the resources you'll find about thread-per-request performance are very outdated, often referencing bottlenecks from a time where [C10k](http://www.kegel.com/c10k.html) was peak scale. Since then, threads creation has gotten significantly cheaper and context switching overhead has been reduced drastically. Modern OS schedulers are much better than they are given credit for...
5555

56-
It is fast! Astra does very well in benchmarks at 25k concurrent connections; I haven't measured further than that. In a basic hello world benchmark, Astra yields 20% better throughput than Hyper running on Tokio. In a heavier benchmark involving Postgres and some HTML templating, throughput is around the same. However, Astra in that case uses the [`postgres`](https://github.com/sfackler/rust-postgres) library, which uses Tokio under the hood. In the same test but with pure blocking I/O ([`libpq`](https://www.postgresql.org/docs/current/libpq.html)), Astra again performs around 20% better than Tokio. In both cases, Astra performs an order of magnitude better in terms of latency. However, this comes at the cost of higher memory and CPU usage.
56+
In a realistic benchmark involving PostgreSQL and some HTML templating, Astra comes very close the Tokio throughput-wise, and an order of magnitude better in terms of latency. While not as performant as pure blocking I/O, Astra is fast! As always, you should measure your own use case, but you can expect Astra's performance to be comparable to that of Hyper running on Tokio.

0 commit comments

Comments
 (0)