NF Software Engineering — Building 5G Core Network Functions · Pro
Open-source 5GC implementations split between two concurrency styles. Open5GS uses an event-loop architecture in C: one main thread runs an epoll-style poll set (ogs_pollset), all I/O is non-blocking, every event (timer firing, SBI request arrival, NGAP message arrival) is dispatched to a handler function in the same thread. This minimizes lock contention but caps throughput at one CPU's worth of work per process. Free5GC uses a goroutine-per-request model in Go: each inbound HTTP request runs in its own goroutine, shared context structures are protected by sync.Mutex or sync.RWMutex,…