Ancestors

Written by Marco "Ocramius" Pivetta on 2025-01-15 at 06:10

Always satisfying: full docker image with zero dependencies in 3.1Mb.

No shell, no nothing.

=> View attached media

=> More informations about this toot | More toots from ocramius@mastodon.social

Written by Marco "Ocramius" Pivetta on 2025-01-15 at 06:16

Heck, I could deploy this on an ESP32 :D

It includes DNS resolution, HTTP requests, HTTP server, JSON (de-)serialization and a small in-memory (leaky) DB.

Still too much RAM usage though: uses ~3Mb of it.

=> More informations about this toot | More toots from ocramius@mastodon.social

Written by Marco "Ocramius" Pivetta on 2025-01-15 at 06:22

and it's stupid fast too:

Running 10s test @ http://localhost:8089/active-oci-processes
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    67.16us   87.37us  12.47ms   99.34%
    Req/Sec    74.56k     3.17k   82.42k    80.20%
  1497587 requests in 10.10s, 548.43MB read
Requests/sec: 148278.57
Transfer/sec:     54.30MB

The entire thing is just an exercise in minimalism, BTW: there's no final aim to it :)

=> More informations about this toot | More toots from ocramius@mastodon.social

Written by Andrea Fontana on 2025-01-15 at 15:10

Sembra un report di wrk, no? Che server stai facendo girare?

=> More informations about this toot | More toots from andreafontana.it@bsky.brid.gy

Written by Marco "Ocramius" Pivetta on 2025-01-15 at 16:24

@andreafontana.it it's just a local request that renders a JSON structure: think of it as "hello world".

Still it is interesting to see it work this fast, with so little dependencies and code, which could easily run on very cheap/efficient hardware :)

=> More informations about this toot | More toots from ocramius@mastodon.social

Written by Andrea Fontana on 2025-01-15 at 16:28

Yes, ok. But let me clarify. I’m interested in knowing which server is running because I’m developing a server myself, and I also use wrk for benchmarking. I can compile my server as a self-contained executable, with no external deps. And I would like to try to run it in a minimal docker too!

=> More informations about this toot | More toots from andreafontana.it@bsky.brid.gy

Toot

Written by Marco "Ocramius" Pivetta on 2025-01-15 at 16:51

@andreafontana.it see https://github.com/Ocramius/oci-srm-server-mock-rust/blob/b27c3529641004555b276132b46ef09ec92bdcf1/src/main.rs#L423

=> More informations about this toot | More toots from ocramius@mastodon.social

Descendants

Written by Andrea Fontana on 2025-01-15 at 17:08

rust+actix, then. Did you publish the Dockerfile?

=> More informations about this toot | More toots from andreafontana.it@bsky.brid.gy

Written by Marco "Ocramius" Pivetta on 2025-01-15 at 17:10

@andreafontana.it there's no Dockerfile: it's built by flake.nix

=> More informations about this toot | More toots from ocramius@mastodon.social

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113833404236530808
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
305.367591 milliseconds
Gemini-to-HTML Time
3.681823 milliseconds

This content has been proxied by September (3851b).