Git Product home page Git Product logo

Comments (5)

costajob avatar costajob commented on July 17, 2024

Hi,

Thanks for suggestions, i will surely gave it a try: indeed i had a raw iron server benchmarked some months ago and it was speedy!

I will add it soon!

from app-servers.

costajob avatar costajob commented on July 17, 2024

Added Rust+Iron to the pack: i was expecting a better throughput anyway.
I will try to run benchmarks on a new workstation (SSD) once i will get it, to see if the numbers changes.

Best

from app-servers.

oz avatar oz commented on July 17, 2024

Cool, thanks for trying Rust! 😄

Iron is probably so slow because it includes a whole router. I think it compares more to Sinatra or Kemal than a bare HTTP server. Maybe it could be more optimized, but it's nice for a "hello world" bench.

I just verified that using the hyper HTTP server lib that powers Iron is a lot faster: wrk2 gives +/- 79k req/sec. It's still terrible but running on battery on my 2011 Lenovo X220, it's not so bad. 😇

If you're curious, use Hyper's example with a Cargo.toml like this one:

[package]
name = "hyper-server"
version = "0.1.0"

[dependencies]
hyper = { git = "https://github.com/hyperium/hyper.git" }
env_logger = "*"
num_cpus = "*"

Cheers!

from app-servers.

costajob avatar costajob commented on July 17, 2024

Thanks!
I apologize, since i'm not a rustacean yet ;)
It surely make more sense adding it without a router. I will replace the Iron server with a plain Hyper HTTP app.

Thanks!

from app-servers.

costajob avatar costajob commented on July 17, 2024

Replaced Iron example with Hyper HTTP one and throughput on my MacBook improved of about 10000 req/sec!

Memory footprint instead triplicated compared to Iron, maybe there's some optimization that can be done on the "Hello World" example you shared.

Best

from app-servers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.