[ANN] Mongoose.jl v0.2.x - A fast lightweight HTTP Server

Hi there,

I’m happy to announce the 0.2 release of the Mongoose.jl library. A much more mature and stable release.

This release includes many new cool features, for example:

  • Multi-instance (launch multiple servers on different ports)
  • Multi-threading support (one thread dedicated for the event loop and multiple workers)
  • New syntax (avoiding the mg_ prefix as it was suggested)
  • Among others (check the repo for more details)

Thank you for your kind feedback and any contribution to make the library better is totally welcome!

17 Likes

Nice work! How do you see this compared to Oxygen.jl?

Hi, @DoktorMike

Mongoose.jl has three main guidelines on its design philosophy

  • Lightweight, just one dependency (Mongoose_jl)
  • Simple, only a few functions and structs exported
  • Fast, check the comparison here

This guidelines come from my experience using Julia to deploy machine learning models into production

  • Lightweight, smaller binary sizes and perhaps use of static compilation (juliac)
  • Simple, keep only the strictly necessary and be used as a core library to build over it
  • Fast, create an extremely fast framework that does justice to Julia’s reputation
4 Likes

Being able to beat HTTP.jl and Oxygen.jl by a factor of 2-4 is nice. What are the three numbers and why are the other two much smaller than the first?

On the other hand, 4x slower than the leading Rust framework means there is probably a lot left on the table still. Is it the Julia scheduler preventing further gains?

2 Likes

Excellent! I will for sure play around with this. I’ve deployed with Oxygen.jl several times and I really liked the openAPI Swagger docs that came with it. I did struggle with speed sometimes though. Again, nice work!

1 Like

They are Requests/Second. RPS measures the volume of traffic the system can handle RPS=TotalNumberofRequests/DurationinSeconds​ at a defined level of concurrency (in this case having 64, 256 and 512 concurrent request). The last two numbers are smaller because the C library mongoose, which is the core of this library, is single threaded so it is a bottle neck when you have a high concurrency because you can only use one thread for read and write the requests/responses.

My last goal is to build something better maybe using liburing to be able of compete with the fastest frameworks.

3 Likes

Really cool! will it be possible to support websockets?

1 Like

I think so, I will try to include it in the next major release

1 Like