Skip to content

Conversation

@butschster
Copy link
Member

Migrates Var-Dumper server from RoadRunner TCP plugin with PHP worker pool to a dedicated native plugin with Jobs integration. This eliminates PHP workers for TCP handling, processes complete payloads in Go before pushing to Jobs, and significantly reduces resource consumption.

Motivation

The previous implementation used RoadRunner's generic TCP plugin, which had critical architectural issues:

Previous Architecture Problems

  1. Dedicated Worker Pool for TCP: Required separate PHP workers just for handling TCP connections

    • Wasted server resources on workers that only forwarded data
    • Additional memory overhead (2 workers × 80MB = 160MB idle memory)
    • Workers blocked waiting for TCP data
  2. Fragmented Payload Handling: TCP plugin streamed raw bytes to PHP workers

    • PHP had to manually buffer and reassemble fragmented TCP packets
    • Complex state management for incomplete messages
    • Risk of memory leaks from improper buffering
    • No guarantees about message boundaries

Why This Matters

Buggregator needs to handle hundreds of concurrent dumps during debugging sessions without impacting application performance. The old architecture wasted resources on TCP handling that could be better used for actual dump processing and UI serving.

@butschster butschster moved this to Done in Buggregator Nov 23, 2025
@butschster butschster self-assigned this Nov 23, 2025
@butschster butschster added enhancement New feature or request feature labels Nov 23, 2025
@butschster butschster merged commit 1f6915b into master Nov 23, 2025
7 checks passed
@butschster butschster deleted the feature/var-dumper-server branch November 23, 2025 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants