explaingit

fastos/fastsocket

Analysis updated 2026-07-03

3,743CAudience · ops devopsComplexity · 5/5LicenseSetup · hard

TLDR

A custom Linux kernel patch that makes TCP networking scale close to linearly on multi-core servers, boosting throughput for web servers and load balancers by hundreds of percent.

Mindmap

mindmap
  root((Fastsocket))
    What it does
      TCP scaling patch
      Multi-core networking
      Linear throughput
    How it works
      Per-CPU socket paths
      No shared locks
      Preload library
    Benchmarks
      Nginx 290% boost
      HAProxy 620% boost
      24-core tested
    Audience
      Server engineers
      High-traffic ops
      Systems researchers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Replace the stock CentOS 6.5 kernel on a 12-plus-core server to eliminate TCP bottlenecks that cause throughput to drop as more cores are added.

USE CASE 2

Use the LD_PRELOAD library with Nginx to multiply its request-handling capacity without changing any application code.

USE CASE 3

Speed up HAProxy on servers with Intel NICs that support hardware packet steering by combining Fastsocket with Flow Director.

What is it built with?

CLinux kernel

How does it compare?

fastos/fastsocketsypstraw/rpi4-osdevcilium/pwru
Stars3,7433,7453,746
LanguageCCC
Setup difficultyhardhardhard
Complexity5/55/54/5
Audienceops devopsdeveloperops devops

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1day+

Requires replacing the Linux kernel, only targets CentOS 6.5 and is not compatible with modern kernel versions.

Free to use and modify, but any distributed version must also be open source under GPLv2.

In plain English

Fastsocket is a kernel-level modification for Linux that makes the TCP networking stack scale more efficiently on multi-core servers. It was developed at SINA.COM, a Chinese internet company, in cooperation with Tsinghua University and with support from Intel. Research describing the system was published at ASPLOS 2016, a computer systems conference. The problem Fastsocket addresses is that the standard Linux kernel does not scale well for network-heavy workloads once a server has more than about four CPU cores. At 12 or more cores, the stock kernel can see throughput drop as more cores are added, because of contention around shared networking data structures. Fastsocket redesigns the socket layer so that each CPU core has its own independent path through the network stack, achieving close to linear scaling up to 24 cores. In benchmark tests, Fastsocket increased the request-handling throughput of Nginx (a web server) by 290% and HAProxy (a load balancer) by 620% on a 24-core machine compared to the base CentOS 6.5 kernel. On servers with Intel NICs supporting Flow Director, a hardware feature that steers network packets to specific CPU queues, HAProxy throughput improved by an additional 15% in proxy workloads. Enabling hyper-threading added another 20% on top of that. Fastsocket works as a custom Linux kernel combined with a small preload library. Existing applications require no code changes: a program like Nginx can use Fastsocket simply by starting with the library loaded via the LD_PRELOAD environment variable. Removing the library returns the application to standard kernel behavior, making rollback immediate. The implementation targets CentOS 6.5. The system had already been running in production at SINA.COM for HTTP load balancing since March 2014. It is released under GPLv2.

Copy-paste prompts

Prompt 1
I want to install Fastsocket on a CentOS 6.5 server running Nginx. Walk me through replacing the kernel and loading the preload library correctly.
Prompt 2
How do I benchmark Fastsocket's performance improvement on my 24-core server compared to the default kernel using Nginx?
Prompt 3
Help me configure Intel Flow Director with Fastsocket on an HAProxy load balancer to maximize packet steering efficiency.
Prompt 4
How do I safely roll back from Fastsocket to the standard kernel if something goes wrong in production?

Frequently asked questions

What is fastsocket?

A custom Linux kernel patch that makes TCP networking scale close to linearly on multi-core servers, boosting throughput for web servers and load balancers by hundreds of percent.

What language is fastsocket written in?

Mainly C. The stack also includes C, Linux kernel.

What license does fastsocket use?

Free to use and modify, but any distributed version must also be open source under GPLv2.

How hard is fastsocket to set up?

Setup difficulty is rated hard, with roughly 1day+ to a first successful run.

Who is fastsocket for?

Mainly ops devops.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub fastos on gitmyhub

Verify against the repo before relying on details.