feat: Add SSH connection pooling for 11x performance improvement#2
Merged
Conversation
Add comprehensive test suite for real-world integration testing using Proxmox VE to spin up LXC containers and VMs: - tests/infrastructure/: Provisioning scripts and configs - provision.sh: Deploy/destroy VM cluster on Proxmox - run-tests.sh: Test orchestration framework - test_inventory.yml: Ansible-compatible test inventory - ssh_config: SSH config for test hosts - tests/real_ssh_tests.rs: Real SSH connection tests - Key and password authentication - SFTP file transfers - Connection pooling validation - Privilege escalation (sudo) - tests/parallel_stress_tests.rs: Multi-host stress tests - Linear/Free/HostPinned strategy validation - Fork limiting under load - Serial batching - Handler deduplication - tests/real_docker_tests.rs: Docker connection tests - docker exec operations - docker cp file transfers - Container lifecycle handling - tests/chaos_tests.rs: Chaos engineering tests - Random failure injection - Network latency simulation - Recovery after failures - Block/rescue/always reliability Test cluster uses 16 LXC containers + 1 VM (~38GB RAM, ~50 vCPUs). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implement connection pooling in the CLI to reuse SSH connections across multiple task executions, eliminating the SSH handshake/authentication overhead for subsequent commands. Changes: - Add connection pool (HashMap) to CommandContext - Add get_connection() method that caches and reuses SSH connections - Add close_connections() method for cleanup at playbook end - Refactor execute_remote_command() to use pooled connections Benchmark results (10 tasks x 5 hosts = 50 commands): - Rustible: 0.56s (11.2ms per command) - Ansible: 6.20s (123.9ms per command) - Speedup: 11.1x 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This was referenced Jan 7, 2026
This was referenced Jan 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
connectionspool toCommandContextwithget_connection()andclose_connections()methodsBenchmark Results
How It Works
Test plan
🤖 Generated with Claude Code