A Comparative Study of Webrtc and Websocket Performance in Real-Time Voice Communication - Alwin Hartono Limaran; Agung Wicaksono; Patah Herwanto (Journal of Innovation and Technology Polbeng Series on Informatics (INOVTEK Polbeng - Seri Informatika), 2025)
This study compares the performance of Web Real-Time Communication (WebRTC) and WebSocket for bidirectional voice interaction with the ChatGPT API on an Orange Pi 3B edge device over a 50 Mbps Ethernet connection. The objective is to determine the most efficient and reliable protocol for real-time interaction on resource-constrained devices. The study evaluates latency, bandwidth, CPU utilization, and jitter metrics automatically collected to assess the efficiency and stability of both protocols. Results show that WebRTC achieves approximately 150 ms latency with lower network and CPU consumption and near-zero jitter, while WebSocket exhibits around 200 ms latency with higher bandwidth usage and CPU load. Practically, WebRTC is more efficient and stable for client-side production due to its resource-efficient and responsive characteristics, whereas WebSocket is better suited for custom data streaming or high-throughput server-to-server communication. These findings provide a quantitative foundation for developers in selecting the optimal protocol for real-time voice applications in edge environments.