Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Actix-web in used in production at Cloudflare for the image resizing feature.

It's been relatively easy to use and flexible enough to integrate with the rest of Cloudflare's stack. Feels vaguely similar to Node's express. Along with Rust it's a great fit for a service that needs to have high performance, tight memory usage with very low risk of leaks, integration with existing libraries, and a good security story.



> Actix-web in used in production at Cloudflare for the image resizing feature.

Oh, that's really interesting. I actually used it for exactly the same purpose, but I was a bit disappointed by the image[1] crate for the image-resizing itself: it was several times slower than imagemagick (it was less the case on my decktop, when compiled with `target-cpu=native`, but on my low-end server many SIMD instructions weren't available and auto-vectorized code wasn't that efficient) and the image quality was also way poorer. Did you use that crate for the image processing ? Or imagemagick ? Or something you wrote internally ?

[1]: https://github.com/image-rs/image


Did you try looking for Rust bindings to ImageMagick? If it's really that much faster, it might make sense to just call out to it. I found https://github.com/nlfiedler/magick-rust with e quick search, but I don't know how well it works.


It was much faster (between 3 and 5 times) but performance wasn't a critical part on this project, the ease of use and deployment was higher on the list.

Also, I'm not sure I would trust imagemagick enough anymore to put it on a web-facing server, since its security track record doesn't smell that good [1].

But I was still disappointed by the poor performance of the `image` library because Rust has shown in many areas that it has potential to write code which is as fast as C, and in this case it didn't deliver.

[1]: https://www.cvedetails.com/vulnerability-list.php?vendor_id=...


It didn't deliver because the library is not good, not because rust is a bad language.


For image I/O we use libjpeg-turbo and our optimized zlib implementation. These are C deps, but these particular libraries have been fuzzed hard enough.


Thanks. If I'm not mistaken, libjpeg-turbo gives you a JPEG decoder and encoder, but you need to do the image resizing yourself right ?


I'm curious about this as well.


I've been experimenting with Iron/Router: https://github.com/iron/router

Do you know how it compares?


I don't think Iron is even supported anymore, but for one thing, last I checked, Iron was based on OS threads primarily whereas Actix has a (I believe) pluggable runtime, which supports async.


Iron had a long quiet period, but it does have updates recently (a commit 12 days ago, for example).


Oh neat, I wasn't aware. Thank you.


Ah really? That's surprising, as Iron seemed to be the go-to for what it does. I guess that's just a symptom of a nascent ecosystem.


Iron has a rather baroque API and was pretty much unmaintained for a very long time.


and it still serve my servers pretty well, few years already.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: