CoreWCF Streaming RPC Performance Bottleneck: A Stack Overflow Failure Postmortem
2025-05-08

The author attempted to use CoreWCF for streaming RPC between .NET Framework and .NET 8 to test the throughput of random number transfers. However, after posting a question on Stack Overflow, it was closed without an answer. The issue is that the CoreWCF service continues to consume significant CPU and write to the stream even after the client disconnects. The author suspects a misunderstanding of how WCF streams are supposed to work, suggesting WCF streams may not be suitable for handling streams of unknown length. The article explores the challenges of using WCF streaming for high-throughput RPC and considers alternatives, such as using single message requests or session mode, to improve performance and reliability.
Development