Tag - epoll

Entries feed - Comments feed

2026-08-28

mORMot 2 HTTP Server: Memory Efficiency and Thread Smoothing

High-performance HTTP servers are often benchmarked primarily by their peak requests per second. For a REST server, however, peak throughput is only part of the story. A server also needs to remain responsive when requests have very different execution times: some may complete in a few microseconds, while others may spend milliseconds waiting for a database, a remote service, or some other slow operation.

The mORMot 2 asynchronous HTTP server was one of the fastest in the TFB benchmark. But it was designed as a scalable REST server. Our project has recently received two related improvements in this area: a closer look at its memory allocation behavior, and a refined thread smoothing mechanism for waking worker threads on POSIX systems.

Continue reading

2026-07-06

Object Pascal Is Still a Serious Contender for High-Performance REST Servers

In this article, we will deep-dive into the architecture that lets our Open Source mORMot 2 library compete with (and sometimes outperform) nginx, Kestrel, and raw C++ implementations.

The library offers several HTTP servers.
The mormot.net.server unit contains the historical mORMot 1 web servers - mainly THttpServer (thread-pool for HTTP/1.0 short requests + one thread per kept-alive HTTP/1.1 connection), and THttpApiServer (using the efficient http.sys kernel API on Windows).
But since mORMot 2, our mormot.net.async unit is our genuine cross-platform, modern async implementation.

Continue reading