High-Performance Gorilla WebSocket Server for Large-Scale Concurrent Connections

Mahendra Data, S.Kom., M.Kom., Ph.D.Dosen
Nur Hazbiy Shaffan, S.T., M.T.Dosen
Muhammad Atha Tsaqif Mahasiswa
Muhammad Hafizh FaiqunnabilMahasiswa
Oktavianus Samuel MinartoMahasiswa

22 Agustus 2026

Brawijaya University is actively advancing real-time application infrastructure through its currently ongoing project, “Implementation and Evaluation of a High-Performance Gorilla WebSocket Server for Large-Scale Concurrent Connections.” Led by Mahendra Data and Nur Hazbiy Shaffan, the project aims to develop a scalable WebSocket server and evaluate its performance across container and WebAssembly deployment models.

WebSocket enables persistent, full-duplex communication between clients and servers, making it suitable for real-time applications such as notification systems, chat platforms, monitoring dashboards, online games, attendance systems, and interactive quizzes. However, maintaining thousands of simultaneous connections requires low latency, high throughput, efficient resource usage, and stable connection management.

A Scalable Architecture for Real-Time Applications

The proposed server is being developed using Go and the Gorilla WebSocket library. Go provides lightweight concurrency through goroutines and channels, while Gorilla WebSocket supports connection management, text and binary messages, and ping/pong mechanisms for monitoring active connections.

The project will evaluate the server using two deployment approaches:

  • Docker containers, which are widely used for portable and consistent cloud-native deployment.
  • WebAssembly runtimes, such as Wasmtime or WasmEdge, which offer sandboxed execution, lightweight isolation, and potentially faster startup times.

By running the same WebSocket workload in both environments, the research will identify how each deployment model affects performance, resource efficiency, and connection stability.

Key Research Components

High-Performance WebSocket Implementation

The server will be designed to maintain concurrent connections while exchanging messages with minimal delay. A dedicated load client will generate controlled workloads and record performance metrics automatically.

The implementation will also include connection monitoring and error handling to ensure that performance can be evaluated consistently across both deployment environments.

Container and WebAssembly Comparison

Although containers are already established in cloud-native infrastructure, WebAssembly is increasingly being explored as a server-side runtime. Its lightweight and portable characteristics make it a potential alternative for deploying network services.

However, WebAssembly performance depends on the selected runtime, compilation method, and workload. This research therefore provides an empirical comparison specifically for concurrent Gorilla WebSocket workloads instead of assuming that one deployment model is universally superior.

Controlled Performance Testing

Testing will be conducted by gradually increasing the workload to 100, 500, 1,000, and 2,000 concurrent connections. Each scenario will be repeated in a controlled environment to produce stable and comparable measurements.

The evaluation will measure:

  • Average, p95, and p99 latency
  • Message throughput
  • CPU and memory usage
  • Application startup time
  • Connection success rate
  • Disconnected connections
  • Error rate

The results will be presented through tables and visualizations to show the conditions under which containers or WebAssembly provide relative advantages.

Supporting Data-Driven Deployment Decisions

Running from June to November 2026, the project is expected to produce a verified Gorilla WebSocket server implementation, comprehensive benchmark data, a comparative analysis of the two deployment models, and technical documentation for experiment replication.

The findings will provide practical guidance for software developers, DevOps engineers, and infrastructure administrators when selecting a deployment model for real-time WebSocket applications. By examining both application performance and resource efficiency, the project contributes to the development of scalable and responsible digital infrastructure.