Download Latest Version ntex-service v5.3.0 source code.zip (1.6 MB) Google Add to Preferred Sources
Home / server-v4.3.0
Name Modified Size InfoDownloads / Week
Parent folder
ntex-server v4.3.0 source code.tar.gz 2026-10-21 1.4 MB
ntex-server v4.3.0 source code.zip 2026-10-21 1.7 MB
README.md 2026-10-21 5.1 kB
Totals: 3 Items   3.0 MB 0

Changes

  • Move items queued at a failed, unavailable or blocked worker to other workers, add ServerMetrics::rescheduled

  • LoadBalancing::RoundRobin skips blocked workers while another worker is available

  • Add Server::metrics() with per-worker (WorkerMetrics), per-listener (ListenerMetrics) and accept-loop statistics (ServerMetrics)

  • Add WorkerMetrics::io, I/O backpressure, buffered, read and written bytes, eager writes and close reasons of the worker's connections, one entry per listener configuration, and WorkerMetrics::io_other for the worker's other connections

  • Add WorkerMetrics::page_cache, statistics of the worker thread's buffer page cache

  • Add WorkerMetrics::runtime (RuntimeMetrics), the worker runtime's busy time, polls, self-wakes, poll durations, current turn and task, scheduling latency and stalls. Totals are kept across worker restarts

  • Re-export ServerMetrics, WorkerMetrics, ListenerMetrics and RuntimeMetrics from ntex_server::net

  • Add WorkerPool::load_balancing() and ServerBuilder::load_balancing(). LoadBalancing::LeastLoaded sends each item to the less loaded of two random workers, by runtime utilization, then open connections and queued items, and skips workers blocked by a task. LoadBalancing::IncomingCpu, the default, sends a connection to the worker placed on the CPU that receives its network packets (the RSS CPU on Windows, SO_INCOMING_CPU on Linux and Android), unless that worker is busier than the LeastLoaded choice, and works like LeastLoaded otherwise. Use LoadBalancing::RoundRobin for the previous behavior

  • Add ServerConfiguration::incoming_cpu(), the incoming CPU of an item used by LoadBalancing::IncomingCpu, and ServerMetrics::{incoming_cpu_hits, incoming_cpu_misses}

  • Add WorkerPool::affinity() and ServerBuilder::affinity() with Affinity::{Disabled, Cpu, Core, Soft}. enable_affinity() is deprecated and does nothing. Workers are placed on physical cores first, spread across NUMA nodes and L3 caches, then on SMT siblings, instead of taking CPUs from the highest number down. Soft sets the Windows ideal processor without pinning, and is group aware. Affinity is now enabled by default: Soft on Windows, Core (pin to the CPUs of one physical core) on other platforms. Affinity is supported on Windows, Linux and Android, other platforms ignore it

  • Remove the core_affinity dependency. Worker::start() takes the index of a logical CPU (Option<usize>) instead of core_affinity::CoreId

  • The default number of workers counts the CPUs of all processor groups on Windows, it was limited to 64 before

  • Worker affinity is set before the worker's runtime is created, so runtime memory is allocated on the NUMA node of the worker's CPU

  • On Windows, worker placement honors the job object group affinity and the default CPU sets of the process

  • Server::process() and the accept thread send items to workers on the calling thread, instead of passing them through the server's command loop. Connections are no longer delayed by tasks on the thread that started the server. ServerConfiguration::incoming_cpu() is called on the submitting thread

  • A stop caused by a worker failure with stop_on_panic also stops the other workers

  • Use the ntex-polling fork of polling for the accept loop, the same crate as ntex-net

  • Fix a data race between workers cloning a service factory that is Send but not Sync, each worker gets its own copy of the factory

  • Stop all workers when the server stops, including workers that are not ready or still creating their service

  • Add Server::status() and Server::status_changed(). ServerStatus reports Starting, Ready, Paused, Unavailable, Stopping and Stopped, it replaces the previous Ready and NotReady statuses and is exported from the crate root

  • Remove ServerBuilder::status_handler() and AcceptLoop::set_status_handler(), use Server::status_changed()

  • Server::process() accepts items only while the server is Ready. A server paused with Server::pause() stays paused when workers become available or restart, and resuming a server without available workers no longer resumes the listeners

  • Fix Worker::wait_for_status() missing status changes when several clones of a worker wait at the same time. Each clone now observes every change

  • Fix the signal handling task keeping a stopped server and its factory alive

  • Fix a deadlock when ServerConfiguration::incoming_cpu() submits an item to the same server. The callback no longer runs under the server's routing lock, an item submitted while the callback runs, by itself or by another thread, is sent without its CPU

  • Fix Server::process() returning Ok for an item submitted while the server starts stopping. The item was dropped, now it is returned as Err

Source: README.md, updated 2026-10-21