Skip to content

Latest commit

 

History

History
44 lines (34 loc) · 1.64 KB

README.md

File metadata and controls

44 lines (34 loc) · 1.64 KB

IoUring.Transport

Experimental, managed ASP.NET Core Transport layer based on io_uring. This library is inspired by kestrel-linux-transport, a similar linux-specific transport layer based on epoll.

This transport layer supports both server (IConnectionListenerFactory) and client (IConnectionFactory) scenarios.

Setup

Get the latest preview release from NuGet or the last build from master via MyGet.

In the ConfigureServices method of the Startup.cs file of every basic ASP.NET application, add the following:

using IoUring.Transport;
// ...
public void ConfigureServices(IServiceCollection services)
{
    // ...
    services.AddIoUringTransport(); // no-op if OS != Linux or kernel version < 5.4
    // ...
}

Options

Various configuration options are available if needed (the default values are shown):

public void ConfigureServices(IServiceCollection services)
{
    // ...
    services.AddIoUringTransport(options =>
    {
        options.ThreadCount = Environment.ProcessorCount / 2;
        options.SetThreadAffinity = false;
        options.ApplicationSchedulingMode = PipeScheduler.ThreadPool;
        options.TcpNoDelay = true;
        options.RingSize = 128;
        options.ListenBacklog = 128;
    });
    // ...
}